Errors
The shape of every error, what each code means and what to do about it.
Every refusal of the API is a problem in the RFC 9457 format, sent as
application/problem+json. One field tells you what went wrong: code. This page
lists every code the API can send, with what to do about it.
The problem
{
"type": "https://docs.schedulinq.com/en/api/errors#errors.api.insufficientScope",
"title": "Forbidden",
"status": 403,
"detail": "This API key does not have the scope this operation needs.",
"instance": "/api/v1/users",
"code": "errors.api.insufficientScope",
"requestId": "3f0c8a52-6b1e-4d7a-9c3e-1a2b3c4d5e0b",
"requiredScope": "users:read"
}
| Field | What it holds |
|---|---|
type | A link to the code's entry on this page. |
title | The HTTP status's name. |
status | The HTTP status code. |
detail | An English sentence for a person reading the log. |
instance | The request's path, without the query string. |
code | The code: what to branch on. |
errors[] | On a refused field: one entry per field, with field, code and message. At most 50; truncated: true when there were more. |
requestId | The request's id. |
requiredScope | On a 403 errors.api.insufficientScope: the scope the key lacks. |
Branch on code, and on the code of each errors[] entry — never on title,
detail or message. Those are English sentences, and their wording may change.
Every answer carries an X-Request-Id header. Send your own (1 to 128 characters of
A-Z, a-z, 0-9, ., _ and -) and it comes back; otherwise you get one. Quote it
when you write to support@schedulinq.com.
Status codes
The API answers 400, 401, 402, 403, 404, 405, 409, 413, 415, 422, 429 and 500. A 404 is also the answer for an id that belongs to another organisation. A very large burst can be answered with a 503 before it reaches the API: retry it with backoff.
A refusal is replayed
A refused POST replays its refusal for 24 hours to a retry with the same
Idempotency-Key. Fix the cause, then send a new key. See
Idempotency.
Authentication and limits
errors.api.apiKeyMissing
401Send your API key in the Authorization header: Authorization: Bearer sq_live_...
Send the key as Authorization: Bearer sq_live_…. See
Authentication.
Returned by: every endpoint
errors.api.apiKeyInvalid
401The API key is not valid. Check that you copied the whole key.
Check that the whole key arrived, without spaces or line breaks.
Returned by: every endpoint
errors.api.apiKeyRevoked
401This API key has been revoked. Ask an admin of the organisation for a new key.
An admin revoked the key. Ask for a new one; retrying will not help.
Returned by: every endpoint
errors.api.apiKeyExpired
401This API key has expired. Ask an admin of the organisation for a new key.
The key passed its last valid day. Ask an admin for a new one.
Returned by: every endpoint
errors.api.insufficientScope
403This API key does not have the scope this operation needs.
requiredScope names the scope the key lacks. An admin creates a key that has it.
Returned by: every endpoint
errors.api.forbidden
403This API key may not do this.
errors.api.tooManyFailedAuthentications
429Too many failed authentications from this address. Wait for the number of seconds in Retry-After before trying again.
Wait for Retry-After, then fix the key before you try again. A valid key is never
refused by this limit.
Returned by: every endpoint
errors.api.rateLimitExceeded
429Too many requests for this API key. Wait for the number of seconds in Retry-After and try again.
Wait for Retry-After and retry with the same Idempotency-Key. See Rate
limits.
Returned by: every endpoint
errors.api.customerInvitationLimit
429This customer has received the maximum number of invitations through the API for now. Try again later.
Wait for Retry-After. Ten invitations to one customer a day is plenty; more usually
means a loop in your system.
Returned by: POST /api/v1/invitations
errors.api.colleagueInvitationLimit
429The organisation has sent the maximum number of colleague invitations through the API for now. Wait for the number of seconds in Retry-After and try again.
Wait for Retry-After. Repeats count too, so do not retry in a tight loop.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend
errors.api.requestTooLarge
413The request body is larger than 256 KB.
No API request needs this much. Check what your system puts in the body.
Requests the API cannot route or read
errors.api.resourceNotFound
404There is no resource at this path.
Check the path against the reference.
Returned by: POST /api/v1/users/invitations/{id}/resend
errors.api.methodNotSupported
405This path does not support this HTTP method. The Allow header lists the methods it does support.
errors.api.mediaTypeNotSupported
415Send the request body as application/json and accept application/json.
Send Content-Type: application/json.
errors.api.badRequest
400The request could not be processed.
errors.api.invalidRequestBody
400The request body is not valid JSON.
errors.api.invalidParameter
400A parameter has a value of the wrong type.
Returned by: GET /api/v1/users, POST /api/v1/users, GET /api/v1/services, GET /api/v1/roles, POST /api/v1/planning-links, GET /api/v1/invitations, POST /api/v1/invitations, GET /api/v1/appointments
errors.api.missingParameter
400A required parameter is missing.
errors.api.unexpectedError
500Something went wrong on our side. Try again later; if it keeps happening, contact support with the requestId.
Retry with backoff. If it keeps happening, send the requestId to
support@schedulinq.com.
Returned by: every endpoint
Not found and conflicts
errors.api.appointmentNotFound
404This appointment does not exist, or it belongs to another organisation.
Also the answer for another organisation's id.
Returned by: GET /api/v1/appointments/{id}
errors.api.invitationNotFound
404This invitation could not be found.
Also the answer for another organisation's id.
Returned by: GET /api/v1/invitations/{id}
errors.api.colleagueNotFound
404No colleague of this organisation has this id or e-mail address.
Check the id or e-mail address with GET /api/v1/users.
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.serviceNotFound
404This service does not exist, or it is archived.
Check the id with GET /api/v1/services.
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.customerNotFound
404No customer of this organisation has this id.
Also the answer for an archived customer and for another organisation's id. A customer that was merged into another is followed to that one, not refused.
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.colleagueNotActive
409This colleague can't be booked: they have not accepted their invitation yet, or they are deactivated, archived or not schedulable.
The team member has not accepted their invitation yet, or is deactivated or archived.
After fixing it, send a new Idempotency-Key: the same key replays this refusal for 24
hours.
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.customerDeactivated
409This customer is deactivated and can't book online. Reactivate them in Schedulinq first.
Reactivate the customer in Schedulinq, then send a new Idempotency-Key.
Returned by: POST /api/v1/invitations
errors.api.conflict
409The resource was changed by another request at the same time. Try again.
Retry with the same Idempotency-Key; this refusal is not stored.
Team members and seats
errors.api.colleagueArchived
409An archived colleague of this organisation has this e-mail address. Restore them in Schedulinq, or invite with another address.
Restore the team member in Schedulinq, or invite with another address.
Returned by: POST /api/v1/users
errors.api.emailInUseElsewhere
409This e-mail address belongs to a Schedulinq account outside this organisation. Invite the colleague with another address; a plus-alias such as name+yourcompany@example.com works.
The other organisation is never named. Invite with another address. A plus-address such
as piet+ov@… counts as a different address. See
Colleagues.
Returned by: POST /api/v1/users
errors.api.roleNotAssignable
403This API key may not give this role. Use one of the roles the key may assign (GET /api/v1/roles).
The role is not among the key's roles, was deleted, or belongs to another organisation.
This problem has no errors[].
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend
errors.api.colleagueInvitationAccepted
409This invitation has already been accepted: the colleague is in the organisation.
Nothing to resend: the team member is in the organisation.
Returned by: POST /api/v1/users/invitations/{id}/resend
errors.api.noSeatsAvailable
409The organisation has no free seat for another user. An admin can add seats under Billing.
The paid seats are full, pending invitations included. The API never buys a seat; an
admin adds one in Schedulinq. After fixing it, send a new Idempotency-Key: the same
key replays this refusal for 24 hours.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend
errors.api.trialUserLimit
402The organisation is on a trial and cannot add more users.
The trial ended without a subscription, or the subscription lapsed. Every create answers
this until an admin fixes it. After fixing it, send a new Idempotency-Key: the same
key replays this refusal for 24 hours.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend
errors.api.organisationScheduledForDeletion
409This organisation is scheduled for deletion and accepts no changes.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend, POST /api/v1/planning-links, POST /api/v1/invitations
Idempotency
errors.api.idempotencyKeyRequired
400Send an Idempotency-Key header with this request, a unique value per operation.
See Idempotency.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend, POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.idempotencyKeyTooLong
400The Idempotency-Key header is longer than 255 characters.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend, POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.idempotencyKeyReused
422This Idempotency-Key was already used for a different request. Use a new key for a new request.
Make a new key for a new request; reuse a key only to retry the same one.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend, POST /api/v1/planning-links, POST /api/v1/invitations
errors.api.duplicateRequestInProgress
409A request with this Idempotency-Key is still being processed. Try again in a moment.
Retry after a moment, with the same key.
Returned by: POST /api/v1/users, POST /api/v1/users/invitations/{id}/resend, POST /api/v1/planning-links, POST /api/v1/invitations
Validation
errors.api.validationFailed
400One or more fields are not valid. The errors list names each field.
errors[] names each field and its code; the codes below are the ones it can hold.
Returned by: GET /api/v1/users, POST /api/v1/users, GET /api/v1/services, GET /api/v1/roles, POST /api/v1/planning-links, GET /api/v1/invitations, POST /api/v1/invitations, GET /api/v1/appointments
errors.api.custom_field_invalid
400This value is not valid for this custom field.
Returned by: POST /api/v1/users
errors.api.custom_field_required
400This custom field is required.
errors.api.custom_field_unknown_key
400There is no custom field with this key.
Returned by: POST /api/v1/users
errors.validation.addOnNotOffered
422This add-on does not exist, or it is not offered with this service.
Returned by: POST /api/v1/invitations
errors.validation.addOnQuantityInvalid
400Choose a quantity between 1 and 99 for each add-on.
Returned by: POST /api/v1/invitations
errors.validation.addOnQuantityNotAllowed
422This add-on can only be booked once per appointment.
Returned by: POST /api/v1/invitations
errors.validation.addOnRepeated
400This add-on is listed more than once.
Returned by: POST /api/v1/invitations
errors.validation.addressRequired
400Address is required
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.appointmentTypeRequired
400Appointment type is required
errors.validation.cityTooLong
400The city must not exceed 100 characters.
errors.validation.colleagueIdOrEmail
400Name the colleague by id or by e-mail address — one of the two.
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.colleagueRepeated
400This colleague is listed more than once.
Returned by: POST /api/v1/invitations
errors.validation.companyNameRequired
400Company name is required
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.companyNameTooLong
400Company name must not exceed 255 characters
errors.validation.countryInvalid
400Invalid country code
errors.validation.cursorInvalid
400The cursor is not valid. Use the nextCursor of a previous page as it was given.
Pass nextCursor exactly as you received it.
Returned by: GET /api/v1/invitations, GET /api/v1/appointments
errors.validation.customFieldKeyFormat
400A custom field key is at most 64 characters: a lowercase letter, then a-z, 0-9 and _.
Returned by: POST /api/v1/users
errors.validation.customFieldsTooMany
400customFields holds at most 30 keys.
Returned by: POST /api/v1/users
errors.validation.customerIdOrDetails
400Name the customer by id alone, or by its details — not both.
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.customerRequired
400Customer is required
errors.validation.emailInvalid
400Invalid email address
Returned by: POST /api/v1/users
errors.validation.emailNonAscii
400Use an email address without special characters before the @.
Returned by: POST /api/v1/users
errors.validation.emailRequired
400Email is required
Returned by: POST /api/v1/users, POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.emailTooLong
400Email must not exceed 255 characters
errors.validation.firstNameRequired
400First name is required
Returned by: POST /api/v1/users
errors.validation.firstNameTooLong
400First name must not exceed 100 characters
Returned by: POST /api/v1/users
errors.validation.invalidValue
400This value has the wrong type or format.
Returned by: GET /api/v1/invitations, GET /api/v1/appointments
errors.validation.invitationValidUntilInPast
400The expiry date cannot be in the past.
Returned by: POST /api/v1/invitations
errors.validation.invitationValidUntilTooFar
400The expiry date can be at most ten years ahead.
Returned by: POST /api/v1/invitations
errors.validation.lastNameRequired
400Last name is required
Returned by: POST /api/v1/users, POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.lastNameTooLong
400Last name must not exceed 100 characters
Returned by: POST /api/v1/users
errors.validation.limitOutOfRange
400limit must be a whole number from 1 to 100.
Returned by: GET /api/v1/users, GET /api/v1/services, GET /api/v1/roles, GET /api/v1/invitations, GET /api/v1/appointments
errors.validation.localeInvalid
400A language is a two-letter code, such as nl or en.
Returned by: POST /api/v1/users
errors.validation.metadataFilterRequired
400A list needs at least one metadata filter, for example metadata[dealId]=D-123.
Returned by: GET /api/v1/invitations, GET /api/v1/appointments
errors.validation.metadataKeyInvalid
400A metadata key is 1 to 40 characters: a-z, A-Z, 0-9 and _.
Returned by: POST /api/v1/users
errors.validation.metadataTooManyKeys
400metadata holds at most 20 keys with a value, and at most 40 entries in all.
Returned by: POST /api/v1/users
errors.validation.metadataValueInvalid
400A metadata value is a string on one line.
Returned by: POST /api/v1/users, POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.metadataValueTooLong
400A metadata value is at most 500 characters.
Returned by: POST /api/v1/users
errors.validation.nameRequired
400A name is required.
Returned by: POST /api/v1/users, POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.nameTooLong
400The name is too long.
errors.validation.phoneInvalid
400Invalid phone number
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.phoneNumberTooLong
400Phone number must not exceed 20 characters
errors.validation.postalCodeTooLong
400The postal code must not exceed 20 characters.
errors.validation.redirectUrlInvalid
400Enter a full web address starting with https://
Returned by: POST /api/v1/planning-links
errors.validation.redirectUrlTooLong
400The web address must not exceed 2048 characters
Returned by: POST /api/v1/planning-links
errors.validation.returnUrlOriginNotAllowed
400This return address is not on the organisation's list of allowed return addresses (Integrations → API).
An admin adds the origin under Integrations → API → Allowed return addresses.
Returned by: POST /api/v1/planning-links
errors.validation.roleRequired
400A role is required.
Returned by: POST /api/v1/users
errors.validation.serviceHasNoDuration
422This service has no duration of its own. Give it one in Schedulinq, or add an add-on with a duration.
Give the service a duration in Schedulinq, or add an add-on with one. After fixing it,
send a new Idempotency-Key: the same key replays this refusal for 24 hours.
Returned by: POST /api/v1/invitations
errors.validation.streetTooLong
400Street and house number must not exceed 255 characters.
errors.validation.supportedLocalesInvalid
400Only English, Dutch, German, French, Spanish, Italian, Polish and Arabic are supported: en, nl, de, fr, es, it, pl or ar.
Returned by: POST /api/v1/users
errors.validation.unknownField
400This field does not exist.
Check the field name against the reference. Unknown fields are refused, never ignored.
Returned by: GET /api/v1/invitations, GET /api/v1/appointments
errors.validation.userCannotDoEveryService
422This colleague does not do this service (or one of its add-ons).
Returned by: POST /api/v1/planning-links, POST /api/v1/invitations
errors.validation.userEmailTooLong
400Email must not exceed 100 characters
Returned by: POST /api/v1/users
errors.validation.userRequired
400Name at least one colleague.
Returned by: POST /api/v1/invitations
errors.validation.usersOutOfRange
400users names 1 to 100 colleagues.
Returned by: POST /api/v1/invitations