POST /v1/signature/email-suggestion
const url = 'https://api.asap.cool/v1/signature/email-suggestion';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"document_label":"example","recipient_name":"example","tone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section intitulée « Authorizations »Request Body required
Section intitulée « Request Body required »Context the caller provides to steer the draft. Every field is optional: an empty body yields a generic but usable signature-request email.
object
Human label of the document to sign (e.g. “Devis n°2026-0042”).
Recipient’s name, used to personalize the greeting.
Desired tone (e.g. “chaleureux”, “formel”). Free-form; the model interprets it.
Example generated
{ "document_label": "example", "recipient_name": "example", "tone": "example"}Responses
Section intitulée « Responses »Drafted subject + message.
Draft email the user can edit before sending the signature request.
object
Suggested email body (French).
Suggested email subject (French).
Example generated
{ "message": "example", "subject": "example"}No active org.
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
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Missing signature:write scope.
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
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}AI drafting is unavailable (ai_unavailable).
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
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}