API reference
The addresses, how to authenticate, the error shape and the limits shared by every endpoint.
On this page
Every project has one base address: https://<ref>.data.sypnia.com in Sypnia Cloud, or your engine’s public address.
| Prefix | What | Page |
|---|---|---|
/auth/v1 | users: sign-up, sign-in, sessions, e-mail, providers | Auth endpoints |
/auth/v1/admin | users and settings, with a secret key | Auth endpoints |
/auth/v1/oauth | machines: tokens, device flow, registration | OAuth endpoints |
/rest/v1 | the Data API, transactions, the API description | Data and SQL endpoints |
/sql/v1 | SQL, transactions, migrations, schema | Data and SQL endpoints |
https://mcp.data.sypnia.com (self-hosted: /mcp) | the MCP server, one for every project | MCP |
/.well-known/… | jwks.json, oauth-authorization-server, openid-configuration, oauth-protected-resource | OAuth endpoints |
/health | 200 {"status":"ok"} when the engine and the database answer | — |
| every family | error codes and limits | Errors and limits |
Authenticating
| Header | Carries |
|---|---|
apikey: syp_pk_… / syp_sk_… | the project key (needed on /auth/v1 and /rest/v1 from apps) |
Authorization: Bearer <token> | a user’s access token, a PAT, or a secret key |
Authorization: DPoP <token> + DPoP: <proof> | a DPoP-bound token |
X-Sypnia-CSRF: <value of the sypnia-csrf cookie> | with a cookie session (the refresh token in the __Secure-sypnia-rt cookie, cross-subdomain sessions) |
Errors
{ "error": { "code": "invalid_credentials", "message": "Wrong e-mail or password", "hint": null } }code is stable and in snake_case; message is for people and may change. The OAuth endpoints answer as RFC 6749 requires: { "error": "invalid_client", "error_description": "…" }.
| Status | Means |
|---|---|
| 202 | an e-mail is being retried (email_queued_retry): not an error |
| 400 | the request is malformed (invalid_query, validation_failed…) |
| 401 | no valid credential (missing_api_key, invalid_token, invalid_dpop_proof, secret_key_in_browser) |
| 403 | a valid credential without the right (insufficient_scope, scope_not_allowed, person_required) |
| 404 | unknown project, table or record (unknown_project, table_not_found) |
| 405, 406 | a method or a schema the endpoint does not serve |
| 409 | conflict (email_exists, migration_checksum_mismatch, expectation_failed) |
| 422 | valid shape, refused content (weak_password, invalid_email) |
| 429 | rate limited; Retry-After says when |
| 503 | the database or a dependency is unavailable; Retry-After |
Every code, with what to do about it, is in Errors and limits.
The contract
The complete, machine-readable contract is spec/openapi.yaml in the repository. These pages and the engine follow it.