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
- Log in to your Teamday account
- Navigate to Settings → API Access
- Click "Generate New Token"
- 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-tokenExample 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