Costfluent Public API

List workspaces

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

Returns all workspaces for the authenticated organization.

Needs a token with viewWorkspace; a workspace token lists its own workspace only.

List workspaces › 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 workspaces › Responses

Success


Create workspace

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

Creates a new workspace for organizing cost data.

Needs an organization token with createWorkspace.

Create workspace › 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 workspace › Request Body

name
​string · minLength: 0 · maxLength: 200 · required
currency
​string · minLength: 3 · maxLength: 3 · pattern: ^[A-Z]{3}$ · required
timeZone
​string | null

Create workspace › Responses

Created

id
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
name
​string · required

Get workspace

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

Returns details of a specific workspace.

Needs a token with viewWorkspace on the workspace.

Get workspace › path Parameters

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

Get workspace › Responses

Success

id
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
name
​string · required
currency
​string · pattern: ^[A-Z]{3}$ · required
enableCurrencyConversion
​boolean · required
conversionMethod
​FxMethod · required
enableAutomaticSyncing
​boolean · required
blendCommitmentDiscounts
​boolean · required
timeZone
​string · required
​WorkspaceReportDefaultsResponse · required
anomaliesExcludeMarketplace
​boolean · required
anomaliesExcludeCommitmentFees
​boolean · required
anomalyNotificationThreshold
​string · decimal · pattern: ^-?[0-9]+(\.[0-9]{1,… · required
providerCount
​integer · int32 · required
createdAt
​string · date-time · required
conversionCurrency
​string | null · pattern: ^[A-Z]{3}$
updatedAt
​string | null · date-time

Update workspace

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

Updates workspace settings.

Needs an organization token with updateWorkspace.

Update workspace › path Parameters

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

Update workspace › 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 workspace › Request Body

name
​string | null · minLength: 0 · maxLength: 200
currency
​string | null · pattern: ^[A-Z]{3}$
enableCurrencyConversion
​boolean | null
conversionCurrency
​string | null · pattern: ^[A-Z]{3}$
​
enableAutomaticSyncing
​boolean | null
blendCommitmentDiscounts
​boolean | null
timeZone
​string | null
​
anomaliesExcludeMarketplace
​boolean | null
anomaliesExcludeCommitmentFees
​boolean | null
anomalyNotificationThreshold
​string | null · decimal · min: 0 · pattern: ^-?[0-9]+(\.[0-9]{1,…

Update workspace › Responses

Success

id
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
name
​string · required
currency
​string · pattern: ^[A-Z]{3}$ · required
enableCurrencyConversion
​boolean · required
conversionMethod
​FxMethod · required
enableAutomaticSyncing
​boolean · required
blendCommitmentDiscounts
​boolean · required
timeZone
​string · required
​WorkspaceReportDefaultsResponse · required
anomaliesExcludeMarketplace
​boolean · required
anomaliesExcludeCommitmentFees
​boolean · required
anomalyNotificationThreshold
​string · decimal · pattern: ^-?[0-9]+(\.[0-9]{1,… · required
providerCount
​integer · int32 · required
createdAt
​string · date-time · required
conversionCurrency
​string | null · pattern: ^[A-Z]{3}$
updatedAt
​string | null · date-time

Delete workspace

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

Deletes a workspace; its reports, dashboards, budgets and everything else in it go with it and cannot be restored. The connections it used belong to the organization and keep their cost data.

Needs an organization token with deleteWorkspace.

Delete workspace › path Parameters

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

Delete workspace › 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 workspace › Responses

No Content

No data returned