Base URL

All API requests should be made to:

https://api.doctly.ai/api/v1

Response Format

All responses are returned in JSON format. A typical response structure looks like this:

{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "file_name": "document.pdf",
    "status": "COMPLETED",
    "created_at": "2024-03-21T13:45:00Z",
    "output_file_url": "https://..."
  }
}

Error Handling

The API uses conventional HTTP response codes to indicate the success or failure of requests:

  • 2xx: Success
  • 4xx: Client errors
  • 5xx: Server errors

Error responses include a message explaining what went wrong:

{
  "detail": [
    {
      "loc": ["body", "file"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Document Processing Flow

  1. Upload: Submit your document using the /documents/ endpoint
  2. Processing: The document enters our processing pipeline
  3. Status Check: Poll the document status using the /documents/{id} endpoint
  4. Download: Once completed, retrieve the processed content using the provided output_file_url

Webhooks

You can provide a callback_url parameter when uploading documents. We will notify you when we have finished processing the document by POSTing the document JSON object to the URL provided.

Support

If you need help with the API: