Skip to main content
The Scribe API uses conventional HTTP status codes and returns a consistent JSON error envelope, so you can handle failures the same way across every endpoint.

Error format

Every error response contains an error object:

Validation errors

When a request fails validation, the response also includes a details array that pinpoints each invalid field:

Status codes

Scribe returns 404 rather than 403 when a resource belongs to another workspace, so a key can never confirm whether a resource it cannot access exists.

Handle errors gracefully

  • Treat any non-2xx status as a failure, and read error.type and error.code to decide what to do.
  • For 422, surface the details array so the cause can be corrected field by field.
  • For 401 and 403, check that the key is valid and carries the scopes the endpoint requires.
  • For 409, resolve the conflicting state first, for example empty a folder before deleting it.