Skip to main content

Sign API Quickstart

Get your first document signed in under 5 minutes.

Prerequisites

  • A Propper account with API access
  • API credentials from the dashboard
  • A PDF document to send for signing

Step 1: Get an Access Token

First, exchange your client credentials for an access token.

curl -X POST "https://auth.propper.ai/oauth/token" \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"scope": "sign:read sign:write"
}'

Response:

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "sign:read sign:write"
}
tip

Tokens expire in 1 hour. Cache them and refresh before expiry.

Step 2: Create and Send an Envelope

Create an envelope with a document and send it for signing.

# First, base64 encode your PDF
DOCUMENT_BASE64=$(base64 -i contract.pdf)

# Create and send the envelope
curl -X POST "https://api.propper.ai/restapi/v2.1/accounts/{accountId}/envelopes" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"emailSubject\": \"Please sign: Service Agreement\",
\"emailBlurb\": \"Please review and sign this document.\",
\"status\": \"sent\",
\"documents\": [{
\"documentId\": \"1\",
\"name\": \"Service Agreement.pdf\",
\"documentBase64\": \"$DOCUMENT_BASE64\"
}],
\"recipients\": {
\"signers\": [{
\"email\": \"signer@example.com\",
\"name\": \"John Smith\",
\"recipientId\": \"1\",
\"routingOrder\": \"1\"
}]
}
}"

Response:

{
"envelopeId": "abc123-def456-ghi789",
"status": "sent",
"statusDateTime": "2024-01-15T10:00:00Z",
"uri": "/restapi/v2.1/accounts/.../envelopes/abc123-def456-ghi789"
}

The signer will receive an email with a link to sign the document.

Try it in the API Reference

Step 3: Check Envelope Status

Poll the envelope status or set up webhooks for real-time updates.

curl "https://api.propper.ai/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}?include=recipients" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"envelopeId": "abc123-def456-ghi789",
"status": "completed",
"statusDateTime": "2024-01-15T11:30:00Z",
"sentDateTime": "2024-01-15T10:00:00Z",
"completedDateTime": "2024-01-15T11:30:00Z",
"recipients": {
"signers": [{
"email": "signer@example.com",
"name": "John Smith",
"status": "completed",
"signedDateTime": "2024-01-15T11:30:00Z"
}]
}
}
Try it in the API Reference

Step 4: Download Signed Document

Once all recipients have signed, download the completed document.

curl "https://api.propper.ai/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/combined" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-o signed-document.pdf

echo "Downloaded: signed-document.pdf"
Try it in the API Reference

Common Mistakes

Don't forget these

1. Missing base64 encoding

// Wrong - raw file content
documents: [{ documentBase64: pdfFileContent }]

// Correct - base64 encoded
documents: [{ documentBase64: Buffer.from(pdfFileContent).toString('base64') }]

2. Wrong status for drafts

// Creates draft (not sent)
{ status: 'created' }

// Sends immediately
{ status: 'sent' }

3. Missing recipient fields

// Wrong - missing required fields
{ email: 'signer@example.com' }

// Correct - all required fields
{
email: 'signer@example.com',
name: 'John Smith',
recipientId: '1',
routingOrder: '1'
}

What's Next?