Legal
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
DELETE | |
GET |
List all legal documents
Required API key scopes
legal_document:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /legal_documentsExample response
Status 200
Create legal documents
Required API key scopes
legal_document:writeRequest parameters
- document_type
- company_namestring
- company_addressstring
- representative_emailstring
Response
Example request
POST /api /organizations /:organization_id /legal_documentsExample response
Status 201
Retrieve legal documents
Required API key scopes
legal_document:readPath parameters
- idstring
Response
Example request
GET /api /organizations /:organization_id /legal_documents /:idExample response
Status 200
Delete legal documents
Delete an unsigned legal document. The PandaDoc envelope is voided first so the original signer can no longer complete it; only if that succeeds is the row removed, freeing the unique-per-org-per-type constraint so a fresh document can be generated.
Returns 503 if the PandaDoc void fails — the row stays in that case and the frontend should prompt the user to retry. Returns 403 for signed documents (legal artifacts; staff can still delete signed rows from Django admin).
Required API key scopes
legal_document:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /legal_documents /:idExample response
Status 204 No response body
Status 403 No response body
Status 404 No response body
Status 503 No response body
Retrieve legal documents download
Short-lived redirect to the signed PDF in object storage. 404 while the envelope is still out for signature (or if the upload hasn't completed yet). The underlying presigned URL expires in ~60s; clients should hit this endpoint each time they want to view the PDF rather than caching.
Path parameters
- idstring
Example request
GET /api /organizations /:organization_id /legal_documents /:id /download