Aller au contenu

POST /v1/signature/envelopes/bulk

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

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

object
cc_recipients

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

Array<string>
expires_at

When the envelopes (and their tokens) expire (RFC3339), applied to all.

string | null
labels

Free-form labels applied to every envelope (defaults to empty).

Array<string>
message

Optional request-email message applied to every envelope.

string | null
recipients
required

Recipients (1..=100). Each yields one mono-signer envelope.

Array<object>

One recipient of a bulk send: the lone signer of a generated envelope.

object
email
required

Signer email (required).

string
full_name
required

Signer full name (required).

string
phone

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

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
source_document_id
required

The shared standalone document every envelope wraps (org-scoped UUID).

string format: uuid
subject

Optional request-email subject applied to every envelope.

string | null
template_id

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

string | null format: uuid
verification_method

Identity-verification method applied to every signer: email_otp (default) or sms_otp.

string | null
Example generated
{
"cc_recipients": [
"example"
],
"expires_at": "example",
"labels": [
"example"
],
"message": "example",
"recipients": [
{
"email": "example",
"full_name": "example",
"phone": "example"
}
],
"reminder_interval_hours": 1,
"reminder_max_count": 1,
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"subject": "example",
"template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"verification_method": "example"
}

Per-recipient results with aggregate counts (partial success allowed).

Media type application/json

Body of a bulk send: one result per recipient plus aggregate counts.

object
failed_count
required

How many recipients failed (captured, non-fatal).

integer
results
required

One entry per recipient, in request order.

Array<object>

Outcome for one recipient of a bulk send.

object
email
required

The recipient’s email (echoed for correlation).

string
envelope_id

The envelope id when one was created. Present on success, and also on a post-creation send failure (the draft can be retried); null only when creation itself failed (e.g. validation).

string | null format: uuid
error

A human-readable error code/message on failure; null on success.

string | null
sent_count
required

How many recipients were sent successfully.

integer
Example generated
{
"failed_count": 1,
"results": [
{
"email": "example",
"envelope_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"error": "example"
}
],
"sent_count": 1
}

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

Empty or oversized recipient list, or an invalid shared field.

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