Reference

API reference

Every endpoint the XOsign API exposes. If it is not here, it does not exist.

Machine-readable

This page and /docs/api/openapi.json are generated from the same OpenAPI 3.1 document, so they cannot disagree. Import the JSON into Postman or feed it to a client generator.

Endpoints

Retrieve the current account

GEThttps://xosign.ai/api/v1/account
ScopeNone required

Returns the account behind the API key, plus the key's mode and scopes. The cheapest way to verify a key works and to see what it is allowed to do. Requires no scope.

Responses

StatusReturnsDescription
200AccountThe account.
401ErrorThe request carried no usable API key, so we could not tell who you are. Codes: missing_authorization, invalid_api_key.
403ErrorWe know who you are, but this key or this plan is not allowed to do that. Codes: insufficient_scope, api_access_required.
429ErrorYou sent more requests than your plan allows. Carries Retry-After. Codes: rate_limit_exceeded, ip_throttled.
500ErrorSomething failed on our side. Nothing is wrong with your request.

See the Account object below for its fields.

List documents

GEThttps://xosign.ai/api/v1/documents
Scopedocuments:read

Your documents, newest first, cursor-paginated. An account with no documents returns an empty list, never a 404. Templates are not included.

Parameters

NameInRequiredDescription
limitqueryOptionalHow many documents to return, 1–100.defaults to 20 · 1–100
starting_afterqueryOptionalA cursor from a previous response's `next_cursor`. Returns the page after it. Cannot be combined with `ending_before`.
ending_beforequeryOptionalA cursor from a previous response. Returns the page before it. Cannot be combined with `starting_after`.
statusqueryOptionalComma-separated statuses to include, e.g. `sent,completed`. Any unknown value rejects the whole request. One of: draft, sent, partially_signed, completed, voided, declined, expired, in_review.

Responses

StatusReturnsDescription
200DocumentListA page of documents.
400ErrorBad pagination or status filter. Codes: invalid_limit, invalid_cursor, conflicting_cursors, invalid_status.
401ErrorThe request carried no usable API key, so we could not tell who you are. Codes: missing_authorization, invalid_api_key.
403ErrorWe know who you are, but this key or this plan is not allowed to do that. Codes: insufficient_scope, api_access_required.
429ErrorYou sent more requests than your plan allows. Carries Retry-After. Codes: rate_limit_exceeded, ip_throttled.
500ErrorSomething failed on our side. Nothing is wrong with your request.

See the DocumentList object below for its fields.

Create a draft document

POSThttps://xosign.ai/api/v1/documents
Scopedocuments:write

Creates a draft and its recipients in one call. Nothing is delivered until you call send.

Field placement is not supported through the API — `content` accepts only the small metadata bag described below, and unknown properties are dropped silently.

Parameters

NameInRequiredDescription
Idempotency-KeyheaderOptionalOptional but strongly recommended on writes. A client-chosen string of at most 255 characters. Retrying with the same key and the same body replays the original response instead of performing the write twice.max 255 characters

Request body

FieldTypeRequiredDescription
titlestringRequiredmax 200 characters
typestringOptionalDefaults to `form`.one of 22 values · defaults to form
primary_languagestringOptionalone of: en, es · defaults to en
recipientsarrayRequired1–20 items
contentDocumentContentOptional

Responses

StatusReturnsDescription
201DocumentThe created draft.
400ErrorThe body was rejected. `param` names the exact field. See /docs/api/errors for every code.
401ErrorThe request carried no usable API key, so we could not tell who you are. Codes: missing_authorization, invalid_api_key.
403ErrorWe know who you are, but this key or this plan is not allowed to do that. Codes: insufficient_scope, api_access_required.
409ErrorIdempotency conflict. Codes: idempotency_key_reused, idempotency_in_progress.
429ErrorYou sent more requests than your plan allows. Carries Retry-After. Codes: rate_limit_exceeded, ip_throttled.
500ErrorSomething failed on our side. Nothing is wrong with your request.

See the Document object below for its fields.

Retrieve a document

GEThttps://xosign.ai/api/v1/documents/{id}
Scopedocuments:read

Poll this to watch a document progress from `sent` to `completed`.

Parameters

NameInRequiredDescription
idpathRequiredThe document id.

Responses

StatusReturnsDescription
200DocumentThe document.
401ErrorThe request carried no usable API key, so we could not tell who you are. Codes: missing_authorization, invalid_api_key.
403ErrorWe know who you are, but this key or this plan is not allowed to do that. Codes: insufficient_scope, api_access_required.
404ErrorNo such document is visible to your account. Also returned for a malformed id and for templates. Code: document_not_found.
429ErrorYou sent more requests than your plan allows. Carries Retry-After. Codes: rate_limit_exceeded, ip_throttled.
500ErrorSomething failed on our side. Nothing is wrong with your request.

See the Document object below for its fields.

