Set business context variables for your account
Set business context variables for your account. These variables can be used for personalization in AI calls, templates, and other communications.
This endpoint requires an API key with the can_write_contacts
permission.
Parameter | Type | Required | Description |
---|---|---|---|
variables | object | Yes | Map of variable names to values |
auto_create_variables | boolean | No | Whether to automatically create undefined variables |
Status Code | Error Code | Description |
---|---|---|
400 | invalid_json | Invalid JSON payload |
400 | invalid_value | A variable value doesn’t match its defined type |
400 | undefined_variable | A variable is not defined (when auto_create_variables is false) |
401 | authentication_required | No API key was provided |
401 | invalid_key | The API key is invalid or inactive |
403 | permission_denied | The API key doesn’t have the required permission |
500 | server_error | An unexpected server error occurred |
Values are validated against the variable’s defined type:
Type | Valid Values | Examples |
---|---|---|
text | Any string | "Premium Support" |
number | Numbers, numeric strings | 250.50 , "42" |
date | ISO date strings | "2023-12-01" , "2023-01-15T14:30:00Z" |
boolean | Boolean values, boolean strings | true , false , "true" , "yes" , "1" |
select | Value from predefined options | Must match one of the defined options |
When auto_create_variables
is set to true
:
office_hours
→ “Office Hours”)When auto_create_variables
is false
(default):
business_
when used in templates (e.g., business_office_hours
)null
will remove it from your business context