Skip to content

Suspend a workspace

POST
/workspaces/{workspace}/suspend
curl --request POST \
--url https://api.sendtruss.com/v1/workspaces/example/suspend \
--header 'Authorization: Bearer <token>'

Nothing is sent from a suspended workspace until you resume it; an emit into it is refused with workspace_suspended. Suspending one that is already suspended changes nothing.

workspace
required
string
/^(?:[0-9A-Za-z]{26}|ref:[A-Za-z0-9._-]{1,128})$/

The workspace: our id, or ref: plus your reference for it, such as ref:cust_4821. A reference is letters, digits, ., _ and -, up to 128 characters, and needs no URL encoding.

WorkspaceResource

Media typeapplication/json
object
data
required
WorkspaceResource
object
id
required
string
reference
required

Your reference for the customer.

string | null
name
required
string
timezone
required
string
locale
required
string
status
required
string
Allowed values: active suspended
created_at
required
string | null
sending
required

Whether email can go out from the workspace.

object
state
required

ready; blocked while your sending domain is missing or not verified, with the reason below; or waiting for a short while once your domain can send, while the workspace itself is set up to send.

string
Allowed values: ready waiting blocked
reason
required

Why it is blocked: suspended, no_identity when you have no sending domain, or identity_not_sendable when it isn’t verified. Null otherwise.

string | null
health
required

How recipients are treating the workspace’s email. A workspace whose bounces or complaints run high is throttled, then paused, so it can’t harm your other workspaces.

object
state
required

ramping while it builds a sending history, established, throttled or paused.

string
reason
required

What moved it into its state, or null.

string | null
since
required

When it entered its state.

string | null
Example
{
"data": {
"status": "active",
"sending": {
"state": "ready"
}
}
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

The API key is missing, malformed, revoked or expired.

Media typeapplication/json
object
message
required

What went wrong, for a person to read. It may change, so branch on code.

string
code
required

What went wrong, for your code to branch on. A new code is not a breaking change.

string
Allowed values: unauthenticated
doc_url
required

The entry on our errors page that explains this code.

string format: uri
request_id
required

This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.

string format: uuid
Example
{
"code": "unauthenticated"
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

Nothing is at this path for your key. Another platform’s or another workspace’s resource answers the same as one that doesn’t exist.

Media typeapplication/json
object
message
required

What went wrong, for a person to read. It may change, so branch on code.

string
code
required

What went wrong, for your code to branch on. A new code is not a breaking change.

string
Allowed values: not_found
doc_url
required

The entry on our errors page that explains this code.

string format: uri
request_id
required

This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.

string format: uuid
Example
{
"code": "not_found"
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

Too many requests. Wait for the seconds in Retry-After.

Media typeapplication/json
object
message
required

What went wrong, for a person to read. It may change, so branch on code.

string
code
required

What went wrong, for your code to branch on. A new code is not a breaking change.

string
Allowed values: rate_limited
doc_url
required

The entry on our errors page that explains this code.

string format: uri
request_id
required

This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.

string format: uuid
Example
{
"code": "rate_limited"
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

Retry-After
integer

Seconds to wait before trying again.