List workspaces
const url = 'https://api.sendtruss.com/v1/workspaces?status=active';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.sendtruss.com/v1/workspaces?status=active' \ --header 'Authorization: Bearer <token>'Newest first, 50 to a page. Deleted workspaces are not listed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only the workspaces in this state.
Responses
Section titled “Responses”Paginated set of WorkspaceResource
object
object
Your reference for the customer.
Whether email can go out from the workspace.
object
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.
Why it is blocked: suspended, no_identity when you have no sending domain, or identity_not_sendable when it isn’t verified. Null otherwise.
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
ramping while it builds a sending history, established, throttled or paused.
What moved it into its state, or null.
When it entered its state.
object
object
Base path for paginator generated URLs.
Number of items shown per page.
The “cursor” that points to the next set of items.
The “cursor” that points to the previous set of items.
Example
{ "data": [ { "status": "active", "sending": { "state": "ready" } } ]}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
The API key is missing, malformed, revoked or expired.
object
What went wrong, for a person to read. It may change, so branch on code.
What went wrong, for your code to branch on. A new code is not a breaking change.
The entry on our errors page that explains this code.
This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.
Example
{ "code": "unauthenticated"}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
The request is invalid. The code says why, and errors names each field at fault.
object
What went wrong, for a person to read. It may change, so branch on code.
What went wrong, for your code to branch on. A new code is not a breaking change.
Each field that failed validation, by its path in the request, with its messages.
object
The entry on our errors page that explains this code.
This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.
Example
{ "code": "validation_failed"}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
Too many requests. Wait for the seconds in Retry-After.
object
What went wrong, for a person to read. It may change, so branch on code.
What went wrong, for your code to branch on. A new code is not a breaking change.
The entry on our errors page that explains this code.
This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.
Example
{ "code": "rate_limited"}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
Seconds to wait before trying again.