A custom variable is EmailBisons way of attaching any extra information to a lead. Custom Variables need to be created before they can be attached to leads with a custom value for each lead.
Note: custom variables are unique per workspace

Creating Custom Variables

You can create a custom variable by submitting a POST request at the following endpoint.
/api/custom-variables
The only field you can and must provide is name, which is a name for the custom variable.

Attaching Custom Variables to Leads

When you are creating or updating a lead - either with a POST or a PUT - you can pass the custom_variables field as an array of objects that contain a name key and a value key. The JSON will look like the following.
"custom_variables": [
    {
  	  "name": "phone_number",
  	  "value": "123-456-7890"
	},
    {
	  "name": "priority",
	  "value": "super-high"
    }
  ]
Note how the everything is wrapped in an array identifier [], and each custom variable is wrapped in an object identifier {}
An example of adding custom variables when updating leads:
curl https://dedi.emailbison.com/api/leads \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@doe.com",
  "custom_variables": [
	{
	  "name": "phone number",
	  "value": "9059999999"
	}
  ]
}'