Skip to content

List leaves between two dates

This endpoint returns a paginated list of leave requests that overlap a date window. Results are limited to the users the API key can reach. The key needs leaves:read, and every leave record uses the same shape as in API v1.

Request contract

The method is GET and the path is /v2/leaves. Authentication uses a bearer token in the Authorization header, and the minimum scope is leaves:read. The complete request and response shapes, including every field name and enum value, are delivered in the protected contract modules referenced below.

Query parameters

startDate and endDate are required and use YYYY-MM-DD. endDate cannot fall before startDate. status is optional, is matched case-insensitively, defaults to APPROVED, and accepts one value per request from APPROVED, OPEN, DENIED, CANCELLED, EXPIRED or DELETED. limit is optional, ranges from 1 to 1000, and defaults to 200. nextToken is optional and must be the token returned by the previous call, sent with the same filters. expand is optional and takes a comma-separated list from user, approver and leaveType.

Pagination behaviour

A page is not a fixed-size slice of the result set. The key's data reach is filtered in after each page is read, so a single page may contain fewer than limit leaves, or none at all, and still carry a nextToken. Continue requesting pages until nextToken is absent. When the key owner can see only their own data, all of their own leaves arrive in one page with no nextToken. A token that this API did not issue fails with 400 INVALID_PAGINATION_TOKEN.

Scopes and field visibility

reason and statusReason are the reason the user gave and the reason the approver gave. Both need leaves:read-reason in addition to leaves:read. Without that scope both come back as null and every other field is unchanged, which is still enough to tell who is away, when, and whether the request was approved. Each expand value needs the read scope of the resource it embeds: user and approver need users:read, and leaveType needs leave-types:read. Without the scope the request fails with 403 INSUFFICIENT_SCOPE, and details.expand names the values that asked for it. userId, approverId and leaveTypeId are always returned, so a key with only leaves:read can still match leaves to users and leave types by ID. An embedded user or approver also carries location and department, which the request never named. If the key lacks locations:read or departments:read, the request still succeeds but that nested object is dropped; locationId and departmentId stay. With expand=leaveType, a key without leave-types:read-hidden gets Hidden Leave Type as leaveType.name for leaves whose leave policy hides the leave type; leaveTypeId is always returned.

Scope decision table

Use this table to decide which scopes to add to a key before calling the endpoint.

Worked example

A request with startDate=2023-02-03, endDate=2023-03-03 and expand=user,leaveType returns leaves that overlap that window. In the captured response sample, the first leave runs from 2026-11-09 to 2026-11-13, is a full-day APPROVED leave of 5 calendar days and 5 working days, and carries a reason of "Family trip". The second leave is a part-day APPROVED leave on 2026-11-12 from 09:00 to 13:00, is not a full-day leave, and has an empty reason string. The response also includes a nextToken, so the caller must continue until that field is absent.

Error handling

A 400 VALIDATION_ERROR covers a missing or invalid startDate, endDate, status, limit or expand, or an endDate before startDate; details.fields lists the offending fields. A 400 INVALID_PAGINATION_TOKEN means the token was not issued by this API. A 403 INSUFFICIENT_SCOPE means an expand value needs a read scope the key does not have. A 401 UNAUTHORIZED means the API key is missing, malformed or not recognized. A 429 RATE_LIMITED means too many requests were sent in a short time; wait a few seconds and retry. A 500 INTERNAL_ERROR means something went wrong on the server side; retry later and quote the requestId if the problem persists.

Pre-flight checklist

  1. Confirm the key has leaves:read. 2. Add leaves:read-reason if reason and statusReason are needed. 3. Add users:read for expand=user or expand=approver, and leave-types:read for expand=leaveType. 4. Add locations:read and departments:read if the nested location and department objects are needed. 5. Add leave-types:read-hidden if hidden leave type names must be visible. 6. Send startDate and endDate in YYYY-MM-DD with endDate not before startDate. 7. Loop on nextToken until it is absent, reusing the same filters. 8. Treat a short page as normal and do not stop early.
