Teams
REST endpoints for teams. Bearer-auth required.
GET /api/teams
List teams.
Query parameters
limit(optional): Page size (1–100, default 100).after(optional): Keyset cursor — return the page after this row (next page).before(optional): Keyset cursor — return the page before this row (prev page).ids(optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).filter(optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.orderBy(optional): Multi-key sort (<Entity>OrderBy[]): array of{ field: direction }applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.organization_id(optional): Optional narrower — list only teams in this org. Without it, lists every team across orgs the caller has visibility into.include_deleted(optional): Soft-deleted team visibility.false(default) — active rows only.true— active plus soft-deleted.only— soft-deleted only.name(optional): Case-insensitive substring match on name.created_by(optional): Shorthand: filter wherecreatedByequals this value.deleted_by(optional): Shorthand: filter wheredeletedByequals this value.retention_tier(optional): Shorthand: filter whereretentionTierequals this value.
Response
JSON
{
"data": [
{
"id": "<...>",
"organizationId": "<...>",
"name": "<...>",
"handle": "<...>",
"createdBy": "<...>",
"deletedAt": "<...>",
"deletedBy": "<...>",
"retentionTier": "<...>",
"createdAt": "<...>",
"updatedAt": "<...>"
}
],
"pageInfo": {
"total": "number",
"hasNextPage": "boolean",
"hasPreviousPage": "boolean",
"startCursor": "string",
"endCursor": "string"
}
}POST /api/teams
Create team
Request body
JSON
{
"organizationId": "string",
"name": "string",
"handle": "string"
}Response
JSON
{
"id": "string",
"organizationId": "string",
"name": "string",
"handle": "string",
"createdBy": "string",
"deletedAt": "string",
"deletedBy": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}GET /api/teams/{id}
Get a team by ID.
Path parameters
id(required): Team to retrieve.
Response
JSON
{
"id": "string",
"organizationId": "string",
"name": "string",
"handle": "string",
"createdBy": "string",
"deletedAt": "string",
"deletedBy": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}PATCH /api/teams/{id}
Update team
Path parameters
id(required):
Request body
JSON
{
"name?": "string",
"handle?": "string"
}Response
JSON
{
"id": "string",
"organizationId": "string",
"name": "string",
"handle": "string",
"createdBy": "string",
"deletedAt": "string",
"deletedBy": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}DELETE /api/teams/{id}
Soft-delete a team.
Path parameters
id(required): Team to soft-delete.
Response
JSON
{
"success": "boolean"
}DELETE /api/teams/{id}/purge
Permanently delete a soft-deleted team.
Path parameters
id(required): Soft-deleted team to permanently delete.
Response
JSON
{
"success": "boolean"
}POST /api/teams/{id}/restore
Restore a soft-deleted team.
Path parameters
id(required): Soft-deleted team to restore.
Response
JSON
{
"id": "string",
"organizationId": "string",
"name": "string",
"handle": "string",
"createdBy": "string",
"deletedAt": "string",
"deletedBy": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}