Skip to content

Conventions ​

These rules apply to every endpoint in the API.

Base URL ​

https://app.docrunner.io/api

Format ​

  • Request bodies are JSON. Send Content-Type: application/json.
  • Response keys are snake_case.
  • Timestamps are ISO 8601 in UTC.
  • A single resource is wrapped in a key named for the resource, for example { "packet": { } }.
  • A list is wrapped in the plural key, with a meta object beside it.

List parameters ​

All list endpoints accept the same query parameters.

ParameterDefaultDescription
page1Page number.
per_page25Results per page, from 1 to 1000. Values outside that range fall back to 25.
paginatetrueSend false to return every result in one response.
sortnameid or name.
orderASCASC or DESC.
searchnoneFree-text search.
filters[include_archived]falseSend true to include archived records.

Example:

bash
curl "https://app.docrunner.io/api/packets?page=2&per_page=50&sort=id&order=DESC" \
  -H "X-API-Key: $DOCRUNNER_API_KEY"

Pagination metadata ​

Paginated responses include these fields under meta:

json
{
  "packets": [],
  "meta": {
    "current_page": 1,
    "next_page": 2,
    "previous_page": null,
    "total_pages": 8,
    "total_count": 15,
    "per_page": 2,
    "page_numbers": [1, 2, 3, 4, 5],
    "filters": null,
    "search": null,
    "sort": null,
    "order": null
  }
}

filters, search, sort and order echo back what you sent. When paginate=false, the paging fields are omitted.

Errors ​

Errors return a JSON body with a single error string.

json
{ "error": "Packet 999 not found" }
StatusMeaning
401 UnauthorizedMissing or invalid API key.
404 Not FoundThe record does not exist in your account.
406 Not AcceptableThe record failed validation.
422 Unprocessable ContentThe request was understood but could not be completed. The message says why.

Questions? Email hello@docrunner.io