Aller au contenu

POST /v1/signature/envelopes/{id}/documents

POST
/v1/signature/envelopes/{id}/documents
curl --request POST \
--url https://api.asap.cool/v1/signature/envelopes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_kind": "example" }'
id
required
string format: uuid

Envelope identifier.

Media type application/json

Body of POST …/documents: one document to attach.

object
source_document_id
required

Logical reference to the document (required).

string format: uuid
source_kind
required

What the document wraps (invoice_quote / standalone_document).

string
Example generated
{
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"source_kind": "example"
}

Document attached.

Media type application/json

Public projection of an additional [EnvelopeDocument].

object
id
required

Stable identifier.

string format: uuid
position
required

1-based position among the additional documents.

integer format: int32
source_document_id
required

Logical reference to the document.

string format: uuid
source_kind
required

What the document wraps.

string
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"position": 1,
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"source_kind": "example"
}

No active org.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Missing signature:write scope.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Not found or cross-org.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Envelope is not a draft (signature_conflict).

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Invalid source_kind.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}