CRM

contacts

15 uç · /api/crm/v1/contacts

İstek örnekleri ucun GERÇEK metodu ve yolundan üretilir. 10 ucun elle doğrulanmış gövde örneği henüz yok; o uçlarda iskelet gövdesizdir — uydurma bir alan yazmıyoruz.

POST/api/crm/public/v1/contacts

Kişi oluştur

API anahtarı

Yeni bir kişi kaydı açar. `email` ya da `external_id` benzersizdir; aynı değerle ikinci kez çağırmak 409 döner. Yazma isteğidir: yeniden denemelerde `Idempotency-Key` kullan.

Gerekli kapsam: contacts.write

İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "ayse@ornek.com",
  "name": "Ayşe Yılmaz",
  "phone": "+905321234567",
  "external_id": "musteri-8842",
  "custom_attributes": {
    "plan": "pro",
    "sehir": "İstanbul"
  }
}'
Yanıt
{
  "data": {
    "type": "contact",
    "id": "0193c4e2-7a1b-7c3d-9e5f-1a2b3c4d5e6f",
    "role": "user",
    "email": "ayse@ornek.com",
    "name": "Ayşe Yılmaz",
    "phone": "+905321234567",
    "external_id": "musteri-8842",
    "created_at": 1787304000
  },
  "trace_id": "01JC…"
}
GET/api/crm/public/v1/contacts

Kişileri listele (imleçli)

API anahtarı

İmleç tabanlı sayfalama. `per_page` en fazla 150'dir; `pages.next` yoksa liste bitmiştir. `include_archived=true` arşivlenmiş kayıtları da getirir.

Gerekli kapsam: contacts.read

İstek
curl -X GET "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts?per_page=50" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": {
    "type": "list",
    "data": [
      {
        "type": "contact",
        "id": "0193c4e2-7a1b-7c3d-9e5f-1a2b3c4d5e6f",
        "email": "ayse@ornek.com",
        "name": "Ayşe Yılmaz"
      }
    ],
    "pages": {
      "type": "pages",
      "per_page": 50,
      "next": {
        "starting_after": "eyJjIjoxNzg3MzA0MDAwfQ"
      }
    }
  },
  "trace_id": "01JC…"
}
GET/api/crm/public/v1/contacts/{id}

Tek kişiyi getir

API anahtarıYol parametresi: id

Gerekli kapsam: contacts.read

İstek
curl -X GET "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": {
    "type": "contact",
    "id": "0193c4e2-7a1b-7c3d-9e5f-1a2b3c4d5e6f",
    "email": "ayse@ornek.com",
    "name": "Ayşe Yılmaz",
    "custom_attributes": {
      "plan": "pro"
    }
  },
  "trace_id": "01JC…"
}
PUT/api/crm/public/v1/contacts/{id}

Kişiyi güncelle

API anahtarıYol parametresi: id

Yalnız gönderdiğin alanlar değişir. Bir alanı TEMİZLEMEK için boş dize gönder.

Gerekli kapsam: contacts.write

İstek
curl -X PUT "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ayşe Yılmaz Demir",
  "custom_attributes": {
    "plan": "enterprise"
  }
}'
Yanıt
{
  "data": {
    "type": "contact",
    "id": "0193c4e2-7a1b-7c3d-9e5f-1a2b3c4d5e6f",
    "name": "Ayşe Yılmaz Demir"
  },
  "trace_id": "01JC…"
}
DELETE/api/crm/public/v1/contacts/{id}

Delete contact

API anahtarıYol parametresi: id
İstek
curl -X DELETE "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
POST/api/crm/public/v1/contacts/{id}/archive

Archive contact

API anahtarıYol parametresi: id
İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/archive" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
GET/api/crm/public/v1/contacts/{id}/attributes

Get attributes

API anahtarıYol parametresi: id
İstek
curl -X GET "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/attributes" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
PUT/api/crm/public/v1/contacts/{id}/attributes

Set attributes

API anahtarıYol parametresi: id
İstek
curl -X PUT "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/attributes" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
POST/api/crm/public/v1/contacts/{id}/notes

Create note

API anahtarıYol parametresi: id
İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/notes" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
GET/api/crm/public/v1/contacts/{id}/notes

List notes

API anahtarıYol parametresi: id
İstek
curl -X GET "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/notes" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
POST/api/crm/public/v1/contacts/{id}/tags

Add tag

API anahtarıYol parametresi: id
İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/tags" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
DELETE/api/crm/public/v1/contacts/{id}/tags/{name}

Remove tag

API anahtarıYol parametresi: idname
İstek
curl -X DELETE "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/tags/<name>" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
POST/api/crm/public/v1/contacts/{id}/unarchive

Unarchive contact

API anahtarıYol parametresi: id
İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/<id>/unarchive" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
POST/api/crm/public/v1/contacts/merge

Merge contacts

API anahtarı
İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/merge" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json"
Yanıt
{
  "data": "…",
  "trace_id": "01JC…"
}
POST/api/crm/public/v1/contacts/search

Kişilerde sorgu ile ara

API anahtarı

Sorgu-AST ile alan bazlı arama. Operatörler: `=`, `!=`, `IN`, `NIN`, `>`, `<`, `~` (içerir).

Gerekli kapsam: contacts.read

İstek
curl -X POST "https://{slug}.crm.blesyum.app/api/crm/public/v1/contacts/search" \
  -H "Authorization: Bearer blsk_..." \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "query": {
    "field": "email",
    "operator": "~",
    "value": "@ornek.com"
  },
  "pagination": {
    "per_page": 25
  }
}'
Yanıt
{
  "data": {
    "type": "list",
    "data": [],
    "pages": {
      "type": "pages",
      "per_page": 25
    }
  },
  "trace_id": "01JC…"
}
Bu sayfa işine yaradı mı?