Intro
The Teams API lets you manage LangWatch teams via REST. Teams are organizational units that group projects and members together. This API is designed for service-to-service automation (e.g. provisioning team structures for new departments, cleaning up orphaned teams from test runs), not for end-user access.Authentication
The Teams API requires an organization-level API key withteam:manage permission (created in Settings > API Keys). Pass it as a Bearer token:
X-Auth-Token) cannot be used here — they lack organization context.
Endpoints
Errors
Every refusal carries a stablecode. Branch on that, not on the message.
Soft Delete
DELETE does not permanently remove a team. It sets an archivedAt timestamp, making the team invisible to list and get operations. Archived teams can still be referenced in historical data (e.g. past project associations).
Typical Flow
- Create an admin API key in Settings > API Keys with
team:managepermission - Call
POST /api/teamswith a team name - Use the returned team
idwhen creating projects via the Projects API, or later move an existing project by updating itsteamId