Costfluent Public API

List teams

GET
https://api.costfluent.com
/v1/teams
Bearer (API token)

Returns the organization's teams, the Everyone team included.

Needs an organization token with viewMembers.

List teams › query Parameters

page
​integer · int32

The page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.

Default: 1
limit
​integer · int32

Items per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.

Default: 20

List teams › Responses

Success

​PaginationLinks · required
​TeamResponse[] · required

Create team

POST
https://api.costfluent.com
/v1/teams
Bearer (API token)

Creates a team with no members and no workspace access. Team names are unique in the organization.

Needs an organization token with createTeam.

Create team › Headers

Idempotency-Key
​string · minLength: 1 · maxLength: 255

A unique value, at most 255 printable ASCII characters, such as a UUID, that makes retrying this create safe. A retry with the same key and the same request within 24 hours answers the first response again, marked Idempotent-Replayed: true, and creates nothing; the same key with another request answers 422 idempotency_key_reused. A key is kept only for a create that succeeded. Without it, every request creates.

Create team › Request Body

name
​string · minLength: 0 · maxLength: 200 · required

Create team › Responses

Created

id
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
name
​string · required
isSystemTeam
​boolean · required
memberCount
​integer · int32 · required
createdAt
​string · date-time · required

Get team

GET
https://api.costfluent.com
/v1/teams/{teamId}
Bearer (API token)

Returns a team with its members and its workspace access. The workspace access lists only workspaces the token can view: none for a token without viewWorkspace.

Needs an organization token with viewMembers.

Get team › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required

Get team › Responses

Success

id
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
name
​string · required
isSystemTeam
​boolean · required
​TeamMemberResponse[] · required
​TeamWorkspaceAccessResponse[] · required
createdAt
​string · date-time · required

Update team

PUT
https://api.costfluent.com
/v1/teams/{teamId}
Bearer (API token)

Renames a team. The Everyone team cannot be renamed.

Needs an organization token with manageTeam.

Update team › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required

Update team › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Update team › Request Body

name
​string · minLength: 0 · maxLength: 200 · required

Update team › Responses

Success

id
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
name
​string · required
isSystemTeam
​boolean · required
memberCount
​integer · int32 · required
createdAt
​string · date-time · required

Delete team

DELETE
https://api.costfluent.com
/v1/teams/{teamId}
Bearer (API token)

Deletes a team, its memberships and its workspace access. The Everyone team cannot be deleted.

Needs an organization token with deleteTeam.

Delete team › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required

Delete team › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Delete team › Responses

No Content

No data returned

Add team member

POST
https://api.costfluent.com
/v1/teams/{teamId}/members
Bearer (API token)

Adds a member of the organization to a team with a role. A user already in the team is a conflict.

Needs an organization token with manageTeam.

Add team member › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required

Add team member › Request Body

userId
​UserPublicId · minLength: 1 · pattern: ^usr_[A-Za-z0-9_-]{2… · required
role
​TeamRole · required

Add team member › Responses

No Content

No data returned

Update team member

PUT
https://api.costfluent.com
/v1/teams/{teamId}/members/{userId}
Bearer (API token)

Changes a team member's role.

Needs an organization token with manageTeam.

Update team member › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
userId
​UserPublicId · pattern: ^usr_[A-Za-z0-9_-]{2… · required

Update team member › Request Body

role
​TeamRole · required

Update team member › Responses

No Content

No data returned

Remove team member

DELETE
https://api.costfluent.com
/v1/teams/{teamId}/members/{userId}
Bearer (API token)

Removes a member from a team. Nobody can be removed from the Everyone team.

Needs an organization token with manageTeam.

Remove team member › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
userId
​UserPublicId · pattern: ^usr_[A-Za-z0-9_-]{2… · required

Remove team member › Responses

No Content

No data returned

List team workspace access

GET
https://api.costfluent.com
/v1/teams/{teamId}/workspaces
Bearer (API token)

Returns the workspaces a team has an access level on, of those the token can view: none for a token without viewWorkspace.

Needs an organization token with viewMembers.

List team workspace access › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required

List team workspace access › query Parameters

page
​integer · int32

The page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.

Default: 1
limit
​integer · int32

Items per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.

Default: 20

List team workspace access › Responses

Success


Set team workspace access

PUT
https://api.costfluent.com
/v1/teams/{teamId}/workspaces/{workspaceId}
Bearer (API token)

Sets the access level a team's members have on a workspace, replacing any level it had.

Needs an organization token with manageWorkspaceAccess.

Set team workspace access › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required

Set team workspace access › Request Body

Set team workspace access › Responses

No Content

No data returned

Remove team workspace access

DELETE
https://api.costfluent.com
/v1/teams/{teamId}/workspaces/{workspaceId}
Bearer (API token)

Removes a team's access level on a workspace.

Needs an organization token with manageWorkspaceAccess.

Remove team workspace access › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required

Remove team workspace access › Responses

No Content

No data returned

Set team default dashboard

PUT
https://api.costfluent.com
/v1/teams/{teamId}/workspaces/{workspaceId}/default-dashboard
Bearer (API token)

Sets the dashboard of the workspace that the team's members open after signing in, unless they chose their own, or clears it with a null dashboardId. The team needs access to the workspace, and the Everyone team has none. Removing the team's access to the workspace ends its default there; changing the level keeps it.

Needs an organization token with manageWorkspaceAccess and viewDashboards.

Set team default dashboard › path Parameters

teamId
​TeamPublicId · pattern: ^team_[A-Za-z0-9_-]{… · required
workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required

Set team default dashboard › Request Body

Set team default dashboard › Responses

Success

workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
workspaceName
​string · required
accessLevel
​WorkspaceAccessLevel · required
​