Kontakty i grupy

Zmień kontakt

Częściowa aktualizacja: podane pola nadpisują, null lub "" czyści pole, pominięte zostają. Zmiana msisdn na numer innego kontaktu = 409. groups zastępuje przypisania. Wymaga zakresu manage.

patch/v1/contacts/{id}

Request

  • Base URL: https://api.przypominamy.com
  • URL: https://api.przypominamy.com/v1/contacts/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

msisdnstring

Numer (E.164, bez plusa lub 9 cyfr = Polska); klucz upsertu

first_namestring nullable

Imię - placeholder {{imie}}

last_namestring nullable

Nazwisko - placeholder {{nazwisko}}

emailstring nullable

Placeholder {{email}}

fieldsobject nullable

Pola własne (do 20; klucz [a-zA-Z_][a-zA-Z0-9_]{0,30}) - placeholder {{nazwa_pola}}

groupsstring[]

Nazwy lub id grup; nieistniejące nazwy są tworzone; zastępuje dotychczasowe przypisania

Example request

{
  "msisdn": "+48600100200",
  "first_name": "Anna",
  "last_name": "Nowak",
  "fields": {
    "wizyta": "10.09 14:00"
  },
  "groups": [
    "VIP"
  ]
}

Response

Zaktualizowany kontakt

idstring
msisdnstring
first_namestring nullable
last_namestring nullable
emailstring nullable
fieldsobject

Pola własne

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "ct_8fK2mQpL0aXz4Wv1",
  "msisdn": "+48600100200",
  "first_name": "Anna",
  "last_name": "Nowak",
  "fields": {
    "wizyta": "10.09 14:00"
  },
  "groups": [
    {
      "id": "gr_Zq7Lk2Pm9sT1",
      "name": "VIP"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.