API Reference

Workspace

Update current workspace

Updates the workspace name and status. Both name and status are required; status accepts active or inactive, and inactive prevents every API key in the workspace from authenticating. Omit metadata to retain its current value, send metadata={} to clear it, and do not send null. is_beta is a read-only workspace flag, disabled by default. Contact the platform to enable access; neither PATCH nor metadata can change it.

PATCHhttps://api.unifyport.ai/v1/workspace

Supported channels

all

Before you call

Use a server-side X-Api-Key for the workspace that owns the resource. Replace every placeholder before running a sample.

Request parameters

Headers

X-Api-Key
stringrequired

Workspace API key. The workspace is resolved from this header.

Content-Type
stringrequired

Use application/json when sending a JSON request body.

Request body

name
stringrequired

Workspace display name.

minLength: 1

status
stringrequired

Workspace status: active or inactive. An inactive workspace prevents all of its API keys from authenticating.

enum: active, inactive

metadata
object

Workspace metadata. On PATCH, omit it to retain the current value or send {} to clear it; null is invalid.

Understand the result

Read the documented response fields and HTTP status, then follow the related operations for your next step.

Response 200 OK

{
  "request_id": "<REQUEST_ID>",
  "data": {
    "name": "Production Workspace",
    "status": "active",
    "metadata": {
      "region": "global",
      "env": "production"
    },
    "account_quota": 10,
    "account_quota_used": 1,
    "account_quota_unlimited": false,
    "is_beta": false
  }
}

Response body

is_beta
boolean

is_beta is a read-only workspace flag, disabled by default. Contact the platform to enable access; neither PATCH nor metadata can change it.

name
string

Workspace display name.

status
string

Workspace status: active or inactive. Inactive workspaces reject authentication by all of their API keys.

enum: active, inactive

metadata
object

Your own environment labels stored on the workspace.

account_quota
integer

Current effective read-only account capacity, including the free quota and paid quota that is still valid, without subtracting used accounts; expired paid quota is not counted.

format: uint64

account_quota_used
integer

Read-only account quota currently in use. Creating an account consumes quota; deleting it releases quota. Accounts awaiting authorization, stopped, or disconnected still count. After paid quota expires, usage may exceed account_quota; the actual usage is returned.

format: uint64

account_quota_unlimited
boolean

Compatibility read-only field; the current quota mode always returns false. Use account_quota as the account capacity.

Responses

200

200 OK

Request succeeded. See the example response body.

400

Bad Request

The request body, path, or parameters are invalid.

401

Unauthorized

The X-Api-Key header is missing or invalid.

500

Internal Server Error

The service encountered an unexpected error.

If the request fails

Inspect HTTP status and error.code/numeric_code, and keep request_id for diagnosis. Correct invalid parameters, complete required authorization or check runtime state as appropriate. Confirm the outcome before retrying a send or another write. Error reference

invalid_request · 10000 · 400
Check required fields, formats and channel conditions, then correct the request.
missing_api_key · 11000 · 401
Check X-Api-Key and whether the workspace is active.
invalid_api_key · 11001 · 401
Check X-Api-Key and whether the workspace is active.