The PharmaDocs AI REST API lets you integrate pharmaceutical document generation into your LIMS, ERP, or custom workflows. Authenticate with an API key and access your projects and documents programmatically.
Availability: API access is available on the Pro and Enterprise plans. Upgrade your plan to generate API keys.
All API requests must include an Authorization header with a Bearer token. Generate your API key from the API Keys section of your dashboard.
API keys are prefixed with sk_pd_ and are tied to a specific company account. Keep your key secret — treat it like a password. Revoke and regenerate it from your dashboard if compromised.
All errors return a JSON body with a { "success": false, "error": "message" } shape.
| HTTP Status | Meaning |
|---|---|
| 200 OK | Request succeeded |
| 201 Created | Resource created successfully |
| 400 Bad Request | Missing or invalid parameters in the request body |
| 401 Unauthorized | Missing or invalid API key |
| 403 Forbidden | API key is valid but lacks permission (plan restriction) |
| 404 Not Found | Resource does not exist or belongs to a different account |
| 422 Unprocessable | Extracted data missing — run AI extraction in dashboard first |
| 429 Too Many Requests | Rate limit exceeded |
| 500 Internal Error | Server-side error — retry or contact support |
| Plan | Limit | Window |
|---|---|---|
| Pro | 500 requests | Per day |
| Enterprise | Unlimited | Per contract |
All endpoints require a valid API key passed as a Bearer token.
/api/v1/projectsAuth RequiredList all projects belonging to your account.
| Name | Type | In | Description |
|---|---|---|---|
| page | integer | query | Page number (default: 1) |
| limit | integer | query | Items per page, max 100 (default: 20) |
/api/v1/projects/{id}Auth RequiredGet a single project with its AI-extracted fields and list of generated documents.
| Name | Type | In | Description |
|---|---|---|---|
| id | integer | path | Project ID returned from List Projects |
/api/v1/documentsAuth RequiredList generated documents. Optionally filter by project or document type.
| Name | Type | In | Description |
|---|---|---|---|
| project_id | integer | query | Filter by project ID |
| doc_type | string | query | Filter by type: AMV_PROTOCOL, AMV_REPORT, etc. |
| page | integer | query | Page number (default: 1) |
| limit | integer | query | Items per page, max 100 (default: 20) |
/api/v1/generateAuth RequiredTrigger document generation for an existing project. The project must have AI-extracted data. Returns the generated document URL.
| Name | Type | In | Description |
|---|---|---|---|
| project_id | integer | body | ID of the project to generate from |
| doc_type | string | body | amv-protocol | amv-report | amv-rs-protocol | amv-rs-report | pp-protocol | pp-report | stability-study | force-degradation |
Use these values for the doc_type field in the Generate endpoint.
| Value | Name | Description |
|---|---|---|
| amv-protocol | AMV Protocol | Analytical Method Validation Protocol |
| amv-report | AMV Report | Analytical Method Validation Report |
| amv-rs-protocol | AMV RS Protocol | Related Substances AMV Protocol |
| amv-rs-report | AMV RS Report | Related Substances AMV Report |
| pp-protocol | PP Protocol | Process Validation Protocol |
| pp-report | PP Report | Process Validation Report |
| stability-study | Stability Study | ICH Stability Study Document |
| force-degradation | Force Degradation | Stress Testing / Force Degradation Report |
If you have questions about the API, encounter an unexpected error, or want to request a new feature, reach out to our team.