Skip to main content

Documents & Envelopes

Overview

Document upload, envelope creation and e-sign workflows are handled here.

Endpoints

  • POST /api/v1/documents — upload document
  • GET /api/v1/documents/{id} — document metadata
  • POST /api/v1/documents/{id}/envelopes — create envelope for signatures
  • GET /api/v1/envelopes/{id} — envelope status

Examples

# Upload a document (multipart/form-data)
curl -X POST "{{baseUrl}}/api/v1/documents" \
-H "Authorization: Bearer <token>" \
-F "file=@./contract.pdf"

See also


POST /api/v1/documents

Summary: Create/upload a document metadata record (for binary uploads use the multipart/form-data endpoints if available).

Request

  • Content-Type: application/json or multipart/form-data depending on client support.

Responses

  • 200CreateResponse with the new document id.

Example (multipart)

curl -X POST "{{baseUrl}}/api/v1/documents" \
-H "Authorization: Bearer <token>" \
-F "file=@./contract.pdf"

GET /api/v1/documents/{id}

Summary: Retrieve metadata for a document.

Responses

  • 200 — Document JSON metadata (see OpenAPI schema)

Example

curl -H "Authorization: Bearer <token>" "{{baseUrl}}/api/v1/documents/123"

POST /api/v1/documents/{id}/envelopes

Summary: Create an envelope for signatures associated with a given document.

Request: body schema (see OpenAPI), typically includes signers and routing order.

Responses

  • 200CreateResponse with envelope id

Example

curl -X POST "{{baseUrl}}/api/v1/documents/123/envelopes" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"signers":[{"email":"[email protected]","role":"approver"}]}'

GET /api/v1/envelopes/{id}

Summary: Retrieve envelope status and metadata (signed, pending, declined).

Example

curl -H "Authorization: Bearer <token>" "{{baseUrl}}/api/v1/envelopes/789"

Notes

  • Envelopes may trigger provider webhooks; ensure your webhook endpoints validate signatures.