Enterprise: the API, webhooks and MCP server are live for schools on the Enterprise plan. The owner allows every key and AI connection. Ask about Enterprise

On this page

Errors

Errors

Use the HTTP status, structured code and request id to diagnose an operation.

The error shape

REST failures return {"error":{"type":"invalid_request_error","code":"insufficient_scope","message":"…","request_id":"…"}}. A param field is included when available; it is otherwise omitted. Known failures below 500 use invalid_request_error; server failures use api_error. The response also has X-Request-Id.

Codes

StatusCodeWhen
400idempotency_key_requiredMissing or invalid Idempotency-Key: use 1–128 printable non-space ASCII characters.
400invalid_cursorA cursor is malformed or belongs to another request.
400invalid_parameterA required field is missing or malformed.
400unsupported_versionOnly Swum-Version: 2026-10-25 is accepted.
401invalid_api_keyThe bearer API key is missing, invalid, revoked or expired.
401invalid_tokenThe key/token is invalid, revoked or expired.
401test_key_on_liveA sk_test_ key was sent outside the DEV sandbox API.
403action_forbiddenThe action is outside the integration allowlist.
403api_not_enabledPlan, feature switch or owner rollout access does not allow this API.
403app_key_requiredAn app subscription route requires a dedicated Zapier, Make or n8n key.
403insufficient_scopeThe connection lacks the route’s access.
403location_forbiddenA write target is outside the permitted locations.
403sandbox_requiredThe owner is not a marked, founder-provisioned DEV sandbox.
403school_inactiveThe school or owner is no longer active.
403team_disabledThe school has not enabled its swim team.
404not_foundThe school record is unavailable, including location-scoped reads.
404route_not_foundNo public route exists for this path/method.
409duplicate_familyAn owner roster contact matches normalized email/phone; an out-of-scope family id is withheld.
409idempotency_conflictThe same key was used for a different request.
409request_in_progressThe same idempotent operation is still pending or its outcome needs reconciliation.
409roster_changedSelected roster fields changed after the proposal was prepared.
422dedupe_review_requiredA roster over 5,000 contacts needs its contact index reviewed before API family changes.
422failed_preconditionA current domain requirement prevents this action; review the returned message before retrying.
422proposal_refusedThe existing domain builder refused an unsafe or unsupported change.
429daily_write_limitThe connection’s daily area cap is reached.
429proposal_limitThe connection has 25 pending approval proposals.
429rate_limit_exceededWait the Retry-After interval.
500internal_errorUnexpected failure; retain the original key and request id for reconciliation.

Domain refusals may supply another normalized code. OAuth and JSON-RPC also have their own protocol error handling.

Handle errors

Correct validation and permission errors before retrying. Respect Retry-After on 429. For a lost write response or server error, retain the original idempotency key and reconcile the proposal; a fresh key can create a second operation. For MCP, inspect both JSON-RPC errors and the tools/call result’s isError field.

TipThe Swum API, webhooks and MCP server are available on the Enterprise plan. The school owner turns on each key, endpoint or AI connection in Settings → Developers & Integrations.