Delete Context Variable Definition
Delete an existing context variable definition. Note that default system variables cannot be deleted.Endpoint
Authentication
This endpoint requires an API key with thecan_write_contacts
permission.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
variable_id | integer | Yes | ID of the variable definition to delete |
Response
Error Codes
Status Code | Error Code | Description |
---|---|---|
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 |
403 | delete_not_allowed | Cannot delete default variables |
404 | not_found | Variable definition not found |
500 | server_error | An unexpected server error occurred |
Example Request
Example Response
Notes
- Deleting a variable definition does not automatically remove the variable values from your contacts or business profile
- Default system variables (
is_default: true
) cannot be deleted - You can only delete variable definitions that belong to your account
- Use this endpoint with caution, as deleting a variable definition can affect personalization in your AI calls and templates