API reference · Authentication

Everything, on the record.

Personal access tokens, header conventions, and safe handling — everything you need to authenticate against the TeamDay API.

Authentication

To use the Teamday AI API, you'll need to authenticate your requests using a personal access token. This token should be included in the Authorization header of your requests.

Getting Your Access Token

  1. Log in to your Teamday account
  2. Navigate to Settings → API Access
  3. Click "Generate New Token"
  4. Copy your token immediately - you won't be able to see it again!

Using Your Token

Include your token in the Authorization header of your requests:

Authorization: Bearer your-access-token

Example Request

curl -X POST https://api.teamday.ai/v1/chat \
  -H "Authorization: Bearer your-access-token" \
  -H "Content-Type: application/json" \
  -d '{
    "organizationId": "your-org-id",
    "context": [
      {
        "role": "system",
        "content": "Create a file hello.txt and write a poem into it.",
        "id": "unique-message-id"
      }
    ]
  }'

Security Best Practices

  • Never share your access token or commit it to version control
  • Rotate your tokens regularly
  • Use environment variables to store your tokens
  • Set appropriate token expiration dates