Docs · api

API Endpoints

Current Teamday API endpoint map for agent automation, streaming events, durable jobs, missions, and MCP clients.

The canonical endpoint contract is the OpenAPI document:

GET https://app.teamday.ai/api/openapi.json

Use this page as the human-readable map. All authenticated endpoints use:

Authorization: Bearer <teamday-service-token>

Service tokens support least-privilege scopes such as agents:read, chats:write, jobs:read, jobs:write, missions:write, webhooks:write, and mcp. A token with * keeps full access.

Mutating JSON requests may include:

Idempotency-Key: <unique-key-for-this-operation>

Base URLs

SurfaceBase URL
App/APIhttps://app.teamday.ai
OpenAPIhttps://app.teamday.ai/api/openapi.json
Interactive referencehttps://app.teamday.ai/api/reference
Agent-readiness manifesthttps://app.teamday.ai/api/agent-readiness
SDK exampleshttps://app.teamday.ai/api/sdk-examples
Deprecation policyhttps://app.teamday.ai/api/deprecation-policy
Rate-limit policyhttps://app.teamday.ai/api/rate-limits
MCP OAuth metadatahttps://app.teamday.ai/.well-known/oauth-authorization-server

Contract

MethodPathPurposeAuth
GET/api/openapi.jsonOpenAPI 3.1 contractPublic
GET/api/referenceInteractive API reference backed by the OpenAPI contractPublic
GET/api/sdk-examplesGenerated-client commands and TypeScript/Python examplesPublic
GET/api/agent-readinessMachine-readable agent-readiness manifestPublic
GET/api/deprecation-policyVersioning, compatibility, deprecation, and sunset policyPublic
GET/api/rate-limitsRate-limit tiers, identity model, headers, and retry policyPublic
GET/.well-known/teamday-agent-apiWell-known manifest for crawlers and agentsPublic
GET/api/versionDeployed version metadataPublic

Versioning And Deprecation

Teamday uses date-based API contract versions. Breaking changes require a new version and migration guide. Documented endpoints remain backward compatible for at least 12 months after a replacement is published.

Deprecation policy:

SignalContract
Deprecation noticeAt least 180 days
Sunset noticeAt least 365 days
Deprecation headerReturned when a documented endpoint has an active deprecation date
Sunset headerReturned with the removal date after the migration window begins
Link headerIncludes rel="deprecation", rel="sunset", or rel="successor-version" when applicable

Agents

MethodPathPurpose
GET/api/agentsList agents available to the organization
POST/api/agentsCreate a Private Agent
PATCH/api/agents/{id}Update an agent
DELETE/api/agents/{id}Delete a Private Agent
PATCH/api/agents/{id}/install-stateInstall, uninstall, or restore a library agent

Chats

MethodPathPurpose
GET/api/chatsList chats
POST/api/chatsCreate a durable chat. Body: { "agent_id": "...", "cwd": "/product" }
GET/api/chats/{id}/messagesRead chat messages and durable work summary
POST/api/chats/{id}/messagesSend a message to an agent
GET/api/chats/{id}/eventsStream chat events over Server-Sent Events
PATCH/api/chats/{id}/optionsUpdate chat options
DELETE/api/chats/{id}Delete a chat

Jobs

Jobs are long-running work records. Use them when an agent starts work that may outlive a request.

MethodPathPurpose
GET/api/jobsList jobs
GET/api/jobs/{id}Read job status, metadata, artifacts, review state, and links
GET/api/jobs/{id}/eventsStream job events over Server-Sent Events
GET/api/jobs/{id}/lineageRead related jobs
GET/api/jobs/{id}/transcript-eventsRead transcript events
POST/api/jobs/{id}/approveApprove reviewable work
POST/api/jobs/{id}/cancelCancel running work
POST/api/jobs/{id}/resumeResume blocked work
POST/api/jobs/{id}/iterateRequest another iteration

Missions

Missions define manual or scheduled recurring work for an agent.

MethodPathPurpose
GET/api/missionsList missions
POST/api/missionsCreate a mission. Body includes cwd, the folder every run works from
GET/api/missions/{id}Read a mission
PATCH/api/missions/{id}Update a mission
POST/api/missions/{id}/tasksAdd a mission task
PATCH/api/missions/{id}/tasks/{taskId}Update a mission task
POST/api/missions/{id}/tasks/{taskId}/start-workStart long-running work from a task

Files And Folders

Files live in one organization-wide tree and are addressed by absolute path (/product, /marketing/blog/launch.md). Directories are ordinary directories; there is no container to create or select before using them.

MethodPathPurpose
GET/api/files?path=List a directory
GET/api/files/content?path=Read file content
PUT/api/files/contentWrite file content
POST/api/files/directoryCreate a directory. Body: { "path": "/marketing/blog" }
POST/api/files/moveMove a file or directory
DELETE/api/files?path=Delete a file or directory
POST/api/files/previewCreate or fetch a file preview
POST/api/files/shareCreate a public file share
GET/api/feed?path=Read feed posts under a directory
POST/api/data-blocks/queryRun a read-only data-block query

Projects, Repositories, And Apps

