Aller au contenu

POST /v1/signature/envelopes

POST
/v1/signature/envelopes
curl --request POST \
--url https://api.asap.cool/v1/signature/envelopes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "cc_recipients": [ "example" ], "consent_text_version": "example", "expires_at": "example", "labels": [ "example" ], "message": "example", "reminder_interval_hours": 1, "reminder_max_count": 1, "reply_to": "example", "routing_mode": "example", "sender_name": "example", "signers": [ { "email": "example", "full_name": "example", "phone": "example", "routing_order": 1, "verification_method": "example" } ], "source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_kind": "example", "subject": "example", "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
Media type application/json

Body of POST /v1/signature/envelopes. org_id is never accepted here.

object
cc_recipients

Addresses copied on the completion notification (Cc; defaults to empty).

Array<string>
consent_text_version

Consent-text version presented to signers (defaults to v1).

string | null
expires_at

When the envelope (and its tokens) expire (RFC3339).

string | null
labels

Free-form labels for organizing / filtering (defaults to empty).

Array<string>
message

Optional request-email message.

string | null
reminder_interval_hours

Delay between two automatic reminders, in hours (omitted = default cadence).

integer | null format: int32
reminder_max_count

How many automatic reminders may fire (omitted = a single reminder).

integer | null format: int32
reply_to

Optional Reply-To for the signature-request email, so signer replies reach this address instead of the technical ASAP From.

string | null
routing_mode

Routing mode: parallel (default — every signer at once) or sequential (unlocked one after another by routing_order).

string | null
sender_name

Optional display name prefixed to the request email’s From, so it appears under the org’s name (the ASAP address is unchanged).

string | null
signers
required

Signers (at least one).

Array<object>

One signer in a create request.

object
email
required

Signer email (required).

string
full_name

Optional full name.

string | null
phone

Phone (E.164) for SMS OTP; required when verification_method is sms_otp.

string | null
routing_order

0-based position in a sequential signing order (defaults to 0; ignored when the envelope routes in parallel).

integer format: int32
verification_method

Identity-verification method: email_otp (default), sms_otp, or none (sign without a code).

string | null
source_document_id

Logical reference to the signed document (required for invoice_quote).

string | null format: uuid
source_kind
required

What the envelope wraps (invoice_quote / standalone_document).

string
subject

Optional request-email subject.

string | null
template_id

Optional template (UUID) whose presets pre-fill any omitted subject/message/labels/cc_recipients.

string | null format: uuid
Example generated
{
"cc_recipients": [
"example"
],
"consent_text_version": "example",
"expires_at": "example",
"labels": [
"example"
],
"message": "example",
"reminder_interval_hours": 1,
"reminder_max_count": 1,
"reply_to": "example",
"routing_mode": "example",
"sender_name": "example",
"signers": [
{
"email": "example",
"full_name": "example",
"phone": "example",
"routing_order": 1,
"verification_method": "example"
}
],
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"source_kind": "example",
"subject": "example",
"template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Draft envelope created with its signers.

Media type application/json

Public projection of an [Envelope] with its signers and audit chain. document_hash is surfaced as hex; secrets are never present.

object
assurance_level
required

Targeted assurance level.

string
audit_chain

The audit chain (present on get, omitted elsewhere).

Array<object> | null

Public projection of an [AuditEvent]. Hashes are lowercase hex so a client can re-verify the chain.

object
content_hash
required

SHA-256 of the canonical content (hex).

string
event_data
required

Structured payload.

event_type
required

Event kind.

string
id
required

Stable identifier.

string format: uuid
occurred_at
required

When the event occurred (RFC3339).

string
prev_hash

Previous link’s content hash (hex), None at genesis.

string | null
seq_index
required

0-based position in the chain.

integer format: int64
signer_id

Signer the event concerns, if any.

string | null format: uuid
cc_recipients
required

Addresses copied on the completion notification (Cc; may be empty).

Array<string>
completed_at

When every signer signed (RFC3339).

string | null
consent_text_version
required

Consent-text version presented to signers.

string
created_at
required

Creation timestamp (RFC3339).

string
document_hash

SHA-256 of the frozen document (hex), set at send time.

string | null
expires_at

When the envelope (and its tokens) expire (RFC3339).

string | null
has_proof
required

Whether a proof bundle is available for download.

boolean
has_signed_document
required

Whether a signed composited document (source + stamped signatures) is available for download (positioned-field envelopes only).

boolean
id
required

Stable identifier.

string format: uuid
labels
required

Free-form labels for organizing / filtering (may be empty).

Array<string>
message

Optional request-email message.

string | null
reminder_count
required

How many automatic reminders have fired so far.

integer format: int32
reminder_interval_hours

Delay between two automatic reminders, in hours (null = default cadence).

integer | null format: int32
reminder_max_count
required

How many automatic reminders may fire over the envelope’s lifetime.

integer format: int32
reply_to

Optional Reply-To for the signature-request email.

string | null
routing_mode
required

Routing mode.

string
sender_name

Optional From display name for the signature-request email.

string | null
signers

Signers on the envelope (present on get/create, omitted on list).

Array<object> | null

Public projection of a [Signer]. Never carries access_token_hash or otp_hash (secrets stay server-side).

object
consent_given_at

When the signer gave consent (RFC3339).

string | null
created_at
required

Creation timestamp (RFC3339).

string
email
required

Signer email.

string
full_name

Optional full name.

string | null
id
required

Stable identifier.

string format: uuid
otp_attempts
required

Number of failed OTP attempts on the current challenge.

integer format: int32
phone

Phone (E.164) for SMS OTP, if set.

string | null
routing_order
required

Position in a sequential order (0-based).

integer format: int32
signed_at

When the signer signed (RFC3339).

string | null
signed_ip

Source IP captured at signing.

string | null
status
required

Per-signer status.

string
token_expires_at

When the access token expires (RFC3339), if issued.

string | null
updated_at
required

Last-update timestamp (RFC3339).

string
verification_method
required

Identity-verification method.

string
source_document_id

Logical reference to the signed document.

string | null format: uuid
source_kind
required

What the envelope wraps.

string
status
required

Lifecycle status.

string
subject

Optional request-email subject.

string | null
updated_at
required

Last-update timestamp (RFC3339).

string
Example generated
{
"assurance_level": "example",
"audit_chain": [
{
"content_hash": "example",
"event_data": "example",
"event_type": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"occurred_at": "example",
"prev_hash": "example",
"seq_index": 1,
"signer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"cc_recipients": [
"example"
],
"completed_at": "example",
"consent_text_version": "example",
"created_at": "example",
"document_hash": "example",
"expires_at": "example",
"has_proof": true,
"has_signed_document": true,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"labels": [
"example"
],
"message": "example",
"reminder_count": 1,
"reminder_interval_hours": 1,
"reminder_max_count": 1,
"reply_to": "example",
"routing_mode": "example",
"sender_name": "example",
"signers": [
{
"consent_given_at": "example",
"created_at": "example",
"email": "example",
"full_name": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"otp_attempts": 1,
"phone": "example",
"routing_order": 1,
"signed_at": "example",
"signed_ip": "example",
"status": "example",
"token_expires_at": "example",
"updated_at": "example",
"verification_method": "example"
}
],
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"source_kind": "example",
"status": "example",
"subject": "example",
"updated_at": "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"
}

Invalid payload.

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"
}