Undersign
v1.1
Create Free Account
API Reference SDKs & Examples · cURL
SDKs & Examples

cURL Examples

Interact with the Undersign API from the command line. Replace placeholders with your own credentials and identifiers.

Set your credentials

Export your token so it isn't typed inline:

Shell
export UNDERSIGN_API_TOKEN=<BEARER_TOKEN>

List templates

cURL
curl -X GET "https://toolkit.undersign.app/api/v1.1/templates" \
  -H "Authorization: Bearer $UNDERSIGN_API_TOKEN"

Create a signature request

cURL
curl -X POST "https://toolkit.undersign.app/api/v1.1/signature-requests" \
  -H "Authorization: Bearer $UNDERSIGN_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "mode": "email",
    "message": "Please sign the official documents.",
    "templates": [
      {
        "template_id": "<template-uuid>",
        "signers": [
          { "name": "John Doe", "email": "<signer-email-1>" }
        ]
      }
    ]
  }'

Get signature request status

cURL
curl -X GET "https://toolkit.undersign.app/api/v1.1/signature-requests/<package-guid>" \
  -H "Authorization: Bearer $UNDERSIGN_API_TOKEN"