---
title: "Zmień kontakt"
method: PATCH
path: "/v1/contacts/{id}"
tags: ["Kontakty i grupy"]
---

# Zmień kontakt

`PATCH /v1/contacts/{id}`

## Request

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

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`.

## Path parameters

- `id` string, required

## Request body

- ContactInput: Treść `POST /v1/contacts` (wymagane `msisdn`) i `PATCH /v1/contacts/{id}` (wszystko opcjonalne). W `POST` może być też tablicą takich obiektów (do 500).
  - `msisdn` string: Numer (E.164, bez plusa lub 9 cyfr = Polska); klucz upsertu
  - `first_name` string, nullable: Imię - placeholder `{{imie}}`
  - `last_name` string, nullable: Nazwisko - placeholder `{{nazwisko}}`
  - `email` string, nullable: Placeholder `{{email}}`
  - `fields` object, nullable: Pola własne (do 20; klucz `[a-zA-Z_][a-zA-Z0-9_]{0,30}`) - placeholder `{{nazwa_pola}}`
  - `groups` string[]: Nazwy lub id grup; nieistniejące nazwy są tworzone; zastępuje dotychczasowe przypisania

## Response `200`

Zaktualizowany kontakt

- Contact
  - `id` string
  - `msisdn` string
  - `first_name` string, nullable
  - `last_name` string, nullable
  - `email` string, nullable
  - `fields` object: Pola własne
  - `groups` object[]
    - `id` string
    - `name` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Błąd walidacji
- `401`: Brak lub nieprawidłowy klucz API
- `403`: Klucz bez wymaganego zakresu (albo konto zawieszone / testowe wysyła na niezweryfikowany numer)
- `404`: Nie znaleziono
- `409`: Inny kontakt ma już ten numer

---

[API](https://skmtc.dev/przypominamy/apis/przypominamy-com-sms-api.md) · [All operations](https://skmtc.dev/przypominamy/apis/przypominamy-com-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/przypominamy/apis/przypominamy-com-sms-api/revisions/c20f9cfc2a7d?raw)
