API compatibility and updates
The public OpenAPI JSON describes the API deployed at https://api.dockt.com under /v1: browser sign-in, the Account and its credits, users, API credentials, Connections, and Persons, Companies, Workplaces, Policies, work, Documents, Decisions and the rest of the Account’s model. The API changes additively: new endpoints, new optional request fields, new response fields and new values.
Treat OpenAPI as an external dependency. Keep an approved contract or generated client in your application, instead of regenerating it without review on every build.
Pin the contract you use
Section titled “Pin the contract you use”Download the contract when you deliberately update your integration:
curl --fail-with-body --silent --show-error \ https://api.dockt.com/openapi.json \ --output openapi.jsonCommit the file or the client types generated from it. Review the diff before you deploy, then run your contract and workflow tests. info.version identifies the published contract document.
Handle compatible growth
Section titled “Handle compatible growth”Write response parsing so a compatible addition doesn’t stop an existing workflow:
- Ignore unknown response fields. Dockt adds response fields in compatible releases, so don’t reject a response because it has a field your contract doesn’t list.
- Give unfamiliar values a safe fallback, and keep the response. The reference lists the known values of each open list, such as event types, permissions, user roles, registry outcomes and evidence types.
- Rely on the closed lists: Decision results, requirement statuses, Assignment, Engagement, Document and Policy version statuses, user and invitation statuses, and finding severities. A new value there needs a new contract version.
- Treat unknown finding codes by their
severity. - Treat new document types, fact keys, registry codes and attribute codes as open lists.
- Treat IDs and pagination cursors as opaque strings.
- Branch on the Problem Details
type, not ontitleordetail.
Never turn an unfamiliar value into success. Keep the response, avoid an automatic action, and route the case for a person to look at.
Send only the fields the contract lists
Section titled “Send only the fields the contract lists”Requests work the other way: Dockt rejects a request body that has a field your contract doesn’t list, at any depth. A misspelt or moved field fails instead of being ignored. The response is 400 Bad Request with the invalid request type, and errors.issues names the field by its path, such as ["address", "house_number"].
Document uploads take one file part plus document_type, workplace and external_ref. Any other part fails with invalid document upload.
Review state changes
Section titled “Review state changes”When an OpenAPI diff changes a status or result value, review every branch in your integration:
- Decision
result, requirementstatusand findingseverity. - Assignment and Engagement
status. - Document
status. - Registry Check
outcome. - Event
type. - Problem Details
typeand HTTP status.
Update generated clients
Section titled “Update generated clients”- Download the new OpenAPI document.
- Diff it against the approved version in your application.
- Regenerate client types in a review branch.
- Compile the application and run your parser tests.
- Run authentication, idempotency, upload, webhook and recovery tests in a test Account.
- Deploy the client update through your normal release process.
Don’t make generated client updates an unreviewed production build step.
Diagnose an unexpected response
Section titled “Diagnose an unexpected response”If a response doesn’t match the contract you reviewed:
- Keep the HTTP status, response headers and redacted response body.
- Record
x-request-id. - Compare the operation with the deployed OpenAPI document.
- Contact
hello@dockt.comwith the request ID and operation.
Never include bearer tokens, webhook secrets, document contents or raw personal data in a support request.