ressource.socialbetadocumentation

Responses and errors

The shape of every response, the error envelope, error codes and what to do about each.

Responses

  • One resource is the object itself: GET /sources/{id} returns the source.
  • A list is { "items": [...], "nextCursor": "…" | null, "hasMore": true | false }. See Pagination.
  • A delete (and a few writes with nothing to say) is 204 with no body.
  • Field names are the database's: short_id, in_library, warc_status, bookmark_id. A source is a bookmark in field names; the URLs say sources.
  • {id} on a source accepts its UUID or its short id (the abc123XYZ in a share link), whichever you hold.
  • Booleans in a query string are the strings true and false.
  • People who keep their profile private stay private: when a response names someone else (a source's owner, a comment's author), those fields are null for a private person you are not connected to. Treat owner and user fields as nullable.

Errors

Every failure has the same body:

{ "error": { "code": "not_found", "message": "Source not found", "requestId": "0f56a8d6-…" } }
codeHTTPMeaningWhat to do
validation_failed400the request is malformed; details lists the problems (zod issues), or carries a reasonfix the request
unsafe_url400the URL is not a public http(s) address (localhost, a private IP, file:…)do not retry
unauthorized401no credential, or a revoked, expired or unknown oneget a new token
forbidden403authenticated but not allowed, including a read token trying to writecheck the scope
not_found404no such resource, or one you may not see—
conflict409it already exists (details.reason when there is more than one kind)—
rate_limited429a limit was hit; see Rate limitswait Retry-After seconds when present
internal500our bugretry once; report the requestId

Branch on code, and on details.reason where a route documents one (folder moves: cycle, too_deep, parent_not_found, name_taken; tokens: too_many_tokens).

Never parse message

message is for people, and it can be translated. Code against code and details.reason only.

Someone else's private row is a 404, not a 403: a 403 would confirm the id exists.

URLs you send must be public. A URL whose host is localhost, a private or link-local address is 400 unsafe_url, before anything is fetched. That applies to saving a source, resolving URL metadata and subscribing to a feed.

Headers

Every response carries x-request-id (the same value as requestId; quote it when you report a problem) and Cache-Control: no-store, except GET /openapi.json, which is the same public document for everyone and is Cache-Control: public, max-age=300.

Responses to a personal access token also carry the rate-limit headers described in Rate limits.

On this page