Projects, apps, chats, and missions each carry an explicit working directory (cwd), an absolute organization path chosen at creation. It does not change when a user later browses another directory.

MethodPathPurpose
GET/api/projectsList projects
POST/api/projectsCreate a project. Body includes cwd
GET/api/repositoriesList connected repositories
POST/api/repositoriesConnect a repository
POST/api/repositories/{id}/refreshRefresh a connected repository
DELETE/api/repositories/{id}Disconnect a repository
GET/api/appsList apps
POST/api/appsCreate an app. Body includes cwd

Legacy workspace routes

Earlier Teamday versions grouped files under /api/workspaces/{id}/... and accepted a workspace_id field on chats, missions, and projects. Those routes and fields still resolve for explicit IDs that already exist, so old links and stored integrations keep working, and they still emit the workspace.*, workspace_repository.*, and workspace_file.changed webhook event types. The old workspaces:read / workspaces:write token scopes are accepted as aliases of files:read / files:write. Do not build new integrations on them: use the path-based /api/files routes and cwd fields above.

MCP

Teamday exposes a Streamable HTTP MCP endpoint for MCP clients.

MethodPathPurposeAuth
POST/mcpSend MCP JSON-RPC or Streamable HTTP messagesOAuth mcp scope
GET/mcpOpen an MCP Streamable HTTP sessionOAuth mcp scope
DELETE/mcpClose an MCP sessionOAuth mcp scope

Event Streams

SSE endpoints return text/event-stream, send an initial connection comment, replay recent events, then stream live events and heartbeat comments.

StreamEvents
/api/chats/{id}/eventsChat message replay, assistant output, routing status, artifacts, review state
/api/jobs/{id}/eventsJob event replay, runner status, transcript output, artifact updates
/mcp-app/jobs/{jobId}/eventsSigned app stream for embedded MCP app surfaces

Webhook Event Delivery

Teamday can push durable work state changes to an organization webhook. Configure the destination and optional event_types subscriptions through the messaging integration API. Job lifecycle events are specialized, and every successful mutating JSON API request also emits a typed API mutation event when delivery is enabled and the event matches the subscription.

MethodPathPurpose
GET/api/messaging-integrationRead webhook/event delivery configuration
GET/api/messaging-integration/deliveriesList durable webhook delivery attempts
POST/api/messaging-integration/deliveries/{id}/redeliverRedeliver a retained webhook event and append the new attempt to the ledger
PUT/api/messaging-integrationConfigure the HTTPS destination and enable delivery
POST/api/messaging-integration/signing-secret/rotateRotate the HMAC-SHA256 signing secret
POST/api/messaging-integration/testSend a signed test delivery

Webhook deliveries include:

Teamday-Event-Id: 01HX...
Teamday-Event-Type: agent.updated
Teamday-Delivery-Attempt: 1
Teamday-Timestamp: 1779330180
Teamday-Signature: t=1779330180,v1=<hex-hmac-sha256>
Idempotency-Key: 01HX...

Verify Teamday-Signature by computing HMAC-SHA256(secret, "${timestamp}.${rawBody}") and comparing it to the v1 value. Treat Teamday-Event-Id as the idempotent event key. Teamday retries transient delivery failures with backoff delays of 0s, 1s, 2s, and 4s.

Use event_types to subscribe to exact events such as agent.updated or wildcard families such as job.*. An empty list means all events.

Each send attempt is written to the durable delivery ledger. GET /api/messaging-integration/deliveries returns one row per attempt with event ID, event type, source, attempt number, status, HTTP status, error, duration, and a redacted destination host. Use limit and cursor; responses include next_cursor when more ledger rows are available. POST /api/messaging-integration/deliveries/{id}/redeliver lets an owner replay a retained event to the current configured destination; the replay is signed with the current secret and creates new ledger rows for the redelivery attempts.

Core event families include agent.*, chat.*, job.*, mission.*, mission_task.*, resource.*, service_token.*, and webhook.*. Legacy file and repository event types are listed under Legacy workspace routes.

Rate-Limit Headers

Every API response includes transparent quota headers when rate limiting is active:

X-RateLimit-Limit: 3000
X-RateLimit-Remaining: 2999
X-RateLimit-Reset: 1779330180
X-RateLimit-Burst: 3000
X-RateLimit-Window: 60
X-RateLimit-Scope: authenticated-identity
RateLimit-Limit: 3000
RateLimit-Remaining: 2999
RateLimit-Reset: 60
RateLimit-Policy: 3000;w=60

When throttled, the API returns 429 and a Retry-After header.

The default production budget is 3000 requests per minute per authenticated identity. Agents may use the full one-minute budget as a burst and should back off with Retry-After after a 429. High-volume enterprise workloads can be assigned a contract-specific limit without changing the header contract.

The machine-readable policy is available at https://app.teamday.ai/api/rate-limits. It describes the identity order (bearer_service_token, session_cookie, then remote_ip), the fixed 60-second window, enterprise tier behavior, and concrete normal/throttled response examples.

In production, rate-limit counters and idempotency replay state are stored in Redis so the behavior is consistent across API replicas.