Edit a workspace (name, retention, rate limit, quota, simulation)
const url = 'http://localhost:3000/admin/workspaces/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","retention":1,"rateLimit":{"limit":1,"windowSeconds":1,"burst":1},"maxMessages":1,"simulation":{"rates":{"delivered":100},"rules":[],"latency":{"minMs":0,"maxMs":0},"openRate":0,"clickRate":0}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/admin/workspaces/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "retention": 1, "rateLimit": { "limit": 1, "windowSeconds": 1, "burst": 1 }, "maxMessages": 1, "simulation": { "rates": { "delivered": 100 }, "rules": [], "latency": { "minMs": 0, "maxMs": 0 }, "openRate": 0, "clickRate": 0 } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
Responses
Section titled “Responses”The workspace.
object
object
object
object
object
object
Example
{ "rateLimit": { "windowSeconds": 1 }, "simulation": { "rates": { "delivered": 100 }, "rules": [], "latency": { "minMs": 0, "maxMs": 0 }, "openRate": 0, "clickRate": 0 }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: validation_error
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: unauthorized
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Sent with every 401.
Sent with every 401.
Error: forbidden
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: not_found
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: payload_too_large
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: validation_error
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: internal_error
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.