Workspace events
Define workspace events and the types of their properties, so the w: events you send are checked.
Create a workspace event
Defines a workspace event: a name and the properties every event of that type carries, each with a type. You then send it as w:<name>, and Emailit rejects events that don’t match. Requires an API key with the full scope.
Workspace events are included with Pro, Business and Custom plans. A workspace can define as many as its plan has event types: 100 on Pro and 1,000 on Business, with no limit on Custom. Custom events (c:<name>) need no definition. See Workspace events.
/workspace/eventsBody parameters
namestringrequiredcustomer.type: 1 to 100 letters, digits, ., - or _, starting with a letter or digit. You can also send it with the prefix (w:customer.type); the prefix is removed. Must be unique in the workspace.titlestring | nulldescriptionstring | nullpropertiesobject[]Up to 50 property definitions. Default [], which means events of this type carry no properties. Each one has:
name(required): 1 to 64 letters, digits,-or_, starting with a letter or digit. Dots aren’t allowed, because webhook filters and templates use dots to reach nested values. Names must be unique within the definition.type(required):string,number,dateorboolean, in any letter case.title: a label, up to 120 characters.description: up to 1,000 characters.required:trueif every event must include the property. Defaultfalse.
Returns
Returns 201 Created with the workspace event object.
| Status | When |
|---|---|
403 |
The API key doesn’t have the full scope, or the workspace is on Pay as you go: error is plan_required and required_plan is pro. |
409 |
A workspace event with this name exists. errors.name says so. |
422 |
A field is invalid: errors is keyed by its path, such as name or properties.1.type, and message repeats the first problem. Also returned with code: "workspace_events_limit" when the workspace already has as many workspace events as its plan allows, and for a name that starts with c:. |
{
"object": "workspace_event",
"id": "etp_2yHn4Kd8QwE1rT6vBx9LmZ3sPf0",
"name": "customer.type",
"type": "w:customer.type",
"title": "Customer type",
"description": "Set when a customer's account type changes in the shop.",
"properties": [
{ "name": "segment", "type": "string", "title": "Segment", "description": "b2b or b2c", "required": true },
{ "name": "since", "type": "date", "title": null, "description": null, "required": false }
],
"created_at": "2026-10-19T08:00:00.000000+00:00",
"updated_at": "2026-10-19T08:00:00.000000+00:00"
}{
"error": "plan_required",
"required_plan": "pro",
"message": "Workspace and custom events are included with Pro and Business."
}{
"error": "w:customer.type is already defined",
"errors": {
"name": ["is already defined"]
}
}{
"error": "properties.1.type must be one of string, number, date, boolean",
"message": "properties.1.type must be one of string, number, date, boolean",
"errors": {
"properties.1.type": ["must be one of string, number, date, boolean"]
}
}Retrieve a workspace event
Retrieves the definition of a workspace event: its name, title and the properties senders must follow. Requires an API key with the full scope.
/workspace/events/{id}Path parameters
idstringrequiredetp_…), its name (customer.type) or its event type (w:customer.type). URL-encode the : if your client doesn’t.Returns
Returns the workspace event object.
objectstringworkspace_event.idstringetp_.namestringtypestringw: followed by the name.titlestring | nulldescriptionstring | nullpropertiesobject[]The properties an event of this type can carry, each with:
name: the key in the event’sproperties.type:string,number,dateorboolean. See Property types.title,description: optional labels, ornull.required: whether every event must include it.
created_at, updated_atstringReturns 404 with error: "Workspace event not found" if no definition matches.
{
"object": "workspace_event",
"id": "etp_2yHn4Kd8QwE1rT6vBx9LmZ3sPf0",
"name": "customer.type",
"type": "w:customer.type",
"title": "Customer type",
"description": "Set when a customer's account type changes in the shop.",
"properties": [
{ "name": "segment", "type": "string", "title": "Segment", "description": "b2b or b2c", "required": true },
{ "name": "since", "type": "date", "title": null, "description": null, "required": false }
],
"created_at": "2026-10-19T08:00:00.000000+00:00",
"updated_at": "2026-10-19T08:00:00.000000+00:00"
}{
"error": "Workspace event not found"
}Update a workspace event
Updates the fields you pass and leaves the others unchanged. Requires an API key with the full scope.
The definition only checks new events. Events already stored keep their type and properties, so after a change, older events may have properties the definition no longer lists.
propertiesreplaces the whole list. To add a property, send the current list plus the new one.- Renaming changes the type to send. Events stored under the old name keep it, and new events with the old name are rejected, unless you define it again.
/workspace/events/{id}Path parameters
idstringrequiredetp_…), its name or its event type (w:…).Body parameters
namestringtitlestring | nullnull or an empty string clears it.descriptionstring | nullnull or an empty string clears it.propertiesobject[][] removes every property.Returns
Returns the updated workspace event object.
| Status | When |
|---|---|
404 |
No definition matches id. |
409 |
Another workspace event already has the new name. |
422 |
A field is invalid: errors is keyed by its path, and message repeats the first problem. |
{
"object": "workspace_event",
"id": "etp_2yHn4Kd8QwE1rT6vBx9LmZ3sPf0",
"name": "customer.type",
"type": "w:customer.type",
"title": "Customer type",
"description": "Set when a customer's account type changes in the shop.",
"properties": [
{ "name": "segment", "type": "string", "title": "Segment", "description": null, "required": true },
{ "name": "since", "type": "date", "title": null, "description": null, "required": false },
{ "name": "vat_exempt", "type": "boolean", "title": null, "description": null, "required": false }
],
"created_at": "2026-10-19T08:00:00.000000+00:00",
"updated_at": "2026-10-19T10:12:45.000000+00:00"
}{
"error": "w:customer.segment is already defined",
"errors": {
"name": ["is already defined"]
}
}List workspace events
Returns the workspace’s event definitions, sorted by name. Requires an API key with the full scope.
/workspace/eventsQuery parameters
pageintegerdefault: 1limitintegerdefault: 100searchstringmatchstringall (default) requires every filter. or matches any filter. See Filtering.
orderstringSort key for this list. See the sort keys below.
directionstringasc or desc.
Filter keys
Filters use key.condition=value query parameters, for example name.starts_with=order. or created_at.after=2026-10-01. See Filtering for the conditions per type.
| Key | Type | Notes |
|---|---|---|
name |
string | The name without the w: prefix. |
title |
string | |
created_at |
date | |
updated_at |
date |
Sort keys for order: name, title, created_at, updated_at. The default is name, ascending.
Returns
dataobject[]total_recordsintegernext_page_urlstring | nullnull on the last page. It carries only page and limit; add your search and filters again when you follow it.previous_page_urlstring | nullnull on the first page.{
"data": [
{
"object": "workspace_event",
"id": "etp_2yHn4Kd8QwE1rT6vBx9LmZ3sPf0",
"name": "customer.type",
"type": "w:customer.type",
"title": "Customer type",
"description": "Set when a customer's account type changes in the shop.",
"properties": [
{ "name": "segment", "type": "string", "title": "Segment", "description": "b2b or b2c", "required": true },
{ "name": "since", "type": "date", "title": null, "description": null, "required": false }
],
"created_at": "2026-10-19T08:00:00.000000+00:00",
"updated_at": "2026-10-19T08:00:00.000000+00:00"
}
],
"total_records": 1,
"next_page_url": null,
"previous_page_url": null
}Delete a workspace event
Deletes a workspace event definition. Requires an API key with the full scope.
Events already stored with this type are kept, in the event log and on contacts. New events of the type are rejected with 422 until you define it again. Webhooks subscribed to the type keep the subscription.
/workspace/events/{id}Path parameters
idstringrequiredetp_…), its name or its event type (w:…).Returns
objectstringworkspace_event.idstringnamestringtypestringw: followed by the name.deletedbooleantrue.Returns 404 if no definition matches.
{
"object": "workspace_event",
"id": "etp_2yHn4Kd8QwE1rT6vBx9LmZ3sPf0",
"name": "customer.type",
"type": "w:customer.type",
"deleted": true
}