Skip to main content
PUT
/
contacts
/
{identifier}
curl --request PUT \
--url https://api.brew.new/v1/contacts/{identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"firstName": "Jane Marie",
"lastName": "Smith-Johnson"
}'
{
  "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

Path Parameters

identifier
string
required

Either the contact's email address or their userId. When using an email address, you must URI-encode it (replace @ with %40). Examples:

Body

application/json

Provide the fields you want to update. You can include custom contact properties as top-level fields. For compliance reasons, you can only set subscribed to false (not true).

Important: This endpoint only updates existing contacts - it will not create new contacts. To create contacts, use the Create Contact endpoint.

Updating Email Addresses: You can update a contact's email address, but you must use their userId as the path identifier (not their current email) since email is the primary identifier.

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 documentation.

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 updating an existing contact

email
string<email>

Updated email address (requires using userId as path identifier)

Example:

"new.email@example.com"

firstName
string

Updated first name

Example:

"Jane Marie"

lastName
string

Updated last name

Example:

"Smith-Johnson"

userId
string

Updated external user ID

Example:

"user_67890"

source
string

Updated source value

Example:

"Mobile app"

subscribed
boolean

Subscription status (can only be set to false for compliance)

Example:

false

subscriptionGroups
object

Updated subscription group memberships

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

Response

Contact updated 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