Update Workspace
Update the name, interaction tracking, and conversion tracking settings 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, and interaction_tracking must be enabled. |
interaction_tracking | boolean | optional | Whether open and click tracking is enabled for email and SMS campaigns and automations. When omitted, the current value is kept. Disabling it also requires conversion_tracking to be false. |
Sample Request
PATCH https://api.campaignlark.com/v1/workspace
Content-Type: application/json
{
"name": "Acme Marketing",
"conversion_tracking": true,
"interaction_tracking": true
}
Response
Success — 200 OK
{
"error": null,
"data": {
"id": 42,
"name": "Acme Marketing",
"conversion_tracking": true,
"interaction_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. |
interaction_tracking | boolean | Whether open and click tracking is enabled for the workspace. When false, no tracking pixel is inserted into emails and links in emails and SMS messages are not rewritten, so opens and clicks are not recorded. |
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. |
400 | Conversion tracking cannot be enabled while interaction tracking is disabled. | conversion_tracking is true while interaction_tracking is (or is being set to) false. |
404 | The workspace does not exist. | The API key's workspace could not be found. |