v1

latestOpenAPI 3.0.02026-07-2664192238.8 KB
Contacts

Update contact by ID

Updates the contact with the specified ID.

Scopes: contacts.write

patch/contacts/{id}

Path parameters

idstring required

Contact ID

Headers

Omnisend-Versionstring required

API version that specifies the response format and behaviour

Request body

addressstring

Street, house number, apartment number.

birthdatestring

Contact birthdate in YYYY-MM-DD format

citystring

City

countrystring

Country name. Used to derive ISO country code when countryCode is not provided

countryCodestring

ISO 3166-1 alpha-2 country code. Takes priority over country when both are provided

createdAtstring

Contact creation timestamp. If provided, stored as "externalCreated" custom property

customPropertiesobject

You can add your own custom properties. Read more in https://api-docs.omnisend.com/reference/contacts#custom-properties

firstNamestring

Contact first name

gender'm' | 'f'

Contact gender. m - male, f - female

lastNamestring

Contact last name

postalCodestring

Postal or zip code

statestring

State or region

tagsstring[]

Labels assigned to the contact. When creating a contact, it is strongly advised to include a source tag, e.g. "source: shopify".

Example request

{
  "address": "1234 Main St",
  "birthdate": "1990-01-01",
  "city": "Los Angeles",
  "country": "United States",
  "countryCode": "US",
  "createdAt": "2024-01-01T00:00:00Z",
  "firstName": "John",
  "gender": "m",
  "identifiers": [
    {
      "consent": {
        "createdAt": "2026-01-01T00:00:00Z",
        "ip": "192.168.1.1",
        "source": "omnisend-form",
        "userAgent": "Mozilla/5.0"
      },
      "id": "example@example.com",
      "sendWelcomeMessage": true,
      "source": "api",
      "type": "email"
    }
  ],
  "lastName": "Doe",
  "postalCode": "90001",
  "state": "New York",
  "tags": [
    "tag1",
    "tag2"
  ]
}

Response

OK

addressstring

Contact Street, house number, apartment number

birthdatestring

Contact birthdate in YYYY-MM-DD format

citystring

Contact city

countrystring

Contact country name

countryCodestring

ISO 3166-1 alpha-2 country code

createdAtstring

Contact creation timestamp (read-only)

customPropertiesobject

Custom contact properties defined for the brand

emailstring

Primary email address derived from the email identifier (read-only)

firstNamestring

Contact first name

gender'm' | 'f'

Contact gender

idstring

Contact unique identifier (read-only)

lastNamestring

Contact last name

phonestring[]

Phone numbers derived from phone identifiers (read-only)

postalCodestring

Contact postal or ZIP code

segmentsstring[]

IDs of segments the contact belongs to (read-only)

statestring

State or province name

status'subscribed' | 'unsubscribed' | 'nonSubscribed'

Email channel subscription status derived from the primary email identifier (read-only)

tagsstring[]

Labels assigned to the contact

updatedAtstring

Contact last updated timestamp (read-only)

Example response

{
  "address": "1234 Main St",
  "birthdate": "1990-01-01",
  "city": "Los Angeles",
  "consents": [
    {
      "channel": "email",
      "createdAt": "2021-05-20T12:00:00Z",
      "ip": "161.1.1.1",
      "source": "api",
      "userAgent": "Mozilla/5.0"
    }
  ],
  "country": "United States",
  "countryCode": "US",
  "createdAt": "2021-05-20T12:00:00Z",
  "email": "example@example.com",
  "firstName": "John",
  "gender": "m",
  "id": "60a6170920d91c215e949b5c",
  "identifiers": [
    {
      "id": "example@example.com",
      "type": "email"
    }
  ],
  "lastName": "Doe",
  "optIns": [
    {
      "channel": "email",
      "optInAt": "2021-05-20T12:00:00Z"
    }
  ],
  "phone": [
    "+1234567890"
  ],
  "postalCode": "90001",
  "state": "New York",
  "status": "subscribed",
  "statuses": [
    {
      "channel": "email",
      "status": "subscribed",
      "statusChangedAt": "2021-05-20T12:00:00Z"
    }
  ],
  "tags": [
    "tag1",
    "tag2",
    "tag3"
  ],
  "updatedAt": "2021-05-20T12:30:00Z"
}