Create a claim for a connected entity
POST/claims
Creates a debt-recovery claim against a defendant on behalf of a connected entity, optionally linking documents previously uploaded via POST /documents/upload-url.
Idempotency. partner_claim_id is required and is the idempotency key, scoped per entity: repeating the call with the same entity_id and partner_claim_id returns the existing claim_id with already_existed: true and HTTP 200, without re-uploading documents or re-triggering processing. The same partner_claim_id sent with a different entity_id creates a separate claim. The claim_id itself is a short, Garfield-assigned reference (it appears on letters and court forms and in correspondence), distinct from your partner_claim_id.
Processing. Your message and any document_refs become the claim's first message, which is what starts Garfield's processing. If you provide neither, no first message is created and processing does not begin until the user sends a message in-app.
Document linking. Each document_refs[].storage_path must sit under the entity+claim prefix produced by /documents/upload-url, and the file must already exist in storage, or the request is rejected (document_path_invalid / document_not_uploaded).
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
- 409
- 429
- 500
- 503
Idempotent replay. A claim already existed for this (partner_id, partner_claim_id). document_ids is always empty on a replay (documents are linked only on first creation).
The claim was created.
The request body was malformed or failed validation. code is one of validation_failed (schema validation; see details), invalid_json (body was not valid JSON), or body_required (no JSON body: sent with a missing body or a Content-Type other than application/json).
Authentication failed. The code distinguishes the cause: auth_missing (no Authorization header), auth_invalid_format (malformed token), auth_unknown_partner (no such partner), auth_revoked (partner or key revoked), auth_bad_secret (bad key id or secret).
The partner is authenticated but not authorised. code is auth_partner_not_approved (the partner account is still pending approval; no endpoint will work until it is approved), entity_not_owned (no connection to the entity), or partner_disconnected (the entity disconnected the partner).
The referenced entity does not exist.
Garfield's internally assigned claim id collided (rare). Safe to retry the identical request. Your partner_claim_id idempotency is unaffected. Distinct from the HTTP 200 idempotent replay, which is how a duplicate partner_claim_id is handled.
The per-partner rate limit (120 requests per minute, shared across all partner endpoints) was exceeded. Inspect Retry-After and the X-RateLimit-* headers before retrying.
Response Headers
Seconds to wait before retrying.
The request ceiling for the window.
Requests remaining in the current window.
Unix epoch milliseconds when the window resets.
An unexpected server error occurred. The message is always the generic string Internal error; key on code, not message.
A dependency the request relies on is temporarily unavailable. The partner did nothing wrong; retry after the delay in Retry-After.
Response Headers
Seconds to wait before retrying.