跳至內容
Cyzyra

API參考

潛在客戶

聯絡人和客戶。建立不會重複:相同的電子郵件或電話號碼會傳回已存在的潛在客戶。

Listar leads

get/api/v1/leads

關鍵權限: leitura

參數

limit integer · consulta

預設值:50 · Máximo: 200

cursor string · consulta

next_cursor da página anterior

updated_since string (date-time) · consulta

—

status string · consulta

—

答案

  • 200Página de leads
要求
curl "https://www.cyzyra.com/api/v1/leads" \
  -H "Authorization: Bearer $CYZYRA_API_KEY"
回覆
{
  "data": [
    {
      "id": "8f1c…",
      "name": "Ana Souza",
      "email": "ana@example.com",
      "status": "new",
      "created_at": "2026-11-08T14:02:11Z"
    }
  ],
  "next_cursor": "eyJ0Ijoi…"
}

說明性範例。

Criar lead (sem duplicar: e-mail/telefone iguais devolvem o existente)

post/api/v1/leads

關鍵權限: escrita

正文 (JSON)

name string強制的

—

email string

—

phone string

—

whatsapp string

—

city string

—

country string

範例:"BR"

notes string

—

source_detail string

—

tags string[]

—

答案

  • 200Já existia (duplicate: true)
  • 201Criado
要求
curl -X POST "https://www.cyzyra.com/api/v1/leads" \
  -H "Authorization: Bearer $CYZYRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ana Souza","email":"ana@example.com","whatsapp":"+5511999990000","country":"BR","tags":["site"]}'
回覆
{
  "data": {
    "id": "8f1c…",
    "name": "Ana Souza",
    "status": "new"
  },
  "created": true,
  "duplicate": false
}

說明性範例。

Ver lead

get/api/v1/leads/{id}

關鍵權限: leitura

參數

id string (uuid) · caminho強制的

—

答案

  • 200帶領
  • 404Não encontrado
要求
curl "https://www.cyzyra.com/api/v1/leads/LEAD_ID" \
  -H "Authorization: Bearer $CYZYRA_API_KEY"
回覆
{
  "data": {
    "id": "8f1c…",
    "name": "Ana Souza",
    "email": "ana@example.com",
    "status": "new"
  }
}

說明性範例。

Alterar lead

patch/api/v1/leads/{id}

關鍵權限: escrita

參數

id string (uuid) · caminho強制的

—

正文 (JSON)

name string

—

email string

—

phone string

—

city string

—

status string

—

tags string[]

—

notes string

—

do_not_contact boolean

—

答案

  • 200Lead atualizado
要求
curl -X PATCH "https://www.cyzyra.com/api/v1/leads/LEAD_ID" \
  -H "Authorization: Bearer $CYZYRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"Curitiba","tags":["vip"]}'
回覆
{
  "data": {
    "id": "8f1c…",
    "city": "Curitiba",
    "tags": [
      "vip"
    ]
  }
}

說明性範例。