Update Workspace
Update the name and conversion tracking setting for the workspace associated with your API key.
Endpoint
PATCH https://api.campaignlark.com/v1/workspace
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Workspace name (2–50 characters). |
conversion_tracking | boolean | required | Whether conversion tracking is enabled. Your plan must include conversion tracking to enable it. |
Sample Request
PATCH https://api.campaignlark.com/v1/workspace
Content-Type: application/json
{
"name": "Acme Marketing",
"conversion_tracking": true
}
Response
Success — 200 OK
{
"error": null,
"data": {
"id": 42,
"name": "Acme Marketing",
"conversion_tracking": true,
"is_approved": true,
"is_suspended": false,
"created_at": "2025-01-15T10:30:00Z"
}
}
Workspace Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique workspace ID. |
name | string | Workspace name. |
conversion_tracking | boolean | Whether conversion tracking is enabled for the workspace. |
is_approved | boolean | Whether the workspace has been approved. |
is_suspended | boolean | Whether the workspace is suspended. |
created_at | string | Workspace creation timestamp in ISO 8601 format. |
Errors
| Status | Message | Cause |
|---|---|---|
400 | Invalid request body. | Request body could not be parsed. |
400 | Workspace name must be between 2 and 50 characters. | name is outside the allowed length. |
400 | Your plan does not support conversion tracking. Please upgrade to enable this feature. | Conversion tracking is not included in the workspace plan. |
404 | The workspace does not exist. | The API key's workspace could not be found. |