v1

latestOpenAPI 3.0.02026-07-2491237338.9 KB
Contacts

Update a contact

Updates a contact.

patch/contact/contacts/{id}

Path parameters

idstring required
Example:alice_01

Identifier of the contact. Supports a contact ID, a phone number in E.164 format starting with + (for example, +16315551111), or a Meta username without the leading @. A Meta username must contain 3 to 35 letters, digits, periods, or underscores. If a numeric value can be interpreted as both a Meta username and a contact ID, it is resolved as a Meta username first. If no contact has that Meta username, the value is resolved as a contact ID.

Request body

remarkNamestring

Contact's remark name. Maximum length: 250 characters.

nicknamestring

Deprecated compatibility alias for remarkName. When remarkName is absent, this value is saved as the contact's remark name. It does not update the read-only WhatsApp nickname. Maximum length: 250 characters.

phoneNumberstring

Unique Phone number in E.164 format.

countryCodestring

Two-letter country abbreviation. See ISO 3166-1 alpha-2 country code.

emailstring

The contact's email address. If present, the email address must be unique.

tagsstring[]

Contact's tags. Maximum items: 50.

ownerEmailstring

The email address of the contact's owner.

Example request

{
  "remarkName": "remark name",
  "nickname": "remark name",
  "phoneNumber": "+16315551111",
  "countryCode": "US",
  "email": "support@example.com",
  "ownerEmail": "support@example.com"
}

Response

Successfully updated the contact.

idstring required

Unique ID for the object.

nicknamestring

Contact's nickname.

countryCodestring

Two-letter country abbreviation. See ISO 3166-1 alpha-2 country code.

countryNamestring

Full country name.

phoneNumberstring

Unique Phone number in E.164 format.

emailstring

The contact's email address. If present, the email address must be unique.

lastSeenstring date-time

The time at which the contact last sent a message to your business, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

lastMessageToPhoneNumberstring

The business phone number that the contact last sent a message to.

tagsstring[]

Contact's tags.

createTimestring date-time

The time at which the contact was created, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

ownerEmailstring

The email address of the contact's owner.

sourceType'WHATSAPP' | 'GROWTH_TOOL' | 'MANUALLY_ADDED' | 'FILE_IMPORT' | 'SHOPIFY' | 'API' | 'AD' | 'POST' | 'CALLING' | 'SMB' | 'UNKNOWN'

Contact source type enumeration values. These are internal type identifiers, not the display names shown on the contact page. Each enumeration value corresponds to the following display names:

  • WHATSAPP: "Inbound message"
  • GROWTH_TOOL: "Link/QR Code"
  • MANUALLY_ADDED: "Manually added"
  • FILE_IMPORT: "File import"
  • SHOPIFY: "Shopify"
  • API: "API added"
  • AD: "AD"
  • POST: "Post"
  • CALLING: "Calling"
  • SMB: "Whatsapp Business App"
  • UNKNOWN: "Unknown"
sourceIdstring

Source identifier. A unique identifier related to the contact creation source.

sourceUrlstring

Source URL. The source link address where the contact was created.

Example response

{
  "nickname": "nickname",
  "countryCode": "US",
  "phoneNumber": "+16315551111",
  "email": "support@example.com",
  "lastSeen": "2022-06-01T12:00:00.000Z",
  "lastMessageToPhoneNumber": "+16315551111",
  "createTime": "2022-06-01T12:00:00.000Z",
  "ownerEmail": "support@example.com",
  "sourceType": "API",
  "sourceId": "batch_import_123",
  "sourceUrl": "https://example.com/signup"
}