DrillerDB Partner API
The Partner API is a REST API for reading your DrillerDB data into something else: a data warehouse, a BI dashboard, a nightly ETL job, or another system that needs your job and billing records. With a write key, the console API can also create and update contacts, projects, and work orders, and create estimate drafts. It is available on Enterprise accounts.
- Developer reference: console.drillerdb.com/developers
- Interactive docs (classic app): app.drillerdb.com/api/docs
- OpenAPI spec (classic app): app.drillerdb.com/api/v1/openapi.json
Both specs are OpenAPI 3.1, so most client generators and API tools can read them
directly. Check the servers entry in whichever spec you generate from, and set
your client's base URL to the surface you actually mean to call.
What you can read
Six resources, each read with a GET:
- Projects, and the invoices on a project
- Work orders
- Contacts
- Equipment
- Inventory items
An estimate that the API created can also be read back by its token.
Writes (console API only)
The console API at https://console.drillerdb.com/api/partner/v1 can create and
change data: POST /projects, PATCH /projects/{intWellKey}, POST /work-orders,
PATCH /work-orders/{id}, POST /contacts, PATCH /contacts/{rolodexId} and
POST /projects/{intWellKey}/estimates (an estimate draft; the API never sends it to the
customer, an office user sends it from DrillerDB).
A write needs a :write scope that an admin grants when creating the key under
Automation > API Keys in the console (contacts:write, projects:write,
work_orders:write, estimates:write). A write acts as the key's service user,
which can never sign in. Your company always comes from the key, never from the body, and
every record a body names (a contact, a project or a user) must belong to it, or the write is
refused with 422 REFERENCE_NOT_FOUND and nothing is written.
Every POST needs an Idempotency-Key header (1 to 255 characters). Each key is
tied to one request on your API key: the same path and the same body.
- If that request has finished, a retry with the same key, path and body returns
the stored response, with an
Idempotent-Replayed: trueheader, instead of writing twice. - If that request is still running, the retry gets a 409
IDEMPOTENCY_IN_PROGRESS. Wait and retry with the same key. - Using the key for a different request (another path or another body) gets a 409
IDEMPOTENCY_KEY_REUSED.
Bodies are strict: an unknown field is refused with 422 VALIDATION_FAILED, and a body can be
at most 256 KB.
- A key with a write scope but no write identity gets
403 WRITE_ACTOR_MISSING. Create the key again with its write scope under Automation > API Keys. - If writes are not switched on for the deployment, the API answers
503 FEATURE_UNAVAILABLEand changes nothing, and the key page offers read scopes only.
There is no delete. The API never sends an email or a text and never moves money.
The classic app API (https://app.drillerdb.com/api/v1) has no write endpoints.
A write acts on your live account. Try a new integration on a single record first, and check the result in DrillerDB before you run a batch. The developer reference lists every write endpoint and its body.
Authentication
Send an API key in the X-API-Key header on every request.
curl -H "X-API-Key: ddb_live_example.your_secret_here" \
"https://console.drillerdb.com/api/partner/v1/projects?limit=50"
The same read call against the classic app swaps the base URL for
https://app.drillerdb.com/api/v1 and is otherwise identical. The classic app answers GET
requests only.
Keys are scoped to one company and can be revoked at any time. Each key carries its own
scopes, such as projects:read or projects:write. A request outside the key's scopes returns
403 INSUFFICIENT_SCOPE. Invoices sit under their own invoices:read scope, so a key can read
projects without reading their money.
Getting a key
Create a key in DrillerDB under Settings > API Access in the classic app, or Automation > API Keys in the console. The section appears on Enterprise accounts. You can list and revoke your keys from the same place. Only an admin can create a key with a write scope.
Base URLs: two surfaces, one key
There are two places to call the Partner API. They return the same resources and accept the same keys, and they are different APIs at different addresses. Pick one and point your integration at it.
Console (recommended for new integrations)
https://console.drillerdb.com/api/partner/v1
Classic app
https://app.drillerdb.com/api/v1
The same key works on both, because both read the same key store. Scopes and the Enterprise requirement behave the same way on each. Rate limits are per key on each. Writes are available only on the console API.
Requests are not forwarded between them, so a path that works on one address will not answer on the other unless you change the base URL to match.
Pagination and change tracking
List endpoints use cursor pagination. Each response carries the next cursor at
meta.next_cursor, and every response carries a meta.request_id you can quote
if you need to ask us about a specific call.
Projects, contacts, equipment, and inventory accept updated_since, so a
recurring sync can ask for only what changed. Work orders use cursor pagination
only in v1.