# Desktop agent configuration

Use this endpoint to retrieve the configuration file consumed by the Signitic desktop agent on Windows and macOS.

This is also the endpoint used in centralized Windows deployments such as RDS or GPO-based rollouts.

## Endpoint

<mark style="color:blue;">`GET`</mark> `https://api.signitic.app/desktop/:email`

## Headers

| Name                                        | Type   | Description  |
| ------------------------------------------- | ------ | ------------ |
| x-api-key<mark style="color:red;">\*</mark> | String | Your API key |

## Path parameters

| Name                                    | Type   | Description                                                 |
| --------------------------------------- | ------ | ----------------------------------------------------------- |
| email<mark style="color:red;">\*</mark> | String | User email used to resolve the desktop agent configuration. |

## Success response

### `200 OK`

```json
{
  "cron_m": 17,
  "cron_h": "*/2",
  "2ec9c7c3d2d54f1f9f68d4d9b7c9d6c1": {
    "key": "2ec9c7c3d2d54f1f9f68d4d9b7c9d6c1",
    "email": "john.doe@signitic.com",
    "service": 3,
    "name": "John Doe"
  },
  "aa51c9115c3c4f31bc16507cb9fe5f32": {
    "key": "aa51c9115c3c4f31bc16507cb9fe5f32",
    "email": "john.alias@signitic.com",
    "service": 3,
    "name": "John Alias"
  }
}
```

### Response fields

| Name             | Type    | Description                                                 |
| ---------------- | ------- | ----------------------------------------------------------- |
| cron\_m          | Integer | Minute used by the desktop agent refresh schedule.          |
| cron\_h          | String  | Hour expression used by the desktop agent refresh schedule. |
| `<hash>.key`     | String  | Internal key used by the desktop app to request signatures. |
| `<hash>.email`   | String  | Email address attached to this configuration entry.         |
| `<hash>.service` | Integer | Internal service identifier used by the desktop app.        |
| `<hash>.name`    | String  | Display name shown by the desktop app.                      |

The response can include multiple entries:

* the main user
* aliases
* delegated users

## Error responses

| Status | Internal code | When                                                                                                                                   |
| ------ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| 401    | `99`          | The `x-api-key` header is missing.                                                                                                     |
| 401    | n/a           | The API key does not match a workspace with API access. This error is returned in a legacy payload using `error` instead of `success`. |
| 404    | `102`         | The user cannot be resolved.                                                                                                           |
| 405    | `100`         | The reserved `users` path segment is used instead of a user identifier.                                                                |

## Deployment notes

For Windows RDS or GPO deployments, Signitic provides deployment guidance and example scripts here:

[Déploiement sur RDS ou par GPO](https://support.signitic.com/fr/articles/8224344-deploiement-sur-rds-ou-par-gpo)
