Skip to main content

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

FieldTypeRequiredDescription
namestringrequiredWorkspace name (2–50 characters).
conversion_trackingbooleanrequiredWhether 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

FieldTypeDescription
idintegerUnique workspace ID.
namestringWorkspace name.
conversion_trackingbooleanWhether conversion tracking is enabled for the workspace.
is_approvedbooleanWhether the workspace has been approved.
is_suspendedbooleanWhether the workspace is suspended.
created_atstringWorkspace creation timestamp in ISO 8601 format.

Errors

StatusMessageCause
400Invalid request body.Request body could not be parsed.
400Workspace name must be between 2 and 50 characters.name is outside the allowed length.
400Your plan does not support conversion tracking. Please upgrade to enable this feature.Conversion tracking is not included in the workspace plan.
404The workspace does not exist.The API key's workspace could not be found.