Errors

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

The error envelope the service uses, its fields, and the codes a seller can see.

Every error from the service and the API uses this envelope.

Envelope

json
{
  "error": {
    "code": "conflict",
    "message": "The resource is in a state that does not allow this action.",
    "fix": "Read the resource and check its state.",
    "docs_url": "https://trialvalid.com/docs/errors#conflict",
    "retryable": false,
    "request_id": "req_example"
  }
}

Branch on code. fix says what to change, and retryable says whether sending the same request again can work.

Codes

CodeHTTPRetryableMeaning
unauthorized401NoThe API key is missing, malformed, revoked or unknown
forbidden403NoThis key is not allowed to make this request
invalid_input400NoThe request input is invalid
not_found404NoNo such resource exists for this account
conflict409NoThe resource is in a state that does not allow this action
signature_invalid400NoA webhook signature or connect state did not verify
rate_limited429YesToo many requests for this key. Wait for Retry-After
provider_unavailable503DependsA vendor is unavailable or not configured. If retryable is false, retrying will not help
internal_error500OnceRetry once with backoff

Another account's resource looks exactly like a missing one, so not_found never reveals that a resource exists.