Skip to main content
PATCH
/
contacts
/
update
Update an existing contact
curl --request PATCH \
  --url https://api.indiepitcher.com/v1/contacts/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "[email protected]",
  "userId": "1234567",
  "avatarUrl": "https://example.com/avatar.jpg",
  "name": "John Doe",
  "languageCode": "en_US",
  "addedListSubscripitons": [
    "<string>"
  ],
  "removedListSubscripitons": [
    "<string>"
  ],
  "customProperties": {}
}
'
{
  "success": true,
  "data": {
    "email": "[email protected]",
    "userId": 123456,
    "name": "John Doe",
    "avatarUrl": "https://example.com/profile_pictures/123456",
    "languageCode": "en-US",
    "hardBouncedAt": "2024-04-23T18:25:43.511Z",
    "subscribedToLists": [
      "onboarding",
      "newsletter"
    ],
    "customProperties": {
      "company": "Acme",
      "age": 35
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string
required

The email of the contact.

userId
string | null

The user id of the contact.

Example:

"1234567"

avatarUrl
string | null

The avatar url of the contact.

Example:

"https://example.com/avatar.jpg"

name
string | null

The full name of the contact.

Example:

"John Doe"

languageCode
string | null

The language code of the contact.

Example:

"en_US"

addedListSubscripitons
string[] | null

The list of mailing lists to subscribe the contact to. Use the name field of the lists.

removedListSubscripitons
string[] | null

The list of mailing lists to unsubscribe the contact from. Use the name field of the lists.

customProperties
object

The custom properties of the contact. Custom properties must be first defined in the IndiePitcher dashboard. Pass 'null' to remove a custom property.

Response

200 - application/json

Updated contact

success
boolean
data
object