Skip to content

Get workspace spend

GET
/v2/workspace/spend
curl --request GET \
--url https://api.connect.ms/v2/workspace/spend \
--header 'Authorization: Bearer <token>'

SMS spend per day or month at current plan prices, plus any prepaid credit balance. Amounts are in GBP.

granularity
string
Allowed values: day month

How to group the spend. Defaults to day.

months
integer format: int32
nullable

How many months back to cover, between 1 and 24. Defaults to 3 for day and 12 for month.

Connect-Version
string

The API version to use, for example 2026-10-01. Defaults to the version set on your API key.

The spend.

Media typeapplication/json

SMS spend over time at current plan prices.

object
granularity
required
One of:

How spend is grouped: day or month.

string
Allowed values: day month
period
required
One of:

An inclusive range of dates.

object
from
required

The first day of the range (ISO 8601 date).

string format: date
to
required

The last day of the range (ISO 8601 date).

string format: date
spend
required

Spend per day or month, oldest first.

Array<object>

Spend for one day or month.

object
date
required

The day, or the first day of the month (ISO 8601 date).

string format: date
amount
required
One of:

An amount in each currency it can be priced in, as decimal strings with four decimal places. A currency with no price is null.

object
gbp

The amount in pounds sterling, e.g. “0.0350”.

string
nullable
eur

The amount in euros, e.g. “0.0410”.

string
nullable
parts
required

The billed SMS parts the amount covers.

integer format: int32
unpricedParts
required

SMS parts sent to networks that have no price on the current plan. Not included in the amount.

integer format: int32
total
required
One of:

An amount in each currency it can be priced in, as decimal strings with four decimal places. A currency with no price is null.

object
gbp

The amount in pounds sterling, e.g. “0.0350”.

string
nullable
eur

The amount in euros, e.g. “0.0410”.

string
nullable
balance
One of:

An amount in each currency it can be priced in, as decimal strings with four decimal places. A currency with no price is null.

object
gbp

The amount in pounds sterling, e.g. “0.0350”.

string
nullable
eur

The amount in euros, e.g. “0.0410”.

string
nullable

Example

{
"granularity": "day"
}

The request is not valid. The detail field says why, and errors lists any problems by field name.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The API key or bearer token is missing or not valid, or the request signature could not be verified.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The caller is not allowed to do this.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

Billing for this workspace is managed elsewhere, so spend is not available here.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The service is temporarily unavailable. Retry after the Retry-After header.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}