Optimaite

Authentication

3 min readUpdated May 26, 2026Auch auf Deutsch verfuegbar

All requests to the Optimaite API must be authenticated using an API key. API keys are scoped to a specific workspace and carry a set of permissions.

API Keys

Creating an API Key

  1. Navigate to Workspace Settings > API Keys in Optimaite Law
  2. Click Create API Key
  3. Give it a descriptive name (e.g., "CRM Integration")
  4. Select the scopes (permissions) the key needs
  5. Click Generate Key
  6. Copy the key immediately -- it is shown only once

API keys are secrets. Store them securely (environment variables, secret managers) and never commit them to version control. If a key is compromised, revoke it immediately.

Authenticating Requests

Include your API key in the Authorization header as a Bearer token:

Authorization: Bearer opt_live_abc123def456ghi789

Every request must include this header. Requests without a valid key receive a 401 Unauthorized response.

Key Prefixes

  • opt_live_ -- Live (production) key
  • opt_test_ -- Test key (uses sandbox data)

Scopes

API keys are scoped to limit which resources they can access. When creating a key, you select one or more scopes:

ScopeDescription
cases:readRead case data
cases:writeCreate and update cases
cases:deleteDelete cases
parties:readRead party/contact data
parties:writeCreate and update parties
parties:deleteDelete parties
documents:readRead document metadata
documents:writeUpload and update documents
documents:deleteDelete documents
deadlines:readRead calendar events and deadlines
deadlines:writeCreate and update deadlines
calendar:readRead calendar events and scheduling
calendar:writeCreate events and manage scheduling
invoices:readRead invoice data
invoices:writeCreate and update invoices

Follow the principle of least privilege. Only request the scopes your integration actually needs. You can always create multiple API keys with different scopes for different use cases.

Managing API Keys

Listing Keys

Navigate to Workspace Settings > API Keys to see all active keys, their scopes, last used date, and creation date.

Rotating Keys

To rotate a key without downtime:

  1. Create a new API key with the same scopes
  2. Update your integration to use the new key
  3. Verify the integration works with the new key
  4. Revoke the old key

Revoking Keys

Click Revoke next to any key in the API Keys settings page. Revocation is immediate -- all requests using that key will receive 401 Unauthorized.

Error Responses

StatusCodeMeaning
401AUTH_INVALID_KEYAPI key is missing, malformed, or revoked
401AUTH_EXPIRED_KEYAPI key has expired
403AUTH_INSUFFICIENT_SCOPEKey does not have the required scope for this endpoint
403AUTH_TENANT_INACTIVEWorkspace subscription is not active

Next Steps

Was this helpful?