Scope decision table
Field or expansionScope requiredEffect when missing
Base leave listleaves:readRequest rejected
reason and statusReasonleaves:read-reasonBoth return null; other fields unchanged
expand=userusers:read403 INSUFFICIENT_SCOPE
expand=approverusers:read403 INSUFFICIENT_SCOPE
expand=leaveTypeleave-types:read403 INSUFFICIENT_SCOPE
Nested location on embedded user or approverlocations:readNested object dropped; locationId stays
Nested department on embedded user or approverdepartments:readNested object dropped; departmentId stays
Hidden leave type nameleave-types:read-hiddenleaveType.name returns Hidden Leave Type; leaveTypeId stays

Scopes apply to the key used for the request. The table reflects the documented behaviour of this endpoint.

Frequently asked questions

Why does a page contain fewer leaves than the limit I set?

The limit you pass does not guarantee that many rows come back. Access filtering for the key happens only after a page has been assembled, so a response can be short — or contain no leaves at all — and still include a nextToken. Treat the presence of nextToken, not the row count, as the signal to fetch another page, and stop only once that field is gone.

What is the difference between a 400 VALIDATION_ERROR and a 403 INSUFFICIENT_SCOPE?

A 400 VALIDATION_ERROR means a query parameter is missing or invalid, or endDate falls before startDate; details.fields lists the offending fields. A 403 INSUFFICIENT_SCOPE means an expand value needs a read scope the key does not have; details.expand names the values that asked for it.

Can I match leaves to users and leave types without expand?

Yes. userId, approverId and leaveTypeId are always returned, so a key with only leaves:read can still match leaves to users and leave types by ID.

Why are reason and statusReason null?

Both fields need leaves:read-reason on top of leaves:read. Without it both come back as null and every other field is unchanged.

What happens to the nested location and department when I expand user or approver?

An embedded user or approver also carries location and department, which the request never named. If the key lacks locations:read or departments:read, the request still succeeds but that nested object is dropped; locationId and departmentId stay.

What does leaveType.name return when the leave policy hides the leave type?

With expand=leaveType, a key without leave-types:read-hidden gets Hidden Leave Type as leaveType.name for leaves whose leave policy hides the leave type. leaveTypeId is always returned.

curl -X GET "$API_BASE_URL/v2/leaves?startDate=2023-02-03&endDate=2023-03-03&expand=user%2CleaveType" \
  -H "Authorization: Bearer "
{
  "data": [
    {
      "id": "leaveRequest-cfe5d39b-f1f0-45aa-85cd-ce93e637a262",
      "userId": "user-63b17e97-d38b-4586-8498-bb4f5d2e2c14",
      "approverId": "user-0f3a9c1e-6c2b-4a5d-9e7f-1b2c3d4e5f60",
      "autoApproved": false,
      "durationCalendarDays": 5,
      "durationWorkingDays": 5,
      "startDate": "2026-11-09",
      "endDate": "2026-11-13",
      "isFullDayLeave": true,
      "leaveTypeId": "leaveType-fcc1e5c5-ba93-479d-bd58-8f860ba10615",
      "locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
      "departmentId": "team-0a21c25e-6925-4a5b-90ee-ecf82096c4f6",
      "status": "APPROVED",
      "reason": "Family trip",
      "statusReason": null,
      "approvedLevel": null,
      "createdAt": "2026-10-01T09:12:40.062Z"
    },
    {
      "id": "leaveRequest-7a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "userId": "user-cfe5d39b-f1f0-45aa-85cd-ce93e637a262",
      "autoApproved": true,
      "durationCalendarDays": 1,
      "durationWorkingDays": 0.5,
      "startDate": "2026-11-12",
      "endDate": "2026-11-12",
      "isFullDayLeave": false,
      "startHour": 9,
      "endHour": 13,
      "startMinute": 0,
      "endMinute": 0,
      "leaveTypeId": "leaveType-88681ca1-4a47-4e4d-bc35-ffff86c0f54e",
      "locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
      "departmentId": "team-0a21c25e-6925-4a5b-90ee-ecf82096c4f6",
      "status": "APPROVED",
      "reason": "",
      "statusReason": null,
      "approvedLevel": null,
      "createdAt": "2026-10-02T14:03:11.410Z"
    }
  ],
  "nextToken": "eyJjb21wYW55SWQiOiJjNmFmOWFjNiJ9"
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "name": "ValidationError",
    "description": "Example post details.",
    "resolution": "Fix the fields listed in details.fields and send the request again.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
    "details": {
      "fields": [
        {
          "path": "startDate",
          "message": "\"startDate\" is required"
        }
      ]
    }
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "name": "Unauthorized",
    "description": "Example post details.",
    "resolution": "Send a valid API key in the Authorization header as Bearer followed by the full vt_live_ key.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
  }
}
{
  "error": {
    "code": "INSUFFICIENT_SCOPE",
    "name": "InsufficientScope",
    "description": "Example post details.",
    "resolution": "Add the scopes listed in details.requiredScopes to the key in the OnlyLeave dashboard.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
    "details": {
      "requiredScopes": [
        "leaves:write"
      ]
    }
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "name": "RateLimited",
    "description": "Example post details.",
    "resolution": "Wait a few seconds and retry, using the same Idempotency-Key for writes.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "name": "InternalError",
    "description": "Example post details.",
    "resolution": "Retry later, and if it keeps happening, contact OnlyLeave support and quote the requestId.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
  }
}

