API Endpoints

Complete reference for all TeamDay API endpoints. All endpoints require authentication via Personal Access Token.

Base URL

https://cc.teamday.ai/api/v1

Authentication

All requests must include your Personal Access Token in the Authorization header:

Authorization: Bearer td_your-token-here

Agents

Manage AI agents (characters) in your organization.

List Agents

Get all agents accessible to your account.

GET /api/v1/agents

Response:

{
  "agents": [
    {
      "id": "char_abc123",
      "name": "Code Reviewer",
      "role": "Senior Developer",
      "systemPrompt": "You review code for quality...",
      "visibility": "private",
      "model": "claude-3-5-sonnet-20241022",
      "createdAt": "2024-12-09T10:00:00Z"
    }
  ]
}

Create Agent

Create a new AI agent.

POST /api/v1/agents

Request Body:

{
  "name": "Research Assistant",
  "role": "Researcher",
  "systemPrompt": "You are a helpful research assistant.",
  "visibility": "organization",
  "model": "claude-3-5-sonnet-20241022"
}

Execute Agent

Run an agent to process a message.

POST /api/v1/agents/{agentId}/execute

Request Body:

{
  "message": "Analyze this repository",
  "spaceId": "space_abc123",
  "stream": false
}

Tasks

Create and manage coordinated work across agents.

List Tasks

GET /api/v1/tasks

Create Task

POST /api/v1/tasks

Request Body:

{
  "title": "Deploy to production",
  "priority": "high",
  "assignedTo": "char_deploy_bot"
}

Executions

Track agent execution history.

List Executions

GET /api/v1/executions?agentId={agentId}

Get Execution Details

GET /api/v1/executions/{executionId}

Spaces

Manage workspace environments.

Browse Files

GET /api/spaces/{spaceId}/files/browse?path={path}

Read File

GET /api/spaces/{spaceId}/files/read?path={path}

Write File

POST /api/spaces/{spaceId}/files/write

Error Responses

{
  "error": true,
  "statusCode": 400,
  "message": "Validation error"
}

For complete endpoint details, examples, and parameters, see our interactive API documentation.