İçeriğe geç
Veri MerkeziVeri MerkeziAPI

API referansı

Kişi rehberinize kişi ekleyin, toplu içe aktarın, listeleyin ve abonelikten çıkanları izleyin.

#Contact nesnesi

  • idinteger
    Kişi kimliği.
  • phonestring
    Uluslararası biçimde telefon, + önekiyle.
  • namestring · boş olabilir
    Ad soyad.
  • emailstring · boş olabilir
    E-posta.
  • companystring · boş olabilir
    Firma.
  • tagsarray
    Etiketler.
  • sourcestring
    Kaynak (API ile eklenenlerde api).
  • opted_outboolean
    Kişi mesaj almayı reddetti mi.
  • opted_out_atstring · boş olabilir
    Reddetme zamanı (ISO 8601).
  • created_atstring
    Oluşturulma zamanı.
Contact nesnesi
{
  "id": 26481,
  "phone": "+905550000000",
  "name": "Ayşe Yılmaz",
  "email": "[email protected]",
  "company": "Firma A.Ş.",
  "tags": [
    "vip",
    "istanbul"
  ],
  "source": "api",
  "opted_out": false,
  "opted_out_at": null,
  "created_at": "2026-10-01 14:22:10"
}

#Kişileri listele

GET/contacts
Kişi rehberinizi yeniden eskiye, imleçle sayfalı döndürür. Kapsam: contacts:read

Sorgu parametreleri

  • limitintegeristeğe bağlı
    Sayfa boyutu (1–200).Varsayılan: 50
  • cursorstringisteğe bağlı
    Önceki yanıttaki opak next_cursor.
  • qstringisteğe bağlı
    Ad ya da telefon içinde arama.
  • opted_outbooleanisteğe bağlı
    Abonelik durumuna göre süzer.Değerler: true, false

Hatalar

DurumKodNe zaman
403insufficient_scopeAnahtarda contacts:read kapsamı yok.
curl -X GET "https://api.verimerkezi.app/wa/contacts?limit=50&q=ayse" \
  -H "Authorization: Bearer $VM_API_KEY"
Yanıt 200
{
  "ok": true,
  "contacts": [
    {
      "id": 26481,
      "phone": "+905550000000",
      "name": "Ayşe Yılmaz",
      "email": "[email protected]",
      "company": "Firma A.Ş.",
      "tags": [
        "vip",
        "istanbul"
      ],
      "source": "api",
      "opted_out": false,
      "opted_out_at": null,
      "created_at": "2026-10-01 14:22:10"
    }
  ],
  "next_cursor": "eyJpZCI6MjY0ODEsImsiOiJpZCIsImQiOiJkZXNjIn0",
  "has_more": true
}

#Abonelikten çıkanları listele

GET/contacts/opted-out
Mesaj almayı reddeden kişileri döndürür. contact.opt_out_changed olayıyla birlikte artımlı eşitleme için since kullanın. Kapsam: contacts:read
reason değeri örnektir; kaydedilen gerekçeyi döndürür.

Sorgu parametreleri

  • limitintegeristeğe bağlı
    Sayfa boyutu (1–200).Varsayılan: 50
  • cursorstringisteğe bağlı
    Opak imleç.
  • sincestringisteğe bağlı
    ISO 8601; yalnız bu zamandan sonra reddedenler.

Hatalar

DurumKodNe zaman
403insufficient_scopeAnahtarda contacts:read kapsamı yok.
422invalid_requestsince ISO 8601 değil (field: since).
curl -X GET "https://api.verimerkezi.app/wa/contacts/opted-out?since=2026-10-01T00%3A00%3A00%2B03%3A00" \
  -H "Authorization: Bearer $VM_API_KEY"
Yanıt 200
{
  "ok": true,
  "contacts": [
    {
      "id": 26470,
      "phone": "+905550000001",
      "name": "Mehmet Kaya",
      "opted_out": true,
      "opted_out_at": "2026-10-05T16:40:00+03:00",
      "reason": "whatsapp_ret"
    }
  ],
  "next_cursor": null,
  "has_more": false
}

#Kişi ekle

POST/contacts
Rehbere tek kişi ekler. Telefon, ülke koduyla birleştirilerek uluslararası biçime çevrilir. Kapsam: contacts:write

İstek gövdesi

  • phonestringzorunlu
    Telefon (en az 10 hane). Ülke koduyla başlamıyorsa country_code eklenir.
  • namestringzorunlu
    Ad soyad (en az 2 karakter).
  • country_codestringisteğe bağlı
    Ülke kodu.Varsayılan: 90
  • emailstringisteğe bağlı
    E-posta.
  • companystringisteğe bağlı
    Firma.
  • tagsarrayisteğe bağlı
    Etiketler.

Hatalar

DurumKodNe zaman
403insufficient_scopeAnahtarda contacts:write kapsamı yok.
409contact_existsBu telefon zaten kayıtlı (error.id mevcut kişiyi verir).
422invalid_phoneGeçerli telefon zorunlu.
422invalid_namename en az 2 karakter olmalı.
curl -X POST "https://api.verimerkezi.app/wa/contacts" \
  -H "Authorization: Bearer $VM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "5550000000",
    "country_code": "90",
    "name": "Ayşe Yılmaz",
    "email": "[email protected]",
    "company": "Firma A.Ş.",
    "tags": [
      "vip",
      "istanbul"
    ]
  }'
Yanıt 201
{
  "ok": true,
  "id": 26481,
  "phone": "+905550000000",
  "name": "Ayşe Yılmaz"
}

#Kişileri toplu ekle

POST/contacts/bulk
Tek istekte en fazla 1000 kişi ekler. Geçersiz satırlar errors dizisinde döner; diğerleri eklenir. Kapsam: contacts:write
Satır hataları { "index": 47, "code": "invalid" | "duplicate", "phone": "..." } biçimindedir.
skip_duplicates gönderilmezse yinelenenler hata olarak raporlanır.

İstek gövdesi

  • contactsarrayzorunlu
    Kişi listesi (en fazla 1000).
    Alt alanları göster
    • phonestringzorunlu
      Telefon.
    • namestringzorunlu
      Ad soyad (en az 2 karakter).
    • emailstringisteğe bağlı
      E-posta.
    • companystringisteğe bağlı
      Firma.
    • tagsarrayisteğe bağlı
      Etiketler.
  • skip_duplicatesbooleanisteğe bağlı
    true ise kayıtlı telefonlar sessizce atlanır; aksi hâlde errors içinde duplicate döner.
  • country_codestringisteğe bağlı
    Ülke kodu.Varsayılan: 90

Hatalar

DurumKodNe zaman
403insufficient_scopeAnahtarda contacts:write kapsamı yok.
422invalid_requestcontacts dizisi zorunlu.
422too_manyTek istekte en fazla 1000 kişi.
curl -X POST "https://api.verimerkezi.app/wa/contacts/bulk" \
  -H "Authorization: Bearer $VM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {
        "phone": "5550000003",
        "name": "Ali Demir"
      },
      {
        "phone": "5550000002",
        "name": "Zeynep Şahin",
        "tags": [
          "yeni"
        ]
      }
    ],
    "skip_duplicates": true,
    "country_code": "90"
  }'
Yanıt 201
{
  "ok": true,
  "inserted": 2,
  "skipped": 0,
  "errors": []
}