PATCH
/
contacts
/
update
curl --request PATCH \
  --url https://api.indiepitcher.com/v1/contacts/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "john@acme.com",
  "userId": "1234567",
  "avatarUrl": "https://example.com/avatar.jpg",
  "name": "John Doe",
  "languageCode": "en_US",
  "addedListSubscripitons": [
    "<string>"
  ],
  "removedListSubscripitons": [
    "<string>"
  ],
  "customProperties": {}
}'
{
  "success": true,
  "data": {
    "email": "john@acme.com",
    "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.

avatarUrl
string | null

The avatar url of the contact.

name
string | null

The full name of the contact.

languageCode
string | null

The language code of the contact.

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 | null

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