Skip to main content
POST
/
contacts
/
create
curl --request POST \
--url https://api.brew.new/v1/contacts/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "jane.smith@example.com",
"firstName": "Jane",
"lastName": "Smith"
}'
{
  "success": true,
  "id": "cont_2Jk9mN8pQ7rX4vL1"
}

Authorizations

Authorization
string
header
required

Include your Brew API key as a Bearer token in the Authorization header. Example: Authorization: Bearer bw_api_your_key_here

Body

application/json

Provide the contact's email and any additional contact data.

Custom Properties: Add any custom contact properties as top-level fields in your request. Custom properties can be strings, numbers, booleans, or dates. For detailed information about creating and managing custom properties, see our Custom Properties guide in the Audience section.

Data Types:

  • string — Text values (e.g., "Enterprise", "Product Manager")
  • number — Numeric values (e.g., 50, 99.99, -10)
  • boolean — True/false values (true, false)
  • date — Unix timestamps in seconds (e.g., 1704067200 for 2024-01-01)

Resetting Properties: Send null as the value to clear or reset any contact property.

Reserved Names: Field names like email, firstName, lastName, userId, source, subscribed, and subscriptionGroups are reserved and cannot be used for custom properties.

Request body for creating a new contact (will fail if contact already exists)

email
string<email>
required

Contact's email address (must be valid email format)

Example:

"jane.smith@example.com"

firstName
string

Contact's first name

Example:

"Jane"

lastName
string

Contact's last name

Example:

"Smith"

userId
string

Unique external user ID (e.g., from your app or CRM)

Example:

"user_12345"

source
string

Custom source value to track where the contact came from (defaults to "API")

Example:

"Website signup"

subscribed
boolean
default:true

Whether the contact is subscribed to marketing emails

subscriptionGroups
object

Object mapping subscription group IDs to boolean subscription status

Example:
{
"sg_newsletter": true,
"sg_product_updates": false
}

Response

Contact created successfully

Success response for contact operations

success
boolean
required

Indicates the operation was successful

Example:

true

id
string
required

The contact's unique identifier

Example:

"cont_2Jk9mN8pQ7rX4vL1"

I