Aller au contenu

POST /v1/signature/email-suggestion

POST
/v1/signature/email-suggestion
curl --request POST \
--url https://api.asap.cool/v1/signature/email-suggestion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "document_label": "example", "recipient_name": "example", "tone": "example" }'
Media type application/json

Context the caller provides to steer the draft. Every field is optional: an empty body yields a generic but usable signature-request email.

object
document_label

Human label of the document to sign (e.g. “Devis n°2026-0042”).

string | null
recipient_name

Recipient’s name, used to personalize the greeting.

string | null
tone

Desired tone (e.g. “chaleureux”, “formel”). Free-form; the model interprets it.

string | null
Example generated
{
"document_label": "example",
"recipient_name": "example",
"tone": "example"
}

Drafted subject + message.

Media type application/json

Draft email the user can edit before sending the signature request.

object
message
required

Suggested email body (French).

string
subject
required

Suggested email subject (French).

string
Example generated
{
"message": "example",
"subject": "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"
}

AI drafting is unavailable (ai_unavailable).

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