Send a document for signature

POSThttps://xosign.ai/api/v1/documents/{id}/send
Scopedocuments:send

Moves a draft to `sent` and delivers a signature request to each recipient over its channel.

Takes no body — send options come from the `content` you supplied at creation. Only a draft or in-review document can be sent; sending an already-sent document returns `document_not_sendable`.

A test-mode key still transitions the document to `sent` but delivers no email or SMS.

Parameters

NameInRequiredDescription
idpathRequiredThe document id.
Idempotency-KeyheaderOptionalOptional but strongly recommended on writes. A client-chosen string of at most 255 characters. Retrying with the same key and the same body replays the original response instead of performing the write twice.max 255 characters

Responses

StatusReturnsDescription
200DocumentThe document, now `sent`.
400ErrorThe document cannot be sent as it stands. Codes: document_not_sendable, no_recipients, no_signers, recipient_contact_required, approver_requires_sequential, pay_app_unsigned.
401ErrorThe request carried no usable API key, so we could not tell who you are. Codes: missing_authorization, invalid_api_key.
403ErrorWe know who you are, but this key or this plan is not allowed to do that. Codes: insufficient_scope, api_access_required.
404ErrorNo such document. Code: document_not_found.
409ErrorIdempotency conflict. Codes: idempotency_key_reused, idempotency_in_progress.
429ErrorYou sent more requests than your plan allows. Carries Retry-After. Codes: rate_limit_exceeded, ip_throttled.
500ErrorSomething failed on our side. Nothing is wrong with your request.

See the Document object below for its fields.

List a document's recipients

GEThttps://xosign.ai/api/v1/documents/{id}/recipients
Scoperecipients:read

Per-recipient progress: who was sent to, who opened it, who signed, who declined.

This needs its own `recipients:read` scope, separate from `documents:read`, so a key can list documents without reading signer contact details.

Parameters

NameInRequiredDescription
idpathRequiredThe document id.

Responses

StatusReturnsDescription
200RecipientListThe recipients, ordered by `sign_order`. A document with none returns an empty list.
401ErrorThe request carried no usable API key, so we could not tell who you are. Codes: missing_authorization, invalid_api_key.
403ErrorWe know who you are, but this key or this plan is not allowed to do that. Codes: insufficient_scope, api_access_required.
404ErrorNo such document. Code: document_not_found.
429ErrorYou sent more requests than your plan allows. Carries Retry-After. Codes: rate_limit_exceeded, ip_throttled.
500ErrorSomething failed on our side. Nothing is wrong with your request.

See the RecipientList object below for its fields.

Objects

The shapes returned by the endpoints above. Every field listed is always present — optional values arrive as null rather than being omitted, so you can read them without guarding for absence.

Document

A document in your account.

FieldTypeRequiredDescription
objectstringRequiredone of: document
idstringRequired
typestringRequiredThe kind of document. Determines which workflows apply to it.one of 22 values
statusstringRequiredone of: draft, sent, partially_signed, completed, voided, declined, expired, in_review
titlestringRequired
descriptionstring or nullRequired
primary_languagestringRequiredone of: en, es
secondary_languagestring or nullRequired
recipient_countintegerRequiredHow many recipients are on the document.
sent_atstring or nullRequired
completed_atstring or nullRequiredSet when every signer has signed.
voided_atstring or nullRequired
voided_reasonstring or nullRequired
expires_atstring or nullRequired
created_atstringRequired
updated_atstringRequired

Recipient

A party on a document. Signing links and any authentication material are never exposed.

FieldTypeRequiredDescription
objectstringRequiredone of: recipient
idstringRequired
document_idstringRequired
display_namestringRequired
emailstring or nullRequired
phonestring or nullRequired
party_rolestring or nullRequired
channelstringRequiredone of: email, sms, in_person
sign_orderintegerRequired
auth_levelstringRequiredone of: l0_email_link, l1_email_sms_otp, l0_account_session
statusstringRequired
sent_atstring or nullRequired
viewed_atstring or nullRequired
signed_atstring or nullRequired
declined_atstring or nullRequired
declined_reasonstring or nullRequired

Account

The account the calling API key belongs to.

FieldTypeRequiredDescription
objectstringRequiredone of: account
idstringRequired
display_namestringRequired
tierstringRequiredThe account's current plan. Determines your rate limits.
created_atstringRequired
modestringRequiredEchoes which kind of key made this request.one of: live, test
scopesarrayRequiredThe scopes granted to the key that made this request.

Errors

Every endpoint can return the shared error envelope. The full catalogue of types and codes is on the errors page.

json
{
  "error": {
    "type": "not_found",
    "code": "document_not_found",
    "message": "No document with that id.",
    "doc_url": "https://xosign.ai/docs/api/errors#not_found",
    "request_id": "req_b07b069f0a83492877e3fa31"
  }
}
API reference · XOsign API docs