Senders

Endpoints to list, create, and delete senders. A sender represents the company or person on incoming Paperarchive invoices, contracts, and letters.

GET https://api.paperarchive.io/v1/senders
Scope:senders:read

List all senders available in the spaces your API key can access: senders assigned to a space and senders of documents in it. Senders are automatically detected from documents by AI or can be manually assigned.

Query parameters

NameTypeRequiredDescription
space_iduuid optional Only senders available in this space.

Code examples

curl -X GET "https://api.paperarchive.io/v1/senders" \
  -H "Authorization: Bearer pa_live_abc123def456"
POST https://api.paperarchive.io/v1/senders
Scope:senders:write

Create a new sender in a space. Sender names are unique per user, ignoring case: if you already have a sender with this name, it is returned with status 200 instead of 201 and becomes available in the given space. If you have a similar sender (other spelling or legal form, known alias, similar name, e.g. "ACME GmbH" for "Acme"), the request fails with status 409 and {"success": false, "error": "similar_exists", "candidates": [{"id", "name", "match_kind", "score"}]}. Use one of the candidates, or send the request again with "force": true to create the sender anyway.

Request body

NameTypeRequiredDescription
namestring required Sender name.
space_iduuid required Space to create the sender in.
forceboolean optional Create the sender even if similar senders exist (skips the 409 similar_exists check). Default false.

Code examples

curl -X POST "https://api.paperarchive.io/v1/senders" \
  -H "Authorization: Bearer pa_live_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp", "space_id": "space-uuid-1"}'
DELETE https://api.paperarchive.io/v1/senders/:id
Scope:senders:write

Delete a sender. Only works for senders in spaces accessible by your API key.

Path parameters

NameTypeRequiredDescription
iduuid required The sender ID to delete.

Code examples

curl -X DELETE "https://api.paperarchive.io/v1/senders/sender-uuid-1" \
  -H "Authorization: Bearer pa_live_abc123def456"