Skip to content
Support

API errors

Owner, AdminLast checked 24 November 20264 min readArticle ID: developers-errors
On this page

Every error code the Skeduler API returns, what it means, its likely cause and how to fix it, plus the token endpoint's OAuth errors.

A failed call returns an HTTP status and one JSON envelope:

{ "error": { "code": "validation_failed", "message": "The title field is required.", "fields": { "title": ["The title field is required."] } } }
  • Branch on error.code. It's stable. The message is for people and can change.
  • error.fields appears only for validation_failed, with the messages for each field.
  • The token endpoint is the one exception. It answers in the OAuth format, for example { "error": "invalid_client" }.

Codes

Statuserror.codeWhat it means, and the likely causeHow to fix it
401unauthenticatedNo token, or a malformed, expired or revoked one. Suspending or revoking an app deletes its tokens, so its calls get this too.Get a new token and retry once. If it fails again, check the app hasn't been suspended or revoked, and that you're using its current secret.
403insufficient_scopeThe token lacks the scope the call needs (the message names it). On webhook subscribe, the app lacks the read scope of the event's records.Give the app that scope, then get a new token. See Who can grant which scopes.
403app_inactiveThe business's account is no longer active.Nothing in your request. The business needs its Skeduler account active again.
403billing_restrictedThe business's subscription restricts API access.Nothing in your request. The business's Owner or an Admin sorts out the subscription in Skeduler, and calls work again once access is back.
404not_foundNo such record in this business. Archived records and other businesses' ids look the same, and so does an unknown path.Check the id and the path. The record may be archived, or belong to another business.
405method_not_allowedThe path exists, but not for that method.Use the method the endpoint list gives for that path.
409idempotency_in_progressA request with the same Idempotency-Key is still being processed.Wait a moment, then retry with the same key. You'll get the first request's answer.
409idempotency_replay_unavailableThe first answer for this Idempotency-Key can no longer be replayed.Check whether the first request took effect (for example, read the record), then retry with a new key.
422validation_failedA field is missing or wrong, a filter value isn't valid, or a name you referenced doesn't exist (for example a job status).Read error.fields, fix those fields and send it again.
422invalid_eventWebhook subscribe: unknown event.Use an event from Webhook events and their payloads.
422invalid_target_urlWebhook subscribe: target_url isn't an https:// URL of up to 2048 characters with a public address.Use a public https:// address of up to 2048 characters.
422subscription_limit_reachedWebhook subscribe: 50 active subscriptions for the app, or 200 for the business.Delete subscriptions you no longer use, then subscribe again.
422invalid_idempotency_keyThe Idempotency-Key isn't 1 to 255 printable ASCII characters, or it's missing on POST /invoices/{id}/payments, where it's required.Send a key of 1 to 255 printable ASCII characters, such as a UUID. Always send one when recording a payment.
422idempotency_key_reusedThe key was already used for a different request.Use a new key for each new request. Reuse a key only to retry the exact same request. See My request fails with idempotency_key_reused.
429rate_limitedOver a rate limit.Wait Retry-After seconds, then retry. Spread your calls out. See Staying under the rate limits.
500server_errorSomething went wrong on Skeduler's side.Retry with backoff. If it keeps happening, contact Skeduler support with the time and the call you made.
503api_disabledThe API is switched off for a while.Try again later, with backoff.

Token endpoint errors

POST /api/v1/oauth/token answers in the OAuth format, { "error": "<code>" }, with no message.

StatuserrorWhat it means, and the likely causeHow to fix it
401invalid_clientThe client ID or secret is wrong, or the app can't get tokens any more.Check both values. If the secret is lost, rotate it. See Token request fails with invalid_client.
400invalid_requestYou sent the client ID and secret both in the Authorization header and in the body.Send them one way only: the header (HTTP Basic) or the body.
400unsupported_grant_typegrant_type isn't client_credentials.Send grant_type=client_credentials.

Handling them

  • 401: get a new token and retry once. If it still fails, the app was suspended or revoked, or its secret changed.
  • 403: don't retry. Fix the scope, or the app or billing problem.
  • 409, 429, 500, 503: retry with exponential backoff and a little random delay. Honour Retry-After on a 429. If you sent an Idempotency-Key, retrying a write is safe.
  • 404, 422: the request itself is wrong. Sending it again won't help.

In this section