Skip to main content
POST
/
documents
Create document (Legacy)
curl --request POST \
  --url https://api.firma.dev/functions/v1/signing-request-api/documents \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Sales Agreement 2024",
  "recipients": [
    {
      "name": "John Doe",
      "email": "john@example.com"
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "document_url": "<string>",
  "document_page_count": 2,
  "status": "draft",
  "expiration_hours": 168,
  "settings": {
    "use_signing_order": true,
    "allow_download": true,
    "attach_pdf_on_finish": true,
    "allow_editing_before_sending": false
  },
  "template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "sent_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "cancelled_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key for authentication. Use your API key directly without any prefix (e.g., 'your-api-key'). Bearer prefix is optional but not required.

Body

application/json
name
string
required

Document name

Maximum length: 255
recipients
object[]

Response

Document created successfully

id
string<uuid>

Unique identifier for the signing request

name
string

Signing request name

Maximum length: 255
description
string | null

Signing request description

document_url
string<uri>

URL to the PDF document

document_page_count
integer

Number of pages in the document

Required range: x >= 1
status
enum<string>

Current status of the signing request

Available options:
draft,
sent,
completed,
cancelled,
expired
expiration_hours
integer
default:168

Hours until signing request expires (default: 168 = 7 days)

Required range: x >= 1
settings
object
template_id
string<uuid> | null

ID of template used to create this signing request

created_at
string<date-time>

Signing request creation timestamp

sent_at
string<date-time> | null

Timestamp when the signing request was sent

completed_at
string<date-time> | null

Timestamp when all signatures were completed

cancelled_at
string<date-time> | null

Timestamp when signing request was cancelled

expires_at
string<date-time> | null

Expiration timestamp

I