Teams
A team is a group that employees, contractors and vacancies are assigned to. Teams form a single-parent hierarchy through parentTeamId. In the app, teams are archived on a date rather than deleted. See Archive or delete a team.
- IDs. Paths take a Flowstate ID or your
externalId. A value of 24–25 lowercase letters and digits that starts with a letter is read as a Flowstate ID. Anything else is read as anexternalId. - Dates. Dates come back as ISO 8601 date-times, e.g.
2026-10-01T00:00:00.000Z. - Scenarios. Live data only. See Scenarios.
The team object
| Field | Type | Description |
|---|---|---|
id | string | Flowstate ID. Read-only. |
externalId | string | null | Your identifier. Unique among your teams, at most 255 characters, and can’t look like a Flowstate ID. |
name | string | |
teamType | string | null | Free text, e.g. engineering, department. |
description | string | null | |
parentTeamId | string | null | Parent team’s ID. null = top level. |
managerUserId | string | null | Flowstate user ID of the team’s manager. |
archivedAt | datetime | null | Day the team is archived, set in the app. From that day it’s hidden in the app, and its open assignments end the day before. Read-only. |
archiveAppliedAt | datetime | null | When those assignments were ended. null until the archive day arrives. Read-only. |
organizationId, sourceSystem, sourceSystemId, lastSyncedAt, metadata | Record-keeping. Read-only. sourceSystem is api for records created here. | |
createdAt, updatedAt | datetime | Read-only. |
customAttributes | array | Custom attribute values. Returned by retrieve only. |
Endpoints
| Method | Path | Permission |
|---|---|---|
GET | /api/v1/org/:orgId/teams | View Teams (team_teams_view) |
GET | /api/v1/org/:orgId/teams/:id | View Teams (team_teams_view) |
POST | /api/v1/org/:orgId/teams | Create Teams (team_teams_create) |
PATCH | /api/v1/org/:orgId/teams/:id | Update Teams (team_teams_update) |
DELETE | /api/v1/org/:orgId/teams/:id | Delete Teams (team_teams_delete) |
Sub-resource: custom attribute values at /teams/:id/custom-attributes. Team-to-project time is in Assignments.
List teams
GET /api/v1/org/:orgId/teams
Permission: View Teams (team_teams_view).
Returns archived teams too. To leave them out, skip any team whose archivedAt is on or before today.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number, from 1. |
limit | integer | 20 | Page size, 1–100. |
search | string | Case-insensitive match on name or description. | |
sortBy | string | name | name, teamType or createdAt. Any other value sorts by name. |
sortDir | string | asc | asc or desc. |
Example request
curl "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/teams?limit=100" \
-H "Authorization: Bearer private_..."
Example response
{
"data": [
{
"id": "cmf2k8x1q0021ab2cd3ef4gh5",
"organizationId": "cmf2k8x1q0000ab2cd3ef4gh5",
"name": "Engineering",
"externalId": "T-100",
"teamType": "department",
"description": null,
"parentTeamId": null,
"sourceSystem": "api",
"sourceSystemId": null,
"lastSyncedAt": "2024-01-05T08:00:00.000Z",
"metadata": {},
"createdAt": "2024-01-05T08:00:00.000Z",
"updatedAt": "2025-09-01T10:00:00.000Z",
"managerUserId": "cmf2k8x1q0080ab2cd3ef4gh5",
"archivedAt": null,
"archiveAppliedAt": null
},
{
"id": "cmf2k8x1q0020ab2cd3ef4gh5",
"organizationId": "cmf2k8x1q0000ab2cd3ef4gh5",
"name": "Platform Engineering",
"externalId": "T-110",
"teamType": "engineering",
"description": "Infrastructure and developer tooling.",
"parentTeamId": "cmf2k8x1q0021ab2cd3ef4gh5",
"sourceSystem": "api",
"sourceSystemId": null,
"lastSyncedAt": "2024-01-10T08:00:00.000Z",
"metadata": {},
"createdAt": "2024-01-10T08:00:00.000Z",
"updatedAt": "2026-08-20T14:00:00.000Z",
"managerUserId": null,
"archivedAt": "2026-10-01T00:00:00.000Z",
"archiveAppliedAt": null
}
],
"meta": { "page": 1, "limit": 100, "total": 2, "hasNextPage": false }
}
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | Invalid query parameter. |
Retrieve a team
GET /api/v1/org/:orgId/teams/:id
Permission: View Teams (team_teams_view).
The response is the team object with customAttributes. No include parameter.
Example request
curl "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/teams/T-110" \
-H "Authorization: Bearer private_..."
Errors
| Status | Code | When |
|---|---|---|
404 | NOT_FOUND | No team with that ID or externalId. |
Create a team
POST /api/v1/org/:orgId/teams
Permission: Create Teams (team_teams_create).
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
externalId | string | null | No | At most 255 characters. Can’t look like a Flowstate ID. |
teamType | string | null | No | |
description | string | null | No | |
parentTeamId | string | null | No | Team ID or externalId. |
managerUserId | string | null | No | Flowstate user ID. |
Example request
curl -X POST "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/teams" \
-H "Authorization: Bearer private_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Data Platform",
"externalId": "T-120",
"teamType": "engineering",
"parentTeamId": "T-100"
}'
Example response
201 Created.
{
"data": {
"id": "cmf2k8x1q0022ab2cd3ef4gh5",
"organizationId": "cmf2k8x1q0000ab2cd3ef4gh5",
"name": "Data Platform",
"externalId": "T-120",
"teamType": "engineering",
"description": null,
"parentTeamId": "cmf2k8x1q0021ab2cd3ef4gh5",
"sourceSystem": "api",
"sourceSystemId": null,
"lastSyncedAt": "2026-09-14T09:00:00.000Z",
"metadata": {},
"createdAt": "2026-09-14T09:00:00.000Z",
"updatedAt": "2026-09-14T09:00:00.000Z",
"managerUserId": null,
"archivedAt": null,
"archiveAppliedAt": null
}
}
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | The body is invalid, or externalId is already used. |
404 | NOT_FOUND | parentTeamId matches no team. |
501 | NOT_IMPLEMENTED | scenarioId was sent. |
Update a team
PATCH /api/v1/org/:orgId/teams/:id
Permission: Update Teams (team_teams_update).
Takes the create body with every field optional. null clears a nullable field: "parentTeamId": null makes the team top level. archivedAt and archiveAppliedAt are ignored if sent. The response is the updated team, 200 OK.
Example request
curl -X PATCH "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/teams/T-120" \
-H "Authorization: Bearer private_..." \
-H "Content-Type: application/json" \
-d '{ "parentTeamId": "T-110" }'
Errors
As for Create a team, plus 404 NOT_FOUND when no team has that ID or externalId.
Delete a team
DELETE /api/v1/org/:orgId/teams/:id
Permission: Delete Teams (team_teams_delete).
Permanent. The following are deleted with the team, not ended:
- every employee, contractor and vacancy assignment to the team
- the team’s project assignments
Its child teams become top level. A team that a budget refers to can’t be deleted.
Example response
{ "data": { "id": "cmf2k8x1q0022ab2cd3ef4gh5", "deleted": true } }
Errors
| Status | Code | When |
|---|---|---|
404 | NOT_FOUND | No team with that ID or externalId. |
501 | NOT_IMPLEMENTED | scenarioId was sent. |
Tasks
Archive or delete a team
| Archive (in the app) | DELETE (API) | |
|---|---|---|
| Team record | Kept, with archivedAt set | Removed |
| Assignments | Open ones end the day before archivedAt | Removed, including past ones |
| History in effort reports and budgets | Kept | Lost |
| Webhook | team update | team delete |
Archive a team to retire it. Keep DELETE for teams created in error. Archiving isn’t available over REST.
Read the whole hierarchy
Page through GET /teams?limit=100 until hasNextPage is false. Then build the tree from parentTeamId, where null marks a root.
Related
- Assignments · Employees · Custom attributes · Errors
- Webhooks: writes send
teamevents. See Webhooks.