startDate

FieldTypeRequiredDescriptionConstraints
startDatestringYesdate in YYYY-MM-DD format.Format: date

endDate

FieldTypeRequiredDescriptionConstraints
endDatestringYesdate in YYYY-MM-DD format, can't be before the startDate.Format: date

status

FieldTypeRequiredDescriptionConstraints
statusstringNoleave request status, by default 'APPROVED'."APPROVED"
Allowed values: "APPROVED" | "OPEN" | "DENIED" | "CANCELLED" | "EXPIRED" | "DELETED"

limit

FieldTypeRequiredDescriptionConstraints
limitintegerNoa number of items to return per page, between 1 and 1000, default is 200. The number of returned items might be less than the provided limit even when more pages exist; rely on nextToken . Same semantics as the v1 limit parameter.200
1 <= value <= 1000

nextToken

FieldTypeRequiredDescriptionConstraints
nextTokenstringNoThe nextToken returned by the previous API call. Send the same filters as in the previous call. Same semantics as the v1 nextToken parameter; a token that was not issued by this API fails with 400 INVALID_PAGINATION_TOKEN .

expand

FieldTypeRequiredDescriptionConstraints
expandarray<string>Noa comma-separated list of related resources to include in each leave. Options: user (the person on leave, requires users:read ), approver (who approved or denied it, requires users:read ) and leaveType (the leave type, requires leave-types:read ). Each value needs the read scope of the resource it embeds.Allowed values: "user" | "approver" | "leaveType"
expand[]stringAllowed values: "user" | "approver" | "leaveType"

response

