Skip to main content
Documentation

Authentication

All API endpoints require Bearer token authentication.

Token Format

Authorization: Bearer htk_your_token_here

Tokens start with the htk_ prefix followed by 64 hex characters.

Creating Tokens

Create tokens in Settings > API Tokens in the HPI dashboard. Each token needs:

  • A descriptive name
  • One or more scopes defining what the token can do

The full token value is shown once at creation — store it securely.

Scopes

ScopePermissions
tasks:createCreate tasks, cancel tasks, upload files
tasks:readList and read task details
processes:readList and read process details
processes:writeCreate processes, push updates

A token can have multiple scopes. Requests that require a scope the token doesn't have receive a 403 Forbidden response.

Organization Isolation

Tokens are bound to the organization that created them. All operations are automatically scoped to that organization:

  • Tasks created with a token belong to the token's organization
  • Listing tasks returns only the organization's tasks
  • Process namespaces are prefixed with the organization ID

This isolation is enforced server-side — there's no way to access another organization's data.

Error Responses

StatusMeaning
401 UnauthorizedMissing or invalid token
403 ForbiddenToken lacks the required scope