Aller au contenu

POST /v1/signature/forms

POST
/v1/signature/forms
curl --request POST \
--url https://api.asap.cool/v1/signature/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "title": "example", "verification_method": "example" }'
Media type application/json

Body of POST /v1/signature/forms. org_id is never accepted; the slug is generated server-side and never supplied by the caller.

object
source_document_id
required

The fixed document every generated envelope wraps (org-scoped UUID).

string format: uuid
template_id

Optional template (UUID) whose presets pre-fill the generated envelopes.

string | null format: uuid
title
required

Human title shown to the visitor (required, non-blank).

string
verification_method

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

string | null
Example generated
{
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"title": "example",
"verification_method": "example"
}

Form created (with slug and public URL).

Media type application/json

Public projection of a [SignatureForm], including the ready-to-share URL.

object
active
required

Whether the form accepts submissions.

boolean
id
required

Stable identifier.

string format: uuid
slug
required

Public, unguessable slug.

string
source_document_id
required

The fixed document every generated envelope wraps.

string format: uuid
template_id

Optional template applied to the generated envelopes.

string | null format: uuid
title
required

Human title.

string
url
required

Ready-to-share public URL ({frontend_base_url}/sign/forms/{slug}).

string
verification_method
required

Identity-verification method applied to the generated signers.

string
Example generated
{
"active": true,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"slug": "example",
"source_document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"title": "example",
"url": "example",
"verification_method": "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 (blank title, bad method, or unknown source_document_id).

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