# Requests and responses

> Envelopes, pagination, dates, languages and request IDs shared by every Duty API endpoint.

## Response envelope

A single resource comes inside `data`:

```json
{
  "data": { "number": "GM-000123", "subject": "VPN disconnects every few minutes" }
}
```

A list adds `pagination`:

```json
{
  "data": [{ "number": "GM-000123" }, { "number": "GM-000122" }],
  "pagination": { "page": 1, "perPage": 25, "total": 87, "totalPages": 4 }
}
```

Catalog lists are short and come whole, without `pagination`. A deletion answers `204 No Content`.

## Pagination

Paginated endpoints take two query parameters:

| Parameter | Default | Range |
| --- | --- | --- |
| `page` | `1` | 1 or more |
| `perPage` | `25` | 1 to 100 |

Read pages until `page` reaches `totalPages`. To keep a copy in sync, prefer [`updatedSince`](/en/api/guides/sync-requests/) over walking every page again.

## Dates and times

Timestamps are RFC 3339 in UTC: `2026-12-06T14:05:00Z`. Filters such as `createdFrom` and `updatedSince` accept any RFC 3339 value, with or without an offset (`2026-12-06T10:05:00-04:00`).

## Languages

Send `Accept-Language` to choose the language of:

- names of statuses, priorities, services, categories and transitions;
- error messages.

The API speaks English (`en`), Spanish (`es`), French (`fr`) and Portuguese (`pt`). Without the header, or with a language it does not speak, it answers in English. Codes stay the same in every language: compare `status.code`, display `status.name`.

## Request IDs

Every response carries `X-Request-ID`. Send your own (up to 100 letters, digits, `.`, `_`, `:` or `-`) to follow a call through your logs and ours; otherwise the API creates one. Errors repeat it as `traceId`; quote it when you contact support.

## Response headers

| Header | Meaning |
| --- | --- |
| `API-Version` | Version that answered, such as `v1`. |
| `X-Request-ID` | Identifier of this call. |
| `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` | Your [rate limit](/en/api/rate-limits/) window. |
| `Deprecation`, `Sunset`, `Link` | Only on a version being retired. See [Versioning](/en/api/versioning/). |

## Unknown fields

Within a version, new optional fields can appear in responses at any time. Ignore the ones you don't know, and don't fail on them. In request bodies the API ignores fields it does not know, so check field names against the reference: a misspelled optional field is silently skipped.
