Current event destinations and privacy choices
/api/v1/activity/config
Anonymous access uses an installation-selected organisation and a secure visitor cookie. Anonymous writes require exact same-origin Origin; authenticated writes require session CSRF verification.
Authentication does not grant every action. Company scope, roles and current record access still apply. Protected writes require CSRF verification; company writes also require recent sign-in. Read the authentication guide.
// Run only in your authorised same-origin test application.
const csrf = document.cookie.split('; ').find(c =>
c.startsWith('__Host-csrf='))?.slice('__Host-csrf='.length);
if (!csrf) throw new Error('Sign in again before continuing.');
const response = await fetch('/api/v1/activity/config', {
method: 'GET',
credentials: 'same-origin',
headers: { 'X-CSRF-Token': decodeURIComponent(csrf) },
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
// Inspect Content-Type before reading JSON, text or a download.
// A 204 response has no body. Handle errors using the feature guide.Request parameters
| Name | Location | Requirement | Schema |
|---|---|---|---|
__Host-session | cookie | Required | {"type":"string"} |
__Host-activity | cookie | Optional | {"type":"string"} |
__Host-csrf | cookie | Required | {"type":"string"} |
X-CSRF-Token | header | Required | {"type":"string"} |
Origin | header | Required | {"type":"string"} |
User-Agent | header | Optional | {"maxLength":512,"type":"string"} |
X-Activity-Path | header | Optional | {"maxLength":256,"type":"string"} |
Responses
200 OK
application/json
Schema: View
$schemastring · optional- A URL to the JSON Schema for this object.
canManageboolean · required- See the definition for constraints and nested fields.
capabilitiesarray | null · required- See the definition for constraints and nested fields.
eventsarray | null · required- See the definition for constraints and nested fields.
organisationIdstring · required- See the definition for constraints and nested fields.
preferencesPreference · required- See the referenced schema in the complete definition below.
settingsSettings · required- See the referenced schema in the complete definition below.
vimeoApiboolean · required- See the definition for constraints and nested fields.
Complete schema definition
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/View.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"canManage": {
"type": "boolean"
},
"capabilities": {
"items": {
"$ref": "#/components/schemas/Capability"
},
"type": [
"array",
"null"
]
},
"events": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"organisationId": {
"type": "string"
},
"preferences": {
"$ref": "#/components/schemas/Preference"
},
"settings": {
"$ref": "#/components/schemas/Settings"
},
"vimeoApi": {
"type": "boolean"
}
},
"required": [
"organisationId",
"preferences",
"settings",
"capabilities",
"canManage",
"vimeoApi",
"events"
],
"type": "object"
}default Error
application/problem+json
Schema: ErrorModel
$schemastring · optional- A URL to the JSON Schema for this object.
detailstring · optional- A human-readable explanation specific to this occurrence of the problem.
errorsarray | null · optional- Optional list of individual error details
instancestring · optional- A URI reference that identifies the specific occurrence of the problem.
statusinteger · optional- HTTP status code
titlestring · optional- A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
typestring · optional- A URI reference to human-readable documentation for the error.
Complete schema definition
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/ErrorModel.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem.",
"examples": [
"Property foo is required but is missing."
],
"type": "string"
},
"errors": {
"description": "Optional list of individual error details",
"items": {
"$ref": "#/components/schemas/ErrorDetail"
},
"type": [
"array",
"null"
]
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem.",
"examples": [
"https://example.com/error-log/abc123"
],
"format": "uri",
"type": "string"
},
"status": {
"description": "HTTP status code",
"examples": [
400
],
"format": "int64",
"type": "integer"
},
"title": {
"description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
"examples": [
"Bad Request"
],
"type": "string"
},
"type": {
"default": "about:blank",
"description": "A URI reference to human-readable documentation for the error.",
"examples": [
"https://example.com/errors/example"
],
"format": "uri",
"type": "string"
}
},
"type": "object"
}The default error response can cover several status codes. Read error handling and retry guidance.
Referenced schemas
Expand a named definition to inspect nested fields and references. The download contains the complete OpenAPI document.
Capability
{
"additionalProperties": false,
"properties": {
"configured": {
"type": "boolean"
},
"provider": {
"type": "string"
},
"purpose": {
"type": "string"
}
},
"required": [
"provider",
"configured",
"purpose"
],
"type": "object"
}Destination
{
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"events": {
"items": {
"type": "string"
},
"maxItems": 20,
"type": [
"array",
"null"
]
},
"provider": {
"enum": [
"mixpanel",
"ga4",
"klaviyo",
"meta"
],
"type": "string"
}
},
"required": [
"provider",
"enabled",
"events"
],
"type": "object"
}ErrorDetail
{
"additionalProperties": false,
"properties": {
"location": {
"description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
"type": "string"
},
"message": {
"description": "Error message text",
"type": "string"
},
"value": {
"description": "The value at the given location"
}
},
"type": "object"
}ErrorModel
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/ErrorModel.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem.",
"examples": [
"Property foo is required but is missing."
],
"type": "string"
},
"errors": {
"description": "Optional list of individual error details",
"items": {
"$ref": "#/components/schemas/ErrorDetail"
},
"type": [
"array",
"null"
]
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem.",
"examples": [
"https://example.com/error-log/abc123"
],
"format": "uri",
"type": "string"
},
"status": {
"description": "HTTP status code",
"examples": [
400
],
"format": "int64",
"type": "integer"
},
"title": {
"description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
"examples": [
"Bad Request"
],
"type": "string"
},
"type": {
"default": "about:blank",
"description": "A URI reference to human-readable documentation for the error.",
"examples": [
"https://example.com/errors/example"
],
"format": "uri",
"type": "string"
}
},
"type": "object"
}Preference
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/Preference.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"analytics": {
"type": "boolean"
},
"marketing": {
"type": "boolean"
}
},
"required": [
"analytics",
"marketing"
],
"type": "object"
}Settings
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/Settings.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"destinations": {
"items": {
"$ref": "#/components/schemas/Destination"
},
"maxItems": 4,
"type": [
"array",
"null"
]
},
"revision": {
"format": "int64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"revision",
"destinations"
],
"type": "object"
}View
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/View.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"canManage": {
"type": "boolean"
},
"capabilities": {
"items": {
"$ref": "#/components/schemas/Capability"
},
"type": [
"array",
"null"
]
},
"events": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"organisationId": {
"type": "string"
},
"preferences": {
"$ref": "#/components/schemas/Preference"
},
"settings": {
"$ref": "#/components/schemas/Settings"
},
"vimeoApi": {
"type": "boolean"
}
},
"required": [
"organisationId",
"preferences",
"settings",
"capabilities",
"canManage",
"vimeoApi",
"events"
],
"type": "object"
}Operation ID: activity-config · Contract 0.0.0-dev