Enable or replace a location leave policy
The PUT location leave-policy endpoint enables a leave type in a location or replaces an already active policy. It uses the leave-policies:write scope and performs a full replacement, not a merge.
What this endpoint does
A successful call either turns on a leave policy for a leave type in a specific location or overwrites the existing active policy. The acting user is the API key owner unless you supply an X-On-Behalf-Of header. The endpoint waits for the change and returns the policy with 200, or returns 202 Accepted with an operation to poll.
Full replacement, not a merge
Every PUT replaces the whole policy. The fields daysPerYear, maxRolloverDays, quotaUnit, isApprovalRequired, hasUnlimitedDays, hideLeaveType, isReasonRequired, shortestLeaveInterval, and toil.enabled are required. Optional fields you leave out are not carried over from the active policy. If you only want to change a few fields, use the PATCH endpoint instead.
Accrual rules
If you omit accrual, the policy does not accrue. When accrual.type is an accruing type, you must also send firstEarningDate, periodStart, allowAdvanceUsage, and pauseWhenUserDeactivated. When accrual.type is NONE, periodStart is not allowed.
One-time actions
Two flags trigger side effects that are never stored or returned. Setting resetUserOverrides to true clears every per-user override of this policy in the location. Setting broughtForwardExpiration.applyToPastYear to true applies the expiry to leave rolled over from the previous year.
Strict types
The body is validated strictly. A number sent as a string, an unknown field, or an invalid JSON body fails validation.
Authentication and headers
Send the API key as Authorization: Bearer vt_live_<secret>. The key needs the leave-policies:write scope. To perform the write for another user, add X-On-Behalf-Of with that user's ID; this also requires the users:act-on-behalf scope and the key owner must manage the target user. An Idempotency-Key header makes the write safe to retry: keys are retained for 24 hours per API key, and retrying with the same key and request replays the original response.
Request body field map
Required fields: quotaUnit ("days" or "hours"), daysPerYear (0–365), maxRolloverDays (0–365), hasUnlimitedDays, isApprovalRequired, isReasonRequired, hideLeaveType, shortestLeaveInterval ("FULL-DAY", "HALF-DAY", "ONE-HOUR", "HALF-HOUR", or "FIFTEEN-MINUTES"), and toil.enabled. Optional fields: hoursPerYear (0–2920), maxRolloverHours (0–2920), allowLeaveInPast, negativeBalanceAllowed, negativeBroughtForwardAllowed, accrual, broughtForwardExpiration, and resetUserOverrides. The accrual object accepts type, capRate (0 or 0.1–10), firstEarningDate, periodStart, allowAdvanceUsage, and pauseWhenUserDeactivated. The broughtForwardExpiration object accepts enabled, month, day, afterDays, and applyToPastYear.
Worked example: a 20-day fixed quota
The supplied fixedQuota example sends quotaUnit "days", daysPerYear 20, maxRolloverDays 5, isApprovalRequired true, hasUnlimitedDays false, hideLeaveType false, isReasonRequired false, shortestLeaveInterval "HALF-DAY", and toil.enabled false. A 200 response returns the policy with locationId, leaveTypeId, isActive true, and the same quota settings. The response also includes hoursPerYear, maxRolloverHours, allowLeaveInPast, negativeBalanceAllowed, negativeBroughtForwardAllowed, accrual, broughtForwardExpiration, and toil.
Reading the responses
200 returns the enabled or replaced policy. 202 returns an operation object with id, status, and url; poll the URL until status is SUCCEEDED or FAILED. A status of UNKNOWN means no result arrived within 15 minutes, so read the resource to check whether the change was applied. 400 VALIDATION_ERROR lists the failing fields in details.fields. 403 ON_BEHALF_OF_NOT_ALLOWED means the key owner cannot act for that user. 403 FORBIDDEN means the key owner lacks permission. 403 FEATURE_NOT_IN_PLAN means the plan does not include an accruing accrual.type, toil.enabled true, or a ONE-HOUR, HALF-HOUR, or FIFTEEN-MINUTES shortestLeaveInterval; details.settings lists the unsupported settings, while settings the policy already has are accepted. 404 RESOURCE_NOT_FOUND means the location does not exist or is outside the key's data reach, or the leave type does not exist or was deleted; details.resource is location or leaveType. Idempotency-Key errors use 422 IDEMPOTENCY_KEY_REUSED, 409 IDEMPOTENCY_REQUEST_IN_PROGRESS, and 400 INVALID_IDEMPOTENCY_KEY.
PUT or PATCH: a quick decision checklist
Choose PUT when you are enabling the policy for the first time or replacing the entire policy. Choose PATCH when you only need to change a few fields and want the current accrual merged field by field. Before sending a PUT, confirm that every required field is present, that omitted optional fields are acceptable to lose, that any one-time flags are intentional, and that the plan supports the accrual, TOIL, and interval settings you are requesting.
Frequently asked questions
Should I use PUT or PATCH to change a leave policy?
Use PUT to enable a policy or replace it completely. Use PATCH when you only want to change some fields, because PATCH merges the accrual field by field with the current accrual.
What should I do when the endpoint returns 202?
Poll the operation URL until its status is SUCCEEDED or FAILED. If the status is UNKNOWN, read the resource to check whether the change was applied.
Can I safely retry a failed PUT?
Yes, if you send the same Idempotency-Key and the same request within 24 hours. The original response is replayed. Reusing the key with a different request returns 422 IDEMPOTENCY_KEY_REUSED.
Why does a valid policy still return 403 FEATURE_NOT_IN_PLAN?
The plan may not include the accruing accrual.type, toil.enabled true, or the requested ONE-HOUR, HALF-HOUR, or FIFTEEN-MINUTES shortestLeaveInterval. details.settings lists the unsupported settings. Settings the policy already has are accepted.
curl -X PUT "$API_BASE_URL/v2/locations/string/leave-policies/string" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"quotaUnit": "days",
"daysPerYear": 20,
"maxRolloverDays": 5,
"isApprovalRequired": true,
"hasUnlimitedDays": false,
"hideLeaveType": false,
"isReasonRequired": false,
"shortestLeaveInterval": "HALF-DAY",
"toil": {
"enabled": false
}
}'{
"data": {
"locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
"leaveTypeId": "leaveType-fcc1e5c5-ba93-479d-bd58-8f860ba10615",
"isActive": true,
"quotaUnit": "days",
"daysPerYear": 20,
"hoursPerYear": 160,
"maxRolloverDays": 5,
"maxRolloverHours": 40,
"hasUnlimitedDays": false,
"isApprovalRequired": true,
"isReasonRequired": false,
"hideLeaveType": false,
"allowLeaveInPast": false,
"negativeBalanceAllowed": false,
"shortestLeaveInterval": "HALF-DAY",
"negativeBroughtForwardAllowed": false,
"accrual": {
"type": "MONTHLY",
"capRate": 2,
"firstEarningDate": "2026-01-01",
"periodStart": "2026-01-01",
"allowAdvanceUsage": false,
"pauseWhenUserDeactivated": true
},
"broughtForwardExpiration": {
"enabled": true,
"month": 3,
"day": 31
},
"toil": {
"enabled": false
}
}
}{
"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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| id | string | Yes | resource ID. |
leaveTypeId
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| leaveTypeId | string | Yes | leave type ID. |
Idempotency-Key
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| Idempotency-Key | string | No | optional 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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| X-On-Behalf-Of | string | No | ID 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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| body | object | Yes | The full policy. Types are strict (for example, a number sent as a string fails validation). Optional fields you omit are not carried over from an active policy. | |
| body.quotaUnit | string | Yes | the unit the quota is set in | Allowed values: "days" | "hours" |
| body.daysPerYear | number | Yes | the yearly quota in days | 0 <= value <= 365 |
| body.hoursPerYear | number | No | the yearly quota in hours | 0 <= value <= 2920 |
| body.maxRolloverDays | number | Yes | the maximum number of unused days that roll over into the next leave year | 0 <= value <= 365 |
| body.maxRolloverHours | number | No | the maximum number of unused hours that roll over into the next leave year | 0 <= value <= 2920 |
| body.hasUnlimitedDays | boolean | Yes | whether the leave type grants unlimited leave in this location | |
| body.isApprovalRequired | boolean | Yes | whether leaves of this type need approval in this location | |
| body.isReasonRequired | boolean | Yes | whether a reason is required | |
| body.hideLeaveType | boolean | Yes | whether the leave type is hidden from users in this location when they request leave | |
| body.allowLeaveInPast | boolean | No | whether users can request leave for past dates | |
| body.negativeBalanceAllowed | boolean | No | whether a user's balance can go negative | |
| body.negativeBroughtForwardAllowed | boolean | No | whether a negative balance is brought forward into the next leave year | |
| body.shortestLeaveInterval | string | Yes | the smallest unit of leave a user can request | Allowed values: "FULL-DAY" | "HALF-DAY" | "ONE-HOUR" | "HALF-HOUR" | "FIFTEEN-MINUTES" |
| body.accrual | object | No | accrual fields to change, merged field by field with the current accrual. The merged accrual must meet the same rules as in PUT; switching to NONE drops the stored periodStart. | |
| body.accrual.type | string | Yes | the accrual type, for example NONE , WEEKLY or MONTHLY ; unknown values fail validation | |
| body.accrual.capRate | No | the accrual cap rate, 0 (no cap) or from 0.1 to 10 | ||
| body.accrual.capRate[variant1] | number | the accrual cap rate, 0 (no cap) or from 0.1 to 10 | ||
| body.accrual.capRate[variant2] | number | the accrual cap rate, 0 (no cap) or from 0.1 to 10 | 0.1 <= value <= 10 | |
| body.accrual.capRate[variant3] | number | the accrual cap rate, 0 (no cap) or from 0.1 to 10 | 0.1 <= value <= 10 | |
| body.accrual.capRate[variant4] | number | the accrual cap rate, 0 (no cap) or from 0.1 to 10 | 0.1 <= value <= 10 | |
| body.accrual.firstEarningDate | string | No | a date in YYYY-MM-DD format | ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$ |
| body.accrual.periodStart | string | No | a date in YYYY-MM-DD format | ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$ |
| body.accrual.allowAdvanceUsage | boolean | No | whether users can use leave before it is accrued | |
| body.accrual.pauseWhenUserDeactivated | boolean | No | whether accrual pauses while the user is deactivated | |
| body.broughtForwardExpiration | object | No | ||
| body.broughtForwardExpiration.enabled | boolean | Yes | whether rolled-over leave expires. Required in PUT when broughtForwardExpiration is sent. | |
| body.broughtForwardExpiration.month | integer | No | month rolled-over leave expires in, for a fixed expiry date | 1 <= value <= 12 |
| body.broughtForwardExpiration.day | integer | No | day of the month rolled-over leave expires on, for a fixed expiry date | 1 <= value <= 31 |
| body.broughtForwardExpiration.afterDays | integer | No | number of days after the leave year starts that rolled-over leave expires, instead of a fixed date | 0 <= value <= 364 |
| body.broughtForwardExpiration.applyToPastYear | boolean | No | one-time action, never stored or returned. When true, the expiry settings also apply to leave rolled over from the previous year. | |
| body.toil | object | Yes | ||
| body.toil.enabled | boolean | Yes | whether users can request TOIL for this leave type in this location. Required in PUT. true needs a plan that includes TOIL. | |
| body.toil.shortestInterval | string | No | the smallest unit of leave a user can request | "FULL-DAY" | "HALF-DAY" | "ONE-HOUR" | "HALF-HOUR" | "FIFTEEN-MINUTES" |
| body.toil.requestsAllowedForUsers | boolean | No | whether users can request TOIL themselves, not only approvers | |
| body.toil.expiration | boolean | No | whether earned TOIL expires | |
| body.toil.expirationDate | string | No | the date earned TOIL expires; an empty string means none | |
| body.toil.expirationDate[variant1] | string | a date in YYYY-MM-DD format | ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$ | |
| body.toil.expirationDate[variant2] | string | a date in YYYY-MM-DD format | ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$ | |
| body.toil.expirationDate[variant3] | string | the date earned TOIL expires; an empty string means none | ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$ | |
| body.toil.expirationDate[variant4] | unknown | the date earned TOIL expires; an empty string means none | ||
| body.toil.expirationMonths | integer | No | the number of months after which earned TOIL expires; 0 means none | 0 <= value <= 12 |
| body.resetUserOverrides | boolean | No | one-time action, never stored or returned. When true, clears every per-user override of this policy in this location. |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | |||
| response.data | object | Yes | ||
| response.data.locationId | string | Yes | the ID of the location this policy applies to | |
| response.data.leaveTypeId | string | Yes | the ID of the leave type this policy belongs to | |
| response.data.isActive | boolean | Yes | always true, because only active policies are returned | |
| response.data.quotaUnit | string | Yes | the unit the quota is set in | Allowed values: "days" | "hours" |
| response.data.daysPerYear | number | Yes | the yearly quota in days | |
| response.data.hoursPerYear | number | No | the yearly quota in hours | |
| response.data.maxRolloverDays | number | Yes | the maximum number of unused days that roll over into the next leave year | |
| response.data.maxRolloverHours | number | No | the maximum number of unused hours that roll over into the next leave year | |
| response.data.hasUnlimitedDays | boolean | Yes | whether the leave type grants unlimited leave in this location | |
| response.data.isApprovalRequired | boolean | Yes | whether leaves of this type need approval in this location | |
| response.data.isReasonRequired | boolean | Yes | whether a reason is required | |
| response.data.hideLeaveType | boolean | Yes | whether the leave type is hidden from users in this location when they request leave | |
| response.data.allowLeaveInPast | boolean | Yes | whether users can request leave for past dates | |
| response.data.negativeBalanceAllowed | boolean | Yes | whether a user's balance can go negative | |
| response.data.shortestLeaveInterval | string | Yes | the smallest unit of leave a user can request | Allowed values: "FULL-DAY" | "HALF-DAY" | "ONE-HOUR" | "HALF-HOUR" | "FIFTEEN-MINUTES" |
| response.data.negativeBroughtForwardAllowed | boolean | Yes | whether a negative balance is brought forward into the next leave year | |
| response.data.accrual | object | Yes | accrual settings. Fields that are not set are left out. | |
| response.data.accrual.type | string | Yes | the accrual type, for example NONE , WEEKLY or MONTHLY . NONE means the full quota is available at the start of the leave year. | |
| response.data.accrual.capRate | number | No | the accrual cap rate, from 0.1 to 10 | |
| response.data.accrual.firstEarningDate | string | No | the date accrual starts | Format: date |
| response.data.accrual.periodStart | string | No | the start of the first accrual period | date |
| response.data.accrual.allowAdvanceUsage | boolean | Yes | whether users can use leave before it is accrued | |
| response.data.accrual.pauseWhenUserDeactivated | boolean | Yes | whether accrual pauses while the user is deactivated | |
| response.data.broughtForwardExpiration | object | Yes | when rolled-over leave expires. A policy with no expiry of its own follows its location's; enabled true with neither a date nor afterDays means rolled-over leave expires at the end of the leave year. | |
| response.data.broughtForwardExpiration.enabled | boolean | Yes | whether rolled-over (brought forward) leave expires | |
| response.data.broughtForwardExpiration.month | integer | No | month rolled-over leave expires in, for a fixed expiry date; present only when enabled | |
| response.data.broughtForwardExpiration.day | integer | No | day of the month rolled-over leave expires on, for a fixed expiry date; present only when enabled | |
| response.data.broughtForwardExpiration.afterDays | integer | No | number of days after the leave year starts that rolled-over leave expires, instead of a fixed date; present only when enabled | |
| response.data.toil | object | Yes | TOIL settings. Fields that are not set are left out. | |
| response.data.toil.enabled | boolean | Yes | whether users can request TOIL (time off in lieu) for this leave type in this location | |
| response.data.toil.shortestInterval | string | No | the smallest unit of leave a user can request | Allowed values: "FULL-DAY" | "HALF-DAY" | "ONE-HOUR" | "HALF-HOUR" | "FIFTEEN-MINUTES" |
| response.data.toil.requestsAllowedForUsers | boolean | No | whether users can request TOIL themselves, not only approvers | |
| response.data.toil.expiration | boolean | No | whether earned TOIL expires | |
| response.data.toil.expirationDate | string | No | the date earned TOIL expires | date |
| response.data.toil.expirationMonths | integer | No | the number of months after which earned TOIL expires |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Returned 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.operation | object | Yes | ||
| response.operation.id | string | Yes | ||
| response.operation.status | string | Yes | operation 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.url | string | Yes |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |