Skip to content

Deny an open leave request via the API

Use this endpoint when an approver needs to refuse a leave that is still waiting for a decision. It records an optional explanation for the employee, and it can complete immediately or hand back a pollable operation when the write takes longer.

Endpoint and authentication

Send a POST to the deny route for the leave identifier, with bearer authentication and the leaves:approve scope. The full operation contract, including method, path, security, parameters, request body, and documented status codes, is defined in protected module schema0004. The worked request example is protected module code0001, using the source-owned $API_BASE_URL origin token.

Pre-flight checklist

Before calling, work through this checklist:

  • Confirm the leave is still OPEN, because a leave that has already moved on cannot be denied this way.
  • Confirm the acting user is an approver or substitute approver for the employee's department, a location admin, or an admin.
  • Confirm the API key carries leaves:approve, and, if acting for someone else, the users:act-on-behalf scope plus a managed target user.
  • Decide whether to include a short denial explanation, and keep it free of HTML- or script-like text.
  • Add an Idempotency-Key for any write you may need to retry.
  • Plan for both outcomes: a direct 200 leave response, or a 202 operation to poll.

Inputs you control

The path parameter id is required and identifies the leave resource; see protected module schema0001. The optional Idempotency-Key header is defined in schema0002, and the optional X-On-Behalf-Of header is defined in schema0003. The optional JSON body is defined in schema0008: its only field is reason, which may be empty and is stored as statusReason. A concrete illustration is a denial for capacity reasons, such as the team being at capacity that week, which shows how the explanation travels separately from the employee's original leave reason.

Reading the result: 200 versus 202

On success with 200, the response wraps the updated leave in data; the leave shape is defined in schema0009 and illustrated by protected module code0002. On 202, the response instead carries an operation with id, status, and url, as defined in schema0010 and illustrated by code0003; poll that URL until the status is SUCCEEDED or FAILED. If the status is UNKNOWN, no result arrived within 15 minutes, so read the leave again before assuming the denial landed. Note that reason and statusReason in the leave payload depend on the leaves:read-reason scope, without which they are returned as null.

Failures and how to tell them apart

Keep these failures distinct, because each points to a different fix:

  • 400 VALIDATION_ERROR: a parameter, body field, or header failed validation; inspect details.fields, as illustrated by code0004.
  • 401 UNAUTHORIZED: the key is missing, malformed, or unrecognized; send the full bearer key, as in code0005.
  • 403: either the key lacks a required scope, the acting user cannot approve this employee's leaves, or acting on behalf is not allowed. The insufficient-scope shape is illustrated by code0006.
  • 404 RESOURCE_NOT_FOUND: the leave does not exist or sits outside the key's data reach, as in code0007.
  • 409 CONFLICT: the request conflicts with the current state; read the resource again and retry with up-to-date values, as in code0008.
  • 422 LEAVE_REQUEST_NOT_OPEN: the leave is no longer OPEN, which is different from a generic conflict because the state change itself blocks denial.
  • 429 RATE_LIMITED: too many requests in a short time; wait and retry writes with the same Idempotency-Key, as in code0010.
  • 500 INTERNAL_ERROR: a server-side failure; retry later and quote the requestId if it persists, as in code0011.

Every error uses the envelope defined in schema0011, with code, name, description, resolution, and requestId.

Deny versus approve versus cancel

Denying is not the same as approving or cancelling. Approval moves an OPEN leave toward approval, while cancellation can apply to OPEN or APPROVED leaves and follows different actor rules. Choose deny only when the decision is a refusal of a still-open request, and use the neighbouring approve and cancel operations for their respective outcomes.

Frequently asked questions

Is a denial reason required?

No. The body is optional, and reason may be empty. If you supply it, it is saved as statusReason and shown to the employee. Text that looks like HTML or script fails validation.

Can I deny a leave that is no longer OPEN?

Yes, in effect. The leave must still be OPEN. If it has already been approved, denied, cancelled or otherwise left that state, the call returns 422 LEAVE_REQUEST_NOT_OPEN.

What is the difference between a 200 and a 202 response?