FieldTypeRequiredDescriptionConstraints
responseobject
response.dataarray<Leave>No
response.data[]object
response.data[].idstringYesleave ID
response.data[].userIdstringYesan ID of the user on leave
response.data[].approverIdstringNoan ID of the approver, only when the leave request is approved; absent otherwise
response.data[].autoApprovedbooleanNois the leave request automatically approved or not
response.data[].durationCalendarDaysnumberYesthe duration of a leave in calendar days
response.data[].durationWorkingDaysnumberYesthe duration of a leave in working/business days
response.data[].startDatestringYesdate in YYYY-MM-DD formatFormat: date
response.data[].endDatestringYesdate in YYYY-MM-DD formatFormat: date
response.data[].isFullDayLeavebooleanYestrue if the leave is a full day leave (1 or multiple days), or false if it is a part day leave (half day or hourly)
response.data[].startHournumberNostart hour in the user's time zone (in 24h format) for the part day leave, returned only when isFullDayLeave is false
response.data[].endHournumberNoend hour in the user's time zone (in 24h format) for the part day leave, returned only when isFullDayLeave is false
response.data[].startMinutenumberNostart minutes in the user's time zone for the part day leave, returned only when isFullDayLeave is false
response.data[].endMinutenumberNoend minutes in the user's time zone for the part day leave, returned only when isFullDayLeave is false
response.data[].leaveTypeIdstringYesthe ID of the leave type of the leave
response.data[].locationIdstringYesthe ID of the user's location when the leave request was sent
response.data[].departmentIdstringYesthe ID of the user's department when the leave request was sent
response.data[].statusstringYesleave request statusAllowed values: "APPROVED" | "OPEN" | "DENIED" | "CANCELLED" | "EXPIRED" | "DELETED"
response.data[].reasonstring | nullYesthe reason the user gave for the leave, an empty string when none was given. Requires the leaves:read-reason scope; without it the value is null .
response.data[].reason[variant1]stringthe reason the user gave for the leave, an empty string when none was given. Requires the leaves:read-reason scope; without it the value is null .
response.data[].reason[variant2]nullthe reason the user gave for the leave, an empty string when none was given. Requires the leaves:read-reason scope; without it the value is null .
response.data[].statusReasonstring | nullYesthe reason given when the leave was denied or cancelled, null when none was given. Requires the leaves:read-reason scope; without it the value is null .
response.data[].statusReason[variant1]stringthe reason given when the leave was denied or cancelled, null when none was given. Requires the leaves:read-reason scope; without it the value is null .
response.data[].statusReason[variant2]nullthe reason given when the leave was denied or cancelled, null when none was given. Requires the leaves:read-reason scope; without it the value is null .
response.data[].approvedLevelstring | nullYesthe approval level reached in a department with multi-level approval, null otherwise. An OPEN leave with approvedLevel FIRST is waiting for the second-level approver."FIRST" | "SECOND" | "THIRD" | null
response.data[].approvedLevel[variant1]stringthe approval level reached in a department with multi-level approval, null otherwise. An OPEN leave with approvedLevel FIRST is waiting for the second-level approver."FIRST" | "SECOND" | "THIRD" | null
response.data[].approvedLevel[variant2]nullthe approval level reached in a department with multi-level approval, null otherwise. An OPEN leave with approvedLevel FIRST is waiting for the second-level approver."FIRST" | "SECOND" | "THIRD" | null
response.data[].createdAtstringYesa timestamp in the ISO 8601 formatdate-time
response.data[].userobjectNothe user on leave (only when expand includes user)
response.data[].user.idstringYesuser ID
response.data[].user.namestringYesuser name
response.data[].user.emailstringYesuser email
response.data[].user.isAdminbooleanYesa boolean that tells you if the selected user is an admin
response.data[].user.locationIdstring | nullYesthe ID of the user's location, null when the user has none yet
response.data[].user.locationId[variant1]stringthe ID of the user's location, null when the user has none yet
response.data[].user.locationId[variant2]nullthe ID of the user's location, null when the user has none yet
response.data[].user.departmentIdstring | nullYesthe ID of the user's department, null when the user has none yet
response.data[].user.departmentId[variant1]stringthe ID of the user's department, null when the user has none yet
response.data[].user.departmentId[variant2]nullthe ID of the user's department, null when the user has none yet
response.data[].user.statusstringYesuser status"ACTIVE" | "INACTIVE" | "DELETED"
response.data[].user.employeeIdstring | nullYesthe employee ID set on the user profile page, null when it is not set
response.data[].user.employeeId[variant1]stringthe employee ID set on the user profile page, null when it is not set
response.data[].user.employeeId[variant2]nullthe employee ID set on the user profile page, null when it is not set
response.data[].user.startDatestring | nullYesemployment start date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].user.startDate[variant1]stringemployment start date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].user.startDate[variant2]nullemployment start date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].user.endDatestring | nullYesemployment end date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].user.endDate[variant1]stringemployment end date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].user.endDate[variant2]nullemployment end date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].user.labelsarray<object>Yeslabels assigned to the user
response.data[].user.labels[]object
response.data[].user.labels[].idstringYes
response.data[].user.labels[].namestringYes
response.data[].user.labels[].colorstringYes
response.data[].user.locationobjectNothe user's location (only when expand includes location)
response.data[].user.location.idstringYeslocation ID
response.data[].user.location.namestringYeslocation name
response.data[].user.location.timezonestringNothe location's IANA time zone, left out when none is stored
response.data[].user.location.isDefaultbooleanYeswhether this is the company's default location
response.data[].user.location.createdAtstringYesa timestamp in the ISO 8601 formatdate-time
response.data[].user.departmentobjectNothe user's department (only when expand includes department)
response.data[].user.department.idstringYesdepartment ID
response.data[].user.department.namestringYesdepartment name
response.data[].user.department.isDefaultbooleanYeswhether this is the company's default department
response.data[].user.department.createdAtstringYesa timestamp in the ISO 8601 formatdate-time
response.data[].user.holidaysarray<HolidayYear>Nopublic holidays for the user's location, grouped by year (only when expand includes holidays)
response.data[].user.holidays[]object
response.data[].user.holidays[].yearintegerNothe year for the holidays
response.data[].user.holidays[].holidaysarray<object>No
response.data[].user.holidays[].holidays[]object
response.data[].user.holidays[].holidays[].idstringNoholiday ID
response.data[].user.holidays[].holidays[].namestringNoholiday name
response.data[].user.holidays[].holidays[].datestringNodate in YYYY-MM-DD formatdate
response.data[].user.holidays[].holidays[].isHalfDaybooleanNowhether it is a half-day holiday
response.data[].approverobjectNothe approver, including location and department (only when expand includes approver)
response.data[].approver.idstringYesuser ID
response.data[].approver.namestringYesuser name
response.data[].approver.emailstringYesuser email
response.data[].approver.isAdminbooleanYesa boolean that tells you if the selected user is an admin
response.data[].approver.locationIdstring | nullYesthe ID of the user's location, null when the user has none yet
response.data[].approver.locationId[variant1]stringthe ID of the user's location, null when the user has none yet
response.data[].approver.locationId[variant2]nullthe ID of the user's location, null when the user has none yet
response.data[].approver.departmentIdstring | nullYesthe ID of the user's department, null when the user has none yet
response.data[].approver.departmentId[variant1]stringthe ID of the user's department, null when the user has none yet
response.data[].approver.departmentId[variant2]nullthe ID of the user's department, null when the user has none yet
response.data[].approver.statusstringYesuser status"ACTIVE" | "INACTIVE" | "DELETED"
response.data[].approver.employeeIdstring | nullYesthe employee ID set on the user profile page, null when it is not set
response.data[].approver.employeeId[variant1]stringthe employee ID set on the user profile page, null when it is not set
response.data[].approver.employeeId[variant2]nullthe employee ID set on the user profile page, null when it is not set
response.data[].approver.startDatestring | nullYesemployment start date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].approver.startDate[variant1]stringemployment start date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].approver.startDate[variant2]nullemployment start date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].approver.endDatestring | nullYesemployment end date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].approver.endDate[variant1]stringemployment end date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].approver.endDate[variant2]nullemployment end date as stored, an ISO 8601 date or timestamp (the same value v1 returns), null when it is not set
response.data[].approver.labelsarray<object>Yeslabels assigned to the user
response.data[].approver.labels[]object
response.data[].approver.labels[].idstringYes
response.data[].approver.labels[].namestringYes
response.data[].approver.labels[].colorstringYes
response.data[].approver.locationobjectNothe user's location (only when expand includes location)
response.data[].approver.location.idstringYeslocation ID
response.data[].approver.location.namestringYeslocation name
response.data[].approver.location.timezonestringNothe location's IANA time zone, left out when none is stored
response.data[].approver.location.isDefaultbooleanYeswhether this is the company's default location
response.data[].approver.location.createdAtstringYesa timestamp in the ISO 8601 formatdate-time
response.data[].approver.departmentobjectNothe user's department (only when expand includes department)
response.data[].approver.department.idstringYesdepartment ID
response.data[].approver.department.namestringYesdepartment name
response.data[].approver.department.isDefaultbooleanYeswhether this is the company's default department
response.data[].approver.department.createdAtstringYesa timestamp in the ISO 8601 formatdate-time
response.data[].approver.holidaysarray<HolidayYear>Nopublic holidays for the user's location, grouped by year (only when expand includes holidays)
response.data[].approver.holidays[]object
response.data[].approver.holidays[].yearintegerNothe year for the holidays
response.data[].approver.holidays[].holidaysarray<object>No
response.data[].approver.holidays[].holidays[]object
response.data[].approver.holidays[].holidays[].idstringNoholiday ID
response.data[].approver.holidays[].holidays[].namestringNoholiday name
response.data[].approver.holidays[].holidays[].datestringNodate in YYYY-MM-DD formatdate
response.data[].approver.holidays[].holidays[].isHalfDaybooleanNowhether it is a half-day holiday
response.data[].leaveTypeobjectNothe leave type (only when expand includes leaveType)
response.data[].leaveType.idstringYes
response.data[].leaveType.namestringYes
response.data[].leaveType.isDefaultbooleanYes
response.nextTokenstringNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo