Skip to content

Accounts and access

An Account is your organization in Dockt. It is the only boundary for data and access. Every Person, Company, Workplace, Policy, Assignment, Engagement, Document, Decision, Outcome, notification destination and Connection belongs to exactly one Account. Nothing is shared between Accounts.

People and backend services access an Account in different ways:

  • Users sign in to the Dockt console in a browser.
  • API credentials authenticate your backend. They are API keys or machine-to-machine (M2M) credentials.

Each data request acts in one Account. Dockt takes that Account from the API credential or browser session. A browser user with access to several Accounts can switch their session with POST /v1/auth/scope; an API credential always acts in the Account where it was created.

Most integrations use one Account, with a Workplace for each site. A Person’s documents and registry results then count at every Workplace, and Account usage counts each Person once per reporting period, however many Workplaces they work at. Your agreement with Dockt sets the price and billing period.

Use a separate Account when data must be fully separated. Examples are an end customer that needs its own users, credentials and billing, or a development environment. Keep development and automated tests in an Account separate from production.

Each console user has one role:

Role Can
owner Read and change every Account resource, its users and its API credentials.
admin The same as owner.
developer Read every Account resource and manage API credentials.
viewer Read every Account resource.

The last active owner can’t be removed or demoted. Manage users with /v1/account/users and invitations with /v1/account/invitations. Removed users stay listed with status disabled.

An API credential acts for the Account with a fixed list of permissions, allowed_scopes:

Permission Allows
account:read Read every Account resource: Persons, Companies, Workplaces, Policies, Assignments, Engagements, Documents, Decisions, Outcomes, Registry Checks, notification destinations, Connections, usage and the catalogues.
account:write Create, change, withdraw and erase those resources.
api-credentials:read List API credentials.
api-credentials:manage Create, update and delete API credentials.

You can grant a credential only the permissions you hold. A backend that creates work and reads results needs account:read and account:write.

Authenticate your backend

Dockt IDs are opaque strings with a prefix for their kind:

Prefix Resource
acc_ Account
per_ Person
cmp_ Company
wpl_ Workplace
pol_ Policy
plv_ Policy version
asg_ Assignment
eng_ Engagement
doc_ Document
dec_ Decision
out_ Outcome
rgc_ Registry Check
whd_ Notification destination
evt_ Event
con_ Connection
cred_ API credential

IDs identify resources but don’t grant access. Dockt checks every request against the authenticated Account. An ID from another Account returns 404 Not Found.

Persons, Companies, Workplaces, Assignments, Engagements and Documents can carry your own reference, external_ref. Sending it again refers to the same record, so you don’t have to store Dockt IDs before you can call Dockt.

A reference lives in a namespace, which defaults to api. Use a namespace per source system, such as hr-system, so references from different systems never collide. Connections use their provider’s namespace, such as conneqtr.

Keep personal data out of references. They appear in logs, events and operational tools.

Persons and Companies

Read the Account with GET /v1/account. Its settings object holds how Dockt behaves for the Account. Use PATCH /v1/account to change settings; the ones you leave out stay as they are. Account-level details stay under /v1: GET /v1/account also shows the Account’s status and whether Connections are enabled, and PATCH /v1/account changes its name and your own reference for it (external_id).

Document file retention deletes original files after a configured number of days following expiry. days_after_expiry accepts 1 to 3650 days. For example, retain files for 90 days after expiry:

{ "settings": { "document_file_retention": { "days_after_expiry": 90 } } }

The Document, its facts and the Decisions that used it stay. Documents without an expiry date keep their file. Set it to null to keep files.