A 200 response returns the leave directly. A 202 response means the write is still running or its result cannot yet be read back, so poll the operation URL until it reports SUCCEEDED or FAILED. UNKNOWN means no result arrived within 15 minutes and the change may or may not have been applied, so read the leave to check.

How should retries be handled with Idempotency-Key?

Use a 1 to 255 character printable ASCII key. Repeating the same key with the same request within 24 hours replays the original response, reusing it for a different request returns 422 IDEMPOTENCY_KEY_REUSED, and retrying while the first request is still running returns 409 IDEMPOTENCY_REQUEST_IN_PROGRESS.

Who is allowed to deny a leave?

Eligibility is judged by who is acting — the key owner, or the person named in X-On-Behalf-Of. That actor needs to be an approver or substitute approver for the employee's department, a location admin, or an admin. When you delegate through X-On-Behalf-Of, the key itself also needs the users:act-on-behalf scope and the key owner needs to manage the named user; without that setup the call is rejected with 403 ON_BEHALF_OF_NOT_ALLOWED.

curl -X POST "$API_BASE_URL/v2/leaves/string/deny" \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Team is at capacity that week"
  }'
{
  "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"
  }
}
{
  "operation": {
    "id": "pa_3f1c2b9e-8a47-4d5e-9c61-2b7f0e4a1d93",
    "status": "PENDING",
    "url": "/v2/operations/pa_3f1c2b9e-8a47-4d5e-9c61-2b7f0e4a1d93"
  }
}
{
  "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": "RESOURCE_NOT_FOUND",
    "name": "ResourceNotFound",
    "description": "Example post details.",
    "resolution": "Check the ID of the resource named in details.resource and that the key owner can see it.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
  }
}
{
  "error": {
    "code": "CONFLICT",
    "name": "Conflict",
    "description": "Example post details.",
    "resolution": "Read the resource again and retry with up-to-date values.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
  }
}
{
  "error": {
    "code": "LEAVE_NEGATIVE_BALANCE",
    "name": "LeaveNegativeBalance",
    "description": "Example post details.",
    "resolution": "Shorten the leave, use a different leave type, or ask an admin to adjust the quota.",
    "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
  }
}
{
  "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"
  }
}

id

FieldTypeRequiredDescriptionConstraints
idstringYesresource ID.

Idempotency-Key

FieldTypeRequiredDescriptionConstraints
Idempotency-KeystringNooptional key (1 to 255 printable ASCII characters) that makes a write request safe to retry. Keys are retained for 24 hours per API key. Retrying with the same key and the same request within those 24 hours replays the original response (with the Idempotent-Replayed header). Reusing the key with a different request returns 422 IDEMPOTENCY_KEY_REUSED ; retrying while the first request is still running returns 409 IDEMPOTENCY_REQUEST_IN_PROGRESS ; an invalid key returns 400 INVALID_IDEMPOTENCY_KEY .1 <= length <= 255

X-On-Behalf-Of

FieldTypeRequiredDescriptionConstraints
X-On-Behalf-OfstringNoID of the user the write is performed for. Requires the users:act-on-behalf scope, and the key owner must manage the target user; otherwise the request fails with 403 ON_BEHALF_OF_NOT_ALLOWED . Ignored on GET requests.

body

FieldTypeRequiredDescriptionConstraints
bodyobjectNo
body.reasonstringNooptional reason for the decision, may be empty; stored as statusReason. On leaves, text that looks like HTML or script fails validation.

response

FieldTypeRequiredDescriptionConstraints
responseobject
response.dataobjectNo
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

FieldTypeRequiredDescriptionConstraints
responseobjectReturned with HTTP 202 when a write operation is still running, or succeeded but its result could not be read back yet. The Location header carries the same URL as operation.url . Poll it until the status is SUCCEEDED or FAILED .
response.operationobjectYes
response.operation.idstringYes
response.operation.statusstringYesoperation status. UNKNOWN means no result arrived within 15 minutes; the change may or may not have been applied, so read the resource to check. A result that arrives later still changes it to SUCCEEDED or FAILED.Allowed values: "PENDING" | "SUCCEEDED" | "FAILED" | "UNKNOWN"
response.operation.urlstringYes

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

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