Get Started

Authentication

Create API keys in the API console. All requests are authenticated via the x-api-key header.

Create a key

To create a key, use the API keys page in the console:

  1. Open the console and sign in.
  2. Go to API keys and select Create key.
  3. Set an expiration date.
  4. Copy and store the secret somewhere safe.

The full secret is shown once; afterward, the console displays only its prefix. Owners and admins can also create organization-owned keys that are not tied to an individual member.

Send the key

Include the key in the x-api-key request header:

cURL

bash

curl … -H "x-api-key: $EPOCHAL_API_KEY"

Missing, unknown, revoked, or expired keys return 401 with error.type set to invalid_api_key:

JSON

json

{
  "error": {
    "type": "invalid_api_key",
    "message": "No key matches that token. Check the x-api-key header.",
    "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15"
  }
}

Keep keys safe

  • Use one key per service: Isolate services so you can revoke one key without disrupting others. Use the console's last-used timestamp to track which keys are active.
  • Keep keys server-side: Never embed an API key in browser JavaScript or mobile clients. Route requests through your own backend.
  • Store secrets securely: Load keys from a secret manager or environment variable and keep them out of source control.
  • Never share raw secrets: Do not paste API keys into chats, AI prompts, support tickets, or logs. Epochal can look up any request by its request_id without your key.
  • Expire temporary keys: Set an expiration date on keys created for experiments and batch jobs.

Respond to a leaked key

  1. Rotate the key in the console.

    The new secret works immediately, and the previous secret remains active for the grace period shown in the console.

  2. Deploy the new secret and revoke the old key.

    Update your service configuration, then revoke the old key to end the grace period early.

  3. Audit recent usage.

    Review the console's Usage page for unexpected requests. If you see unauthorized activity, see Getting Help.

Organizations and roles

Each API key belongs to a single organization. Members create and manage their own personal keys, which are automatically revoked if the member leaves the organization. Owners and admins manage all keys in the organization, including organization-owned keys.

Next steps

Quickstart

Get started with the search, fetch, and sandbox Time Portal APIs.

Errors

Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules.