Make a workspace of your own, to pay for: pending until you switch to it and pay; one pending at a time. Not for staff
POST
/v1/me/workspaces
const url = 'https://example.com/v1/me/workspaces';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","slug":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/me/workspaces \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "slug": "example" }'Who: a signed-in user, not an API key. Not for API keys.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Made once per action and sent again on every retry of it, so the service acts once: the request_id of the create or money-moving call; a new one when left out
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
slug
required
string
Example generated
{ "name": "example", "slug": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
created_at
required
string format: date-time
created_by
required
entitlement
required
object
ends_at
required
string | null format: date-time
hold
required
string | null
limits
required
object
connections
required
integer format: int32
custom_domains
required
integer format: int32
members
required
integer format: int32
private_templates
required
boolean
retention
string
visits_per_month
required
integer format: int64
plan
required
string
product
required
string | null
source
required
string | null
starts_at
required
string | null format: date-time
status
required
string | null
status_reason
required
string
suspended_at
required
string | null format: date-time
updated_at
required
string | null format: date-time
id
required
integer format: int64
name
required
string
sequence
required
integer format: int64
slug
required
string
updated_at
required
string format: date-time
Example
{ "created_by": { "kind": "user" }, "entitlement": { "hold": "staff", "limits": { "retention": "days_90" }, "product": "buyer_tracker", "source": "grant", "status": "active", "updated_by": { "kind": "user" } }}default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}