Assignments
An assignment allocates capacity for a date range: an employee, contractor or vacancy to a team or a project, or a team to a project. Assignments are what the forecast is built from.
All paths are under https://{tenant}.flowstate.inc/api/v1. Assignments are live data; scenarioId is ignored.
| Resource | Path | Allocates | Permissions |
|---|---|---|---|
| Employee assignments | /org/:orgId/assignments/employees | An employee to a team or a project | View / Create / Update / Delete Employees (team_employees_view, _create, _update, _delete) |
| Contractor assignments | /org/:orgId/assignments/contractors | A contractor to a team or a project | View / Create / Update / Delete Contractors (team_contractors_view, _create, _update, _delete) |
| Vacancy assignments | /org/:orgId/assignments/vacancies | A vacancy to a team or a project | View / Create / Update / Delete Vacancies (team_vacancies_view, _create, _update, _delete) |
| Team assignments | /org/:orgId/assignments/teams | A team to a project | View / Create / Update / Delete Teams (team_teams_view, _create, _update, _delete) |
Each resource has the same four endpoints:
| Method | Path |
|---|---|
GET | /assignments/{resource} |
POST | /assignments/{resource} |
PATCH | /assignments/{resource}/:id |
DELETE | /assignments/{resource}/:id |
There’s no endpoint to retrieve one assignment. :id is the assignment’s Flowstate id.
FTE and dates
fteis the share of a full-time person:1is full time,0.5half time. Each assignment takes0to10. A person’s assignments can add up to more than1; Flowstate shows that as over-allocated.startDateandendDateare inclusive.endDate: nullmeans ongoing.- Requests take
YYYY-MM-DDor ISO 8601. Responses return ISO 8601 date-times, e.g."2026-04-01T00:00:00.000Z".
The assignment object
Employee, contractor and vacancy assignments:
| Field | Type | Description |
|---|---|---|
id | string | Flowstate id. Read-only. |
type | string | "team" or "project". |
liveEmployeeId / liveContractorId / liveVacancyId | string | Who is allocated. One, matching the resource. |
liveTeamId | string | The team. Present when type is "team". |
liveProjectId | string | The project. Present when type is "project". |
fte | number | 0–10. |
startDate | string | ISO 8601. |
endDate | string | null | ISO 8601. null = ongoing. |
role | string | null | The person’s role on this allocation, e.g. "Tech Lead". |
createdAt, updatedAt | string | ISO 8601. Read-only. |
List responses also carry targetId (the team or project id) and employeeId / contractorId / vacancyId on each item.
Team assignments:
| Field | Type | Description |
|---|---|---|
id | string | Flowstate id. Read-only. |
teamId | string | The team. |
projectId | string | The project. |
fte | number | 0–10. |
startDate | string | ISO 8601. |
endDate | string | null | ISO 8601. null = ongoing. |
role | string | null | The team’s role on the project, e.g. "Primary". |
costCategory | string | null | Free text, e.g. "CapEx". |
isOwnershipOnly | boolean | true when the team is linked to the project as its owner without capacity. fte is then 0. |
createdAt, updatedAt | string | ISO 8601. Read-only. |
Responses can carry further fields that aren’t listed here. Don’t depend on them.
List assignments
GET /org/:orgId/assignments/{resource}
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | 1-based. |
limit | integer | 20 | 1–100. |
sortDir | string | asc | Sorted by startDate: asc or desc. |
Returns every assignment of that resource in the organisation. There are no filters; filter on targetId and the person id client-side.
For employees, contractors and vacancies, a page holds up to limit team assignments followed by up to limit project assignments, and meta.total counts both. Keep requesting pages while meta.hasNextPage is true.
curl "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/assignments/employees?limit=100" \
-H "Authorization: Bearer private_..."
{
"data": [
{
"id": "clx8a9b0c1d2e3f4g5h6i7j8k",
"type": "team",
"liveEmployeeId": "clx1a2b3c4d5e6f7g8h9i0j1k",
"liveTeamId": "clx6t7u8v9w0x1y2z3a4b5c6d",
"employeeId": "clx1a2b3c4d5e6f7g8h9i0j1k",
"targetId": "clx6t7u8v9w0x1y2z3a4b5c6d",
"fte": 1,
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": null,
"role": null,
"createdAt": "2024-12-15T10:00:00.000Z",
"updatedAt": "2025-06-01T14:00:00.000Z"
},
{
"id": "clx2n3o4p5q6r7s8t9u0v1w2x",
"type": "project",
"liveEmployeeId": "clx1a2b3c4d5e6f7g8h9i0j1k",
"liveProjectId": "clx7p8r9q0s1t2u3v4w5x6y7z",
"employeeId": "clx1a2b3c4d5e6f7g8h9i0j1k",
"targetId": "clx7p8r9q0s1t2u3v4w5x6y7z",
"fte": 0.5,
"startDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-09-30T00:00:00.000Z",
"role": "Tech Lead",
"createdAt": "2026-03-20T09:12:00.000Z",
"updatedAt": "2026-03-20T09:12:00.000Z"
}
],
"meta": { "page": 1, "limit": 100, "total": 2, "hasNextPage": false }
}
Create an assignment
POST /org/:orgId/assignments/{resource}
Employee, contractor and vacancy assignments:
| Field | Type | Required | Description |
|---|---|---|---|
employeeId / contractorId / vacancyId | string | Yes | Who to allocate, matching the resource. Flowstate id or externalId. |
teamId | string | null | One of | Target team. Flowstate id or externalId. |
projectId | string | null | One of | Target project. Flowstate id or externalId. |
fte | number | Yes, except vacancies | 0–10. Vacancies default to 1. |
startDate | string | Yes | |
endDate | string | null | No | |
role | string | null | No |
Send exactly one of teamId and projectId.
Team assignments:
| Field | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | Flowstate id or externalId. |
projectId | string | Yes | Flowstate id or externalId. |
fte | number | Yes | 0–10. |
startDate | string | Yes | |
endDate | string | null | No | |
role | string | null | No | |
costCategory | string | null | No |
201 Created with the assignment object.
Update an assignment
PATCH /org/:orgId/assignments/{resource}/:id
| Field | Type | Resources |
|---|---|---|
fte | number | All |
startDate | string | All |
endDate | string | null | All. null makes it ongoing. |
role | string | null | All |
costCategory | string | null | Teams |
The person, team and project can’t be changed. To move an allocation, end it and create a new one.
200 OK with the updated assignment.
Delete an assignment
DELETE /org/:orgId/assignments/{resource}/:id
{ "data": { "id": "clx2n3o4p5q6r7s8t9u0v1w2x", "deleted": true } }
Deleting removes the allocation from history too. To stop an allocation but keep the record, set endDate.
Allocate someone to a project for a date range
curl -X POST "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/assignments/employees" \
-H "Authorization: Bearer private_..." \
-H "Content-Type: application/json" \
-d '{
"employeeId": "HR-10442",
"projectId": "JIRA-MOB",
"fte": 0.5,
"startDate": "2026-04-01",
"endDate": "2026-09-30",
"role": "Tech Lead"
}'
{
"data": {
"id": "clx2n3o4p5q6r7s8t9u0v1w2x",
"type": "project",
"liveEmployeeId": "clx1a2b3c4d5e6f7g8h9i0j1k",
"liveProjectId": "clx7p8r9q0s1t2u3v4w5x6y7z",
"fte": 0.5,
"startDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-09-30T00:00:00.000Z",
"role": "Tech Lead",
"createdAt": "2026-03-20T09:12:00.000Z",
"updatedAt": "2026-03-20T09:12:00.000Z"
}
}
Move someone to another team from a date
End the current team assignment the day before, then create the new one.
curl -X PATCH "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/assignments/employees/clx8a9b0c1d2e3f4g5h6i7j8k" \
-H "Authorization: Bearer private_..." \
-H "Content-Type: application/json" \
-d '{ "endDate": "2026-06-30" }'
curl -X POST "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/assignments/employees" \
-H "Authorization: Bearer private_..." \
-H "Content-Type: application/json" \
-d '{ "employeeId": "HR-10442", "teamId": "TEAM-PAY", "fte": 1, "startDate": "2026-07-01" }'
Vacancies that get filled
Filling a vacancy ends the vacancy’s open assignments (those with no endDate) the day before the start date, and creates matching assignments for the new employee or contractor from that date. You don’t recreate them.
Errors
| Status | code | message | When |
|---|---|---|---|
400 | VALIDATION_ERROR | e.g. "FTE must be <= 10" | A field is missing or invalid. details[].field names it. |
400 | VALIDATION_ERROR | "Provide exactly one of teamId or projectId, not both" | Both targets sent. |
400 | VALIDATION_ERROR | "Either teamId or projectId is required" | Neither target sent. |
400 | VALIDATION_ERROR | e.g. "employeeId: Employee not found", "projectId: Project not found" | A referenced record doesn’t exist in your organisation. |
403 | FORBIDDEN | "API key lacks required permission: …" | The key lacks the resource’s permission. |
404 | NOT_FOUND | e.g. "Employee assignment not found: …" | No assignment with that id. |
See Errors for the error body.