MENU navbar-image

Introdução

API REST multi-tenant do Ziptime CRM.

Ziptime API v2 — Visão geral

A API v2 do Ziptime CRM é REST, JSON, multi-tenant nativa. Foi feita pra integradores externos (formulários de site, plugins de browser, apps mobile, ERPs de cliente) criarem e atualizarem leads, contatos, organizações, atividades e listas de contatos dentro do CRM sem passar pela interface web.

Quando usar

Quando NÃO usar

Conceitos fundamentais

Como autenticar

Todo endpoint (exceto /auth/login e /auth/pair) requer header:

Authorization: Bearer {seu_token}

Tokens são gerados na UI em Configurações > Integrações pelo admin do tenant, ou via /auth/login (web/mobile) e /auth/pair (plugin).

Multi-tenancy

Cada token pertence a um tenant. A API filtra automaticamente todos os recursos pelo tenant_id do token. Você nunca vê dados de outro tenant — isolamento garantido no nível de query, não só de aplicação.

Abilities (escopo do token)

Cada token tem um conjunto de abilities Sanctum que limita o que ele pode fazer. Tokens criados pela UI de Integrações herdam as abilities do perfil escolhido:

Perfil Abilities
Formulário externo (form_external) leads:create, persons:create, organizations:create, activities:create, metadata:read, pipelines:read
Integração completa (full_integration) + *:read, *:update em leads/persons/organizations, activities:read
Plugin WhatsApp (whatsapp_plugin) leads:create, persons:create, organizations:create, metadata:read, pipelines:read

Tokens emitidos por /auth/login ou /auth/pair (sessões humanas) recebem ability * (acesso total dentro do que a role do usuário permite).

Deletes (DELETE /leads/{id}, etc.) não estão em nenhum perfil de integração. Apenas tokens humanos com role autorizada podem deletar via API.

Se um token chamar uma rota fora do seu escopo, recebe 403 auth.insufficient_abilities com a lista de abilities faltantes em error.fields.abilities.

Permissões de papel (tokens humanos)

Tokens emitidos por /auth/login herdam adicionalmente a permissão da role do usuário no Krayin (vocabulário em Config/acl.php: leads.view, leads.create, leads.edit, leads.delete, contacts.persons.*, contacts.organizations.*, activities.create|edit|delete).

Se faltar permissão, retorna 403 auth.insufficient_permission com a permission ausente em error.fields.permission.

Tokens de integração (is_api_user=true) bypassam o check de role — a ability Sanctum do perfil já é a fonte de verdade pra esses tokens.

Idempotência

POSTs de criação exigem header Idempotency-Key: {uuid-v4}. Mesma key dentro de 24h retorna a resposta original byte-a-byte, mesmo que o cliente reenvie. Use sempre um UUID novo por request lógica, mas reutilize-o em retries.

Defaults do token

Cada token de integração tem defaults configuráveis (pipeline_id, stage_id, source_id, assigned_user_id). Se o payload não enviar esses campos, o default do token é aplicado. Permite formulários simples ("envie só nome e email") sem perder estrutura no CRM.

Find-or-create

POST /leads aceita organization e person como objetos, não só IDs:

Operação atômica: ou cria tudo, ou falha tudo.

Cursor pagination

Listagens usam cursor opaco em base64. Resposta inclui meta.next_cursor e meta.has_more. Repasse o cursor na próxima request via ?cursor=....

Campos obrigatórios em POST /leads

Toda criação de lead via API exige:

Os IDs de pipeline_id, stage_id, source_id (e assigned_user_id) podem entrar em cada request OU serem configurados como defaults no token, na aba Configurações da integração. Quando o default está configurado, o cliente do formulário não precisa enviar — a API completa automaticamente.

Estratégia 1: passar IDs em cada request

Útil pra integrações que conhecem múltiplos pipelines/sources (ex: app mobile do vendedor escolhendo funil, ERP roteando por unidade de negócio).

curl -X POST https://ziptime.com.br/api/v2/leads \
  -H "Authorization: Bearer {seu_token}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "title": "Lead da Maria",
    "person": { "name": "Maria Silva", "email": "[email protected]" },
    "organization_name": "Empresa Exemplo Ltda",
    "pipeline_id": 1,
    "stage_id": 1,
    "source_id": 1
  }'

Estratégia 2: configurar defaults no token

Útil pra formulários simples com 1 pipeline/source fixo (ex: formulário de "Solicite contato" no site).

  1. Admin do tenant abre a integração e configura pipeline_id, stage_id, source_id (e opcionalmente assigned_user_id) na aba Configurações
  2. Cliente do formulário envia só os campos de negócio:
curl -X POST https://ziptime.com.br/api/v2/leads \
  -H "Authorization: Bearer {seu_token}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "title": "Lead da Maria",
    "person": { "name": "Maria Silva", "email": "[email protected]" },
    "organization_name": "Empresa Exemplo Ltda"
  }'

A API aplica os defaults do token nos campos ausentes. Se o token NÃO tem default e o payload NÃO envia, retorna 422 lead.required_field_no_default.

Cases de uso

Caso 1: Formulário de site → CRM

Mesmo exemplo da estratégia 2 acima — payload enxuto + defaults do token. Cliente do formulário só conhece nome, email e empresa; o resto vem do token configurado pelo admin.

Resultado: lead criado no pipeline default do token, organização criada se não existir, pessoa criada e vinculada.

Caso 2: Plugin de browser pareando dispositivo

  1. User clica "Conectar plugin" no Ziptime web → gera código de 6 dígitos
  2. Plugin chama POST /auth/pair com { code, device_name: "Chrome / Mac" }
  3. Backend retorna token Sanctum com abilities de "Plugin WhatsApp"
  4. Plugin salva token e usa pra criar leads daqui em diante

Caso 3: ERP sincronizando contatos

const response = await fetch('https://ziptime.com.br/api/v2/persons', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer {seu_token}',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    name: 'João Vendedor',
    email: '[email protected]',
    organization_id: 42,
  }),
});

Caso 4: Formulário externo → contato na lista "Newsletter"

Listas de contatos (agrupamentos estáticos de pessoas) são expostas na API v2 pelo recurso /api/v2/lists: criar e atualizar listas, consultar membros e adicionar/remover pessoas. Pessoa também pode ser associada já na criação, via list_ids (aditivo) em POST /persons e POST /leads:

# cria a pessoa e já a coloca na lista 12 (origem "API")
curl -X POST https://v2.ziptime.com.br/api/v2/persons \
  -H "Authorization: Bearer {seu_token}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "name": "Maria Souza", "email": "[email protected]", "list_ids": [12] }'

# adiciona pessoas a uma lista em lote (idempotente)
curl -X POST https://v2.ziptime.com.br/api/v2/lists/12/members \
  -H "Authorization: Bearer {seu_token}" \
  -H "Content-Type: application/json" \
  -d '{ "person_ids": [840, 841] }'

Recurso com 7 endpoints (GET/POST /lists, GET/PUT /lists/{id}, GET/POST /lists/{id}/members, POST /lists/{id}/members/remove). Abilities: lists:read, lists:create, lists:update, lists:members. list_ids em pessoa/negócio é sempre aditivo (nunca remove de outras listas) e exige lists:members. A API não exclui listas nem exporta membros para arquivo — isso fica só no admin web. Filtro list_id em GET /persons e campo lists nas respostas de pessoa.

Tabela de error codes

A API retorna sempre uma estrutura JSON consistente em caso de erro:

{
  "error": {
    "code": "validation.field_required",
    "message": "O campo 'name' é obrigatório.",
    "field": "name"
  }
}

Códigos principais:

Código Status HTTP Significado
auth.invalid_token 401 Token ausente, inválido ou expirado
auth.invalid_credentials 401 Email/senha errados em /auth/login
auth.session_terminated 401 Sessão derrubada por novo login no mesmo canal
auth.user_disabled 401 User foi desativado no admin
auth.insufficient_abilities 403 Token não tem o ability Sanctum exigido pela rota (error.fields.abilities lista o que falta)
auth.insufficient_permission 403 Token humano sem permission de role pra a operação (error.fields.permission lista o que falta)
resource.forbidden 403 Outras falhas de autorização
validation.failed 422 Erros de validação (ver detalhes em error.errors)
validation.fk_not_found_in_tenant 422 FK aponta pra registro de outro tenant
idempotency.key_required 400 POST sem Idempotency-Key
idempotency.conflict_payload 409 Mesma key com payload diferente
rate_limit.exceeded 429 Cliente excedeu rate limit (60/min default)
lead.required_field_no_default 422 Campo obrigatório sem default no token
lead.stage_pipeline_mismatch 422 Stage não pertence ao pipeline informado
contact_list.name_taken 422 Já existe lista viva com esse nome na company
contact_list.too_many_ids 422 Acima do limite (500 person_ids ou 20 list_ids)
auth.insufficient_abilities 403 Token sem a ability exigida (ex.: list_ids sem lists:members)

Limitações conhecidas

Suporte

Bugs ou dúvidas: abra issue no repositório ou contate [email protected].

Lembrete pra mantenedores

Sempre que alterar contratos da API (novo endpoint, novo campo, mudança de validação), regenere a doc:

php artisan scribe:generate

E commite as mudanças geradas em public/docs/* e storage/app/scribe/*.

Autenticando requisições

Para autenticar requisições, inclua o header Authorization com o valor "Bearer {seu_token}".

Todos os endpoints autenticados estão marcados com a badge requer autenticação na documentação abaixo.

Tokens são gerados na UI em Configurações > Integrações. Para sessões web/mobile, use POST /auth/login; para plugins, use POST /auth/pair.

Atividades

Lista atividades com paginação cursor-based.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/activities?cursor=architecto&limit=25&lead_id=1&type=call&operational_only=1&is_done=&relevant_only=&exclude_system=&assigned_user_id=12&scheduled_after=architecto&scheduled_before=architecto&created_after=architecto&created_before=architecto&updated_after=architecto&updated_before=architecto&sort=schedule_from&order=asc&count=1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"count\": \"true\",
    \"lead_id\": 16,
    \"operational_only\": \"1\",
    \"is_done\": \"1\",
    \"relevant_only\": \"false\",
    \"exclude_system\": \"true\",
    \"assigned_user_id\": 16,
    \"scheduled_after\": \"2026-10-29T12:47:25\",
    \"scheduled_before\": \"2026-10-29T12:47:25\",
    \"created_after\": \"2026-10-29T12:47:25\",
    \"created_before\": \"2026-10-29T12:47:25\",
    \"updated_after\": \"2026-10-29T12:47:25\",
    \"updated_before\": \"2026-10-29T12:47:25\",
    \"sort\": \"created_at\",
    \"order\": \"asc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/activities"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "lead_id": "1",
    "type": "call",
    "operational_only": "1",
    "is_done": "0",
    "relevant_only": "0",
    "exclude_system": "0",
    "assigned_user_id": "12",
    "scheduled_after": "architecto",
    "scheduled_before": "architecto",
    "created_after": "architecto",
    "created_before": "architecto",
    "updated_after": "architecto",
    "updated_before": "architecto",
    "sort": "schedule_from",
    "order": "asc",
    "count": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "count": "true",
    "lead_id": 16,
    "operational_only": "1",
    "is_done": "1",
    "relevant_only": "false",
    "exclude_system": "true",
    "assigned_user_id": 16,
    "scheduled_after": "2026-10-29T12:47:25",
    "scheduled_before": "2026-10-29T12:47:25",
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "updated_after": "2026-10-29T12:47:25",
    "updated_before": "2026-10-29T12:47:25",
    "sort": "created_at",
    "order": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/activities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'lead_id' => '1',
            'type' => 'call',
            'operational_only' => '1',
            'is_done' => '0',
            'relevant_only' => '0',
            'exclude_system' => '0',
            'assigned_user_id' => '12',
            'scheduled_after' => 'architecto',
            'scheduled_before' => 'architecto',
            'created_after' => 'architecto',
            'created_before' => 'architecto',
            'updated_after' => 'architecto',
            'updated_before' => 'architecto',
            'sort' => 'schedule_from',
            'order' => 'asc',
            'count' => '1',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'count' => 'true',
            'lead_id' => 16,
            'operational_only' => '1',
            'is_done' => '1',
            'relevant_only' => 'false',
            'exclude_system' => 'true',
            'assigned_user_id' => 16,
            'scheduled_after' => '2026-10-29T12:47:25',
            'scheduled_before' => '2026-10-29T12:47:25',
            'created_after' => '2026-10-29T12:47:25',
            'created_before' => '2026-10-29T12:47:25',
            'updated_after' => '2026-10-29T12:47:25',
            'updated_before' => '2026-10-29T12:47:25',
            'sort' => 'created_at',
            'order' => 'asc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/activities'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "count": "true",
    "lead_id": 16,
    "operational_only": "1",
    "is_done": "1",
    "relevant_only": "false",
    "exclude_system": "true",
    "assigned_user_id": 16,
    "scheduled_after": "2026-10-29T12:47:25",
    "scheduled_before": "2026-10-29T12:47:25",
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "updated_after": "2026-10-29T12:47:25",
    "updated_before": "2026-10-29T12:47:25",
    "sort": "created_at",
    "order": "asc"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'lead_id': '1',
  'type': 'call',
  'operational_only': '1',
  'is_done': '0',
  'relevant_only': '0',
  'exclude_system': '0',
  'assigned_user_id': '12',
  'scheduled_after': 'architecto',
  'scheduled_before': 'architecto',
  'created_after': 'architecto',
  'created_before': 'architecto',
  'updated_after': 'architecto',
  'updated_before': 'architecto',
  'sort': 'schedule_from',
  'order': 'asc',
  'count': '1',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 3,
            "lead_id": 1,
            "lead": {
                "id": 1,
                "title": "Acme Corp"
            },
            "title": "Call Maria",
            "type": "call",
            "is_done": false,
            "assigned_user_id": 12,
            "assigned_user": {
                "id": 12,
                "name": "João",
                "image_url": null
            }
        }
    ],
    "meta": {
        "total": 42,
        "next_cursor": null
    }
}
 

Request   

GET api/v2/activities

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco da página. Example: architecto

limit   integer  opcional    

Itens por página (1-100). Example: 25

lead_id   integer  opcional    

Filtra por lead vinculado. Example: 1

type   string  opcional    

Filtra por tipo. Valor único (type=call) OU lista para filtrar vários de uma vez (type[]=call&type[]=meeting), que aplica IN(...). Valores: call|meeting|lunch|task|note|email. Example: call

operational_only   boolean  opcional    

Opt-in. Quando true (e sem type/type[] explícito), restringe aos tipos operacionais definidos no servidor (call, meeting, lunch, email, task) — exclui note, file e system. Atalho para o feed de tarefas do usuário sem hardcodar a lista no client. type/type[] explícito tem precedência. Example: true

is_done   boolean  opcional    

Example: false

relevant_only   boolean  opcional    

Opt-in. Quando true, esconde o RUÍDO de auditoria (type:system) da timeline, mas MANTÉM os marcos curados: Criado, won/lost/reactivated e transições reais de Estágio/Funil/Responsável. Filtra mudanças de Valor, Título, Origem, Temperatura e campos técnicos. Ausente/false = retorna tudo. Para excluir TODO type:system (inclusive os marcos), use exclude_system. Example: false

exclude_system   boolean  opcional    

Opt-in. Quando true, remove TODAS as atividades type:system do resultado, inclusive os marcos curados que o relevant_only preserva. Para feeds que só querem interações reais (call/meeting/lunch/task/note/email). Vence relevant_only quando ambos vêm. Ausente/false = retorna tudo. Example: false

assigned_user_id   integer  opcional    

Example: 12

scheduled_after   string  opcional    

ISO-8601. Example: architecto

scheduled_before   string  opcional    

ISO-8601. Example: architecto

created_after   string  opcional    

ISO-8601. Example: architecto

created_before   string  opcional    

ISO-8601. Example: architecto

updated_after   string  opcional    

ISO-8601. Example: architecto

updated_before   string  opcional    

ISO-8601. Example: architecto

sort   string  opcional    

schedule_from|created_at|updated_at. Example: schedule_from

order   string  opcional    

asc|desc. Example: asc

count   boolean  opcional    

Quando true, inclui meta.total = total de atividades que batem com os filtros (ignora paginação). Rode apenas na 1ª página / troca de filtro; sem o param o COUNT não roda. Example: true

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

count   string  opcional    

Example: true

Must be one of:
  • 1
  • 0
  • true
  • false
lead_id   integer  opcional    

Example: 16

type   string  opcional    
operational_only   string  opcional    

Example: 1

Must be one of:
  • 0
  • 1
  • true
  • false
is_done   string  opcional    

Example: 1

Must be one of:
  • 0
  • 1
  • true
  • false
relevant_only   string  opcional    

Example: false

Must be one of:
  • 0
  • 1
  • true
  • false
exclude_system   string  opcional    

Example: true

Must be one of:
  • 0
  • 1
  • true
  • false
assigned_user_id   integer  opcional    

Example: 16

scheduled_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

scheduled_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

created_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

created_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

updated_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

updated_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

sort   string  opcional    

Example: created_at

Must be one of:
  • schedule_from
  • created_at
  • updated_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc

Retorna uma atividade por id, com lead vinculado e participantes.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/activities/3" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/activities/3"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/activities/3';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/activities/3'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 3,
        "lead_id": 1,
        "lead": {
            "id": 1,
            "title": "Acme Corp"
        },
        "title": "Call Maria",
        "assigned_user_id": 12,
        "assigned_user": {
            "id": 12,
            "name": "João",
            "image_url": null
        },
        "participants": [
            {
                "type": "user",
                "id": 12,
                "name": "João"
            },
            {
                "type": "person",
                "id": 818,
                "name": "Maria"
            }
        ]
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

GET api/v2/activities/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da activity. Example: 3

Cria uma atividade, opcionalmente vinculada a um lead. Requer header `Idempotency-Key`.

requer autenticação

Marcar is_done=true no create já preenche done_at e done_by com o user da request. Participants são apenas user_ids (sub-set do CRUD web do Krayin — persons ficam fora do MVP).

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/activities" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"lead_id\": 1,
    \"title\": \"Ligar pra Maria\",
    \"type\": \"call\",
    \"comment\": \"architecto\",
    \"location\": \"architecto\",
    \"schedule_from\": \"architecto\",
    \"schedule_to\": \"architecto\",
    \"is_done\": false,
    \"assigned_user_id\": 16,
    \"participants\": [
        {
            \"type\": \"user\",
            \"id\": 10
        }
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/activities"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "lead_id": 1,
    "title": "Ligar pra Maria",
    "type": "call",
    "comment": "architecto",
    "location": "architecto",
    "schedule_from": "architecto",
    "schedule_to": "architecto",
    "is_done": false,
    "assigned_user_id": 16,
    "participants": [
        {
            "type": "user",
            "id": 10
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/activities';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'lead_id' => 1,
            'title' => 'Ligar pra Maria',
            'type' => 'call',
            'comment' => 'architecto',
            'location' => 'architecto',
            'schedule_from' => 'architecto',
            'schedule_to' => 'architecto',
            'is_done' => false,
            'assigned_user_id' => 16,
            'participants' => [
                [
                    'type' => 'user',
                    'id' => 10,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/activities'
payload = {
    "lead_id": 1,
    "title": "Ligar pra Maria",
    "type": "call",
    "comment": "architecto",
    "location": "architecto",
    "schedule_from": "architecto",
    "schedule_to": "architecto",
    "is_done": false,
    "assigned_user_id": 16,
    "participants": [
        {
            "type": "user",
            "id": 10
        }
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (201):


{
    "data": {
        "id": 3,
        "lead_id": 1,
        "title": "Ligar pra Maria"
    }
}
 

Exemplo de resposta (400):


{
    "error": {
        "code": "idempotency.key_required",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "..."
    }
}
 

Request   

POST api/v2/activities

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

lead_id   integer  opcional    

Lead vinculado (mesmo tenant). Opcional — sem ele a atividade nasce solta (lembrete/caixa de entrada). Example: 1

title   string     

Título. Example: Ligar pra Maria

type   string     

call|meeting|lunch|task|note|email. Example: call

comment   string  opcional    

Observações. Example: architecto

location   string  opcional    

Local. Example: architecto

schedule_from   string  opcional    

ISO-8601. Início agendado. Opcional — sem data a atividade vai pra caixa de entrada (fora do feed de pendências). Example: architecto

schedule_to   string  opcional    

ISO-8601. Fim agendado. Example: architecto

is_done   boolean  opcional    

Já marcada como concluída? Example: false

assigned_user_id   integer  opcional    

User responsável (default = token default). Example: 16

participants   object[]  opcional    

Participantes (usuários e/ou contatos). Opcional.

type   string     

user|person. Example: user

id   integer     

Id do user ou person no tenant. Example: 10

Atualiza uma atividade (parcial). `lead_id` é silenciosamente ignorado (vinculação não muda após criação).

requer autenticação

Estado de is_done segue máquina de estado: transição → done seta done_at/done_by; → not done limpa ambos. participants substitui a lista inteira (delete + recreate, dentro de transaction).

Exemplo de requisição:
curl --request PUT \
    "https://ziptime.com.br/api/v2/activities/3" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"architecto\",
    \"type\": \"architecto\",
    \"comment\": \"architecto\",
    \"location\": \"architecto\",
    \"schedule_from\": \"architecto\",
    \"schedule_to\": \"architecto\",
    \"is_done\": false,
    \"assigned_user_id\": 16,
    \"participants\": [
        {
            \"type\": \"person\",
            \"id\": 818
        }
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/activities/3"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "architecto",
    "type": "architecto",
    "comment": "architecto",
    "location": "architecto",
    "schedule_from": "architecto",
    "schedule_to": "architecto",
    "is_done": false,
    "assigned_user_id": 16,
    "participants": [
        {
            "type": "person",
            "id": 818
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/activities/3';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'architecto',
            'type' => 'architecto',
            'comment' => 'architecto',
            'location' => 'architecto',
            'schedule_from' => 'architecto',
            'schedule_to' => 'architecto',
            'is_done' => false,
            'assigned_user_id' => 16,
            'participants' => [
                [
                    'type' => 'person',
                    'id' => 818,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/activities/3'
payload = {
    "title": "architecto",
    "type": "architecto",
    "comment": "architecto",
    "location": "architecto",
    "schedule_from": "architecto",
    "schedule_to": "architecto",
    "is_done": false,
    "assigned_user_id": 16,
    "participants": [
        {
            "type": "person",
            "id": 818
        }
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 3,
        "title": "Updated"
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "..."
    }
}
 

Request   

PUT api/v2/activities/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da activity. Example: 3

Parâmetros do body

title   string  opcional    

Novo título. Example: architecto

type   string  opcional    

call|meeting|lunch|task|note|email. Example: architecto

comment   string  opcional    

Observações. Example: architecto

location   string  opcional    

Local. Example: architecto

schedule_from   string  opcional    

ISO-8601. Example: architecto

schedule_to   string  opcional    

ISO-8601. Example: architecto

is_done   boolean  opcional    

Marca como concluída ou reabre. Example: false

assigned_user_id   integer  opcional    

Novo responsável. Example: 16

participants   object[]  opcional    

Substitui a lista inteira de participantes (delete-and-recreate).

type   string     

user|person. Example: person

id   integer     

Id do user ou person no tenant. Example: 818

Remove uma atividade. Krayin Activity NÃO usa SoftDeletes; é hard delete.

requer autenticação

Exemplo de requisição:
curl --request DELETE \
    "https://ziptime.com.br/api/v2/activities/3" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/activities/3"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/activities/3';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/activities/3'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Exemplo de resposta (204):

Resposta vazia
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

DELETE api/v2/activities/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da activity. Example: 3

Autenticação

Autentica via email + senha e devolve token Sanctum.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/auth/login" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"s3cretP@ss\",
    \"client_type\": \"web_login_via_api\",
    \"device_name\": \"iPhone 15 Pro\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/auth/login"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "password": "s3cretP@ss",
    "client_type": "web_login_via_api",
    "device_name": "iPhone 15 Pro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/auth/login';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
            'password' => 's3cretP@ss',
            'client_type' => 'web_login_via_api',
            'device_name' => 'iPhone 15 Pro',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/auth/login'
payload = {
    "email": "[email protected]",
    "password": "s3cretP@ss",
    "client_type": "web_login_via_api",
    "device_name": "iPhone 15 Pro"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (201):


{
    "data": {
        "token": "3|...",
        "expires_at": null,
        "client_type": "web_login_via_api",
        "user": {
            "id": 42,
            "name": "Alice"
        }
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_credentials",
        "message": "Credenciais inválidas."
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.user_disabled",
        "message": "Esta conta foi desativada. Contate o administrador."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "Plugin WhatsApp requer pairing code, não /login.",
        "fields": {
            "client_type": [
                "Plugin WhatsApp requer pairing code, não /login."
            ]
        }
    }
}
 

Request   

POST api/v2/auth/login

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

email   string     

Email do user. Example: [email protected]

password   string     

Senha do user. Example: s3cretP@ss

client_type   string  opcional    

Canal solicitado. Aceitos: web_login_via_api (default), mobile_app. Rejeitados com 422: whatsapp_plugin (use /auth/pair), api_integration (use UI), web_admin (use /admin/login). Example: web_login_via_api

device_name   string  opcional    

Identificador legível do dispositivo (default = client_type). Example: iPhone 15 Pro

Troca pairing code por token Sanctum.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/auth/pair" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"584826\",
    \"intent\": \"whatsapp_plugin\",
    \"device_name\": \"Chrome \\/ MacBook\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/auth/pair"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "584826",
    "intent": "whatsapp_plugin",
    "device_name": "Chrome \/ MacBook"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/auth/pair';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'code' => '584826',
            'intent' => 'whatsapp_plugin',
            'device_name' => 'Chrome / MacBook',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/auth/pair'
payload = {
    "code": "584826",
    "intent": "whatsapp_plugin",
    "device_name": "Chrome \/ MacBook"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (201):


{
    "data": {
        "token": "5|...",
        "expires_at": "2026-08-03T00:00:00-03:00",
        "client_type": "whatsapp_plugin",
        "user": {
            "id": 42
        }
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "pairing.code_invalid",
        "message": "Código de pareamento inválido."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "pairing.code_expired",
        "message": "Código de pareamento expirado. Gere um novo código."
    }
}
 

Request   

POST api/v2/auth/pair

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

code   string     

Pairing code de 6 dígitos (ex: "584826"). Por retrocompat aceita também o prefixo legado "ZIP-" e espaços. Example: 584826

intent   string     

Tipo de cliente (whatsapp_plugin, mobile_app). Example: whatsapp_plugin

device_name   string  opcional    

Identificador legível do dispositivo. Example: Chrome / MacBook

Encerra a sessão atual (revoga o Bearer da própria request).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/auth/logout" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/auth/logout"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/auth/logout';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/auth/logout'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Exemplo de resposta (204):

Resposta vazia
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

POST api/v2/auth/logout

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Empresas

Lista empresas do tenant atual com paginação cursor-based.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/organizations?cursor=architecto&limit=25&name=Acme&created_after=2026-01-01&created_before=2026-12-31&sort=created_at&order=desc&count=1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"created_after\": \"2026-10-29T12:47:25\",
    \"created_before\": \"2026-10-29T12:47:25\",
    \"sort\": \"name\",
    \"order\": \"asc\",
    \"count\": \"false\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/organizations"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "name": "Acme",
    "created_after": "2026-01-01",
    "created_before": "2026-12-31",
    "sort": "created_at",
    "order": "desc",
    "count": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "sort": "name",
    "order": "asc",
    "count": "false"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/organizations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'name' => 'Acme',
            'created_after' => '2026-01-01',
            'created_before' => '2026-12-31',
            'sort' => 'created_at',
            'order' => 'desc',
            'count' => '1',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'created_after' => '2026-10-29T12:47:25',
            'created_before' => '2026-10-29T12:47:25',
            'sort' => 'name',
            'order' => 'asc',
            'count' => 'false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/organizations'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "sort": "name",
    "order": "asc",
    "count": "false"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'name': 'Acme',
  'created_after': '2026-01-01',
  'created_before': '2026-12-31',
  'sort': 'created_at',
  'order': 'desc',
  'count': '1',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 7,
            "name": "Acme",
            "cnpj": null,
            "address": null,
            "created_at": "2026-05-05T10:00:00Z",
            "updated_at": "2026-05-05T10:00:00Z"
        }
    ],
    "meta": {
        "total": 746,
        "next_cursor": null
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "Validação falhou.",
        "fields": {
            "sort": [
                "..."
            ]
        }
    }
}
 

Request   

GET api/v2/organizations

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco da página (vindo de meta.next_cursor anterior). Example: architecto

limit   integer  opcional    

Itens por página (1-100, default 25). Example: 25

name   string  opcional    

Filtro substring (case-insensitive) por nome. Example: Acme

created_after   string  opcional    

ISO-8601. Filtra created_at >= valor. Example: 2026-01-01

created_before   string  opcional    

ISO-8601. Filtra created_at <= valor. Example: 2026-12-31

sort   string  opcional    

Coluna de ordenação (name, created_at, updated_at). Example: created_at

order   string  opcional    

asc|desc. Example: desc

count   boolean  opcional    

Quando true, inclui meta.total = total de empresas que batem com os filtros (ignora paginação). Rode apenas na 1ª página / troca de filtro; sem o param o COUNT não roda. Example: true

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

created_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

created_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

sort   string  opcional    

Example: name

Must be one of:
  • name
  • created_at
  • updated_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc
count   string  opcional    

Example: false

Must be one of:
  • 1
  • 0
  • true
  • false

Retorna uma empresa por id (dentro do tenant).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/organizations/7" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/organizations/7"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/organizations/7';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/organizations/7'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 7,
        "name": "Acme",
        "cnpj": null,
        "address": null
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "Recurso não encontrado."
    }
}
 

Request   

GET api/v2/organizations/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da organization. Example: 7

Cria uma empresa. Requer header `Idempotency-Key` (UUID).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/organizations" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Acme Corp\",
    \"cnpj\": \"12.345.678\\/0001-90\",
    \"website\": \"https:\\/\\/acme.com\",
    \"phones\": [
        \"+55 47 99999-0000\"
    ],
    \"emails\": [
        \"[email protected]\"
    ],
    \"address\": {
        \"address\": \"architecto\",
        \"country\": \"BR\",
        \"state\": \"SP\",
        \"city\": \"São Paulo\",
        \"postcode\": \"01310-100\"
    }
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/organizations"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Acme Corp",
    "cnpj": "12.345.678\/0001-90",
    "website": "https:\/\/acme.com",
    "phones": [
        "+55 47 99999-0000"
    ],
    "emails": [
        "[email protected]"
    ],
    "address": {
        "address": "architecto",
        "country": "BR",
        "state": "SP",
        "city": "São Paulo",
        "postcode": "01310-100"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/organizations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Acme Corp',
            'cnpj' => '12.345.678/0001-90',
            'website' => 'https://acme.com',
            'phones' => [
                '+55 47 99999-0000',
            ],
            'emails' => [
                '[email protected]',
            ],
            'address' => [
                'address' => 'architecto',
                'country' => 'BR',
                'state' => 'SP',
                'city' => 'São Paulo',
                'postcode' => '01310-100',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/organizations'
payload = {
    "name": "Acme Corp",
    "cnpj": "12.345.678\/0001-90",
    "website": "https:\/\/acme.com",
    "phones": [
        "+55 47 99999-0000"
    ],
    "emails": [
        "[email protected]"
    ],
    "address": {
        "address": "architecto",
        "country": "BR",
        "state": "SP",
        "city": "São Paulo",
        "postcode": "01310-100"
    }
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (201):


{
    "data": {
        "id": 8,
        "name": "Acme",
        "cnpj": null,
        "address": null
    }
}
 

Exemplo de resposta (400):


{
    "error": {
        "code": "idempotency.key_required",
        "message": "Header Idempotency-Key é obrigatório nesta operação."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "Validação falhou.",
        "fields": {
            "name": [
                "..."
            ]
        }
    }
}
 

Request   

POST api/v2/organizations

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

name   string     

Nome da organization (único por tenant). Example: Acme Corp

cnpj   string  opcional    

CNPJ. Example: 12.345.678/0001-90

website   string  opcional    

URL do site. Example: https://acme.com

phones   string[]  opcional    

Lista de telefones.

emails   string[]  opcional    

Lista de emails.

address   object  opcional    

Endereço estruturado.

address   string  opcional    

Logradouro completo. Example: architecto

country   string  opcional    

Example: BR

state   string  opcional    

Example: SP

city   string  opcional    

Example: São Paulo

postcode   string  opcional    

Example: 01310-100

Atualiza uma empresa existente (parcial — só campos enviados).

requer autenticação

Exemplo de requisição:
curl --request PUT \
    "https://ziptime.com.br/api/v2/organizations/7" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"cnpj\": \"architecto\",
    \"website\": \"architecto\",
    \"phones\": [
        \"architecto\"
    ],
    \"emails\": [
        \"architecto\"
    ],
    \"address\": {
        \"address\": \"p\",
        \"country\": \"s\",
        \"state\": \"c\",
        \"city\": \"q\",
        \"postcode\": \"ldzsnrwtujwvlxjk\"
    }
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/organizations/7"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto",
    "cnpj": "architecto",
    "website": "architecto",
    "phones": [
        "architecto"
    ],
    "emails": [
        "architecto"
    ],
    "address": {
        "address": "p",
        "country": "s",
        "state": "c",
        "city": "q",
        "postcode": "ldzsnrwtujwvlxjk"
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/organizations/7';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'architecto',
            'cnpj' => 'architecto',
            'website' => 'architecto',
            'phones' => [
                'architecto',
            ],
            'emails' => [
                'architecto',
            ],
            'address' => [
                'address' => 'p',
                'country' => 's',
                'state' => 'c',
                'city' => 'q',
                'postcode' => 'ldzsnrwtujwvlxjk',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/organizations/7'
payload = {
    "name": "architecto",
    "cnpj": "architecto",
    "website": "architecto",
    "phones": [
        "architecto"
    ],
    "emails": [
        "architecto"
    ],
    "address": {
        "address": "p",
        "country": "s",
        "state": "c",
        "city": "q",
        "postcode": "ldzsnrwtujwvlxjk"
    }
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 7,
        "name": "Acme Updated"
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "Recurso não encontrado."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "Validação falhou."
    }
}
 

Request   

PUT api/v2/organizations/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da organization. Example: 7

Parâmetros do body

name   string  opcional    

Novo nome. Example: architecto

cnpj   string  opcional    

CNPJ. Example: architecto

website   string  opcional    

URL do site. Example: architecto

phones   string[]  opcional    

Substitui completamente a lista de telefones. Array vazio limpa todos. Omitir mantém os existentes.

emails   string[]  opcional    

Substitui completamente a lista de emails. Array vazio limpa todos. Omitir mantém os existentes.

address   object  opcional    

Endereço estruturado.

address   string  opcional    

O campo value não pode ter mais que 500 caracteres. Example: p

country   string  opcional    

O campo value não pode ter mais que 100 caracteres. Example: s

state   string  opcional    

O campo value não pode ter mais que 100 caracteres. Example: c

city   string  opcional    

O campo value não pode ter mais que 100 caracteres. Example: q

postcode   string  opcional    

O campo value não pode ter mais que 20 caracteres. Example: ldzsnrwtujwvlxjk

Remove (soft delete) uma empresa.

requer autenticação

Exemplo de requisição:
curl --request DELETE \
    "https://ziptime.com.br/api/v2/organizations/7" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/organizations/7"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/organizations/7';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/organizations/7'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Exemplo de resposta (204):

Resposta vazia
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "Recurso não encontrado."
    }
}
 

Request   

DELETE api/v2/organizations/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da organization. Example: 7

Estatísticas

Retorna os totais do tenant atual.

requer autenticação

Os filtros de dashboard (assigned_user_id/pipeline_id/source_id) afetam SOMENTE o open_leads (card Leads), com o mesmo bloco de escopo por responsável do /tenant/stats/temperature e do /leads/flow. organizations e contacts são a base cadastral do tenant e NÃO recebem filtro (sem semântica de funil/origem) — permanecem tenant-wide.

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/tenant/stats?assigned_user_id=12&pipeline_id=7&source_id=4" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"assigned_user_id\": 16,
    \"pipeline_id\": 16,
    \"source_id\": 16
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/tenant/stats"
);

const params = {
    "assigned_user_id": "12",
    "pipeline_id": "7",
    "source_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "assigned_user_id": 16,
    "pipeline_id": 16,
    "source_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/tenant/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'assigned_user_id' => '12',
            'pipeline_id' => '7',
            'source_id' => '4',
        ],
        'json' => [
            'assigned_user_id' => 16,
            'pipeline_id' => 16,
            'source_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/tenant/stats'
payload = {
    "assigned_user_id": 16,
    "pipeline_id": 16,
    "source_id": 16
}
params = {
  'assigned_user_id': '12',
  'pipeline_id': '7',
  'source_id': '4',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "open_leads": 42,
        "organizations": 747,
        "contacts": 959
    }
}
 

Exemplo de resposta (403):


{
    "error": {
        "code": "resource.forbidden",
        "message": "Você não tem permissão para esta ação."
    }
}
 

Request   

GET api/v2/tenant/stats

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

assigned_user_id   integer  opcional    

Filtro por responsável (só open_leads). Comum só dentro do próprio escopo. Example: 12

pipeline_id   integer  opcional    

Filtro por funil (só open_leads). Example: 7

source_id   integer  opcional    

Filtro por origem (só open_leads). Example: 4

Parâmetros do body

assigned_user_id   integer  opcional    

Example: 16

pipeline_id   integer  opcional    

Example: 16

source_id   integer  opcional    

Example: 16

GET api/v2/tenant/stats/temperature

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/tenant/stats/temperature?assigned_user_id=12&pipeline_id=7&source_id=4" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"assigned_user_id\": 16,
    \"pipeline_id\": 16,
    \"source_id\": 16
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/tenant/stats/temperature"
);

const params = {
    "assigned_user_id": "12",
    "pipeline_id": "7",
    "source_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "assigned_user_id": 16,
    "pipeline_id": 16,
    "source_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/tenant/stats/temperature';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'assigned_user_id' => '12',
            'pipeline_id' => '7',
            'source_id' => '4',
        ],
        'json' => [
            'assigned_user_id' => 16,
            'pipeline_id' => 16,
            'source_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/tenant/stats/temperature'
payload = {
    "assigned_user_id": 16,
    "pipeline_id": 16,
    "source_id": 16
}
params = {
  'assigned_user_id': '12',
  'pipeline_id': '7',
  'source_id': '4',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "hot": {
            "count": 8,
            "value": 1151160
        },
        "warm": {
            "count": 14,
            "value": 449940
        },
        "cold": {
            "count": 12,
            "value": 536500
        },
        "none": {
            "count": 8,
            "value": 14000
        }
    }
}
 

Exemplo de resposta (403):


{
    "error": {
        "code": "resource.forbidden",
        "message": "Você não tem permissão para esta ação."
    }
}
 

Request   

GET api/v2/tenant/stats/temperature

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

assigned_user_id   integer  opcional    

Filtro por responsável. Comum só pode pedir dentro do próprio escopo. Example: 12

pipeline_id   integer  opcional    

Filtro por funil (dimensão do dashboard). Example: 7

source_id   integer  opcional    

Filtro por origem (dimensão do dashboard). Example: 4

Parâmetros do body

assigned_user_id   integer  opcional    

Example: 16

pipeline_id   integer  opcional    

Example: 16

source_id   integer  opcional    

Example: 16

Leads

Lista leads do tenant atual com paginação cursor-based.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/leads?cursor=architecto&limit=25&title=Maria&pipeline_id=7&stage_id=29&source_id=4&assigned_user_id=12&status=1&organization_id=7&person_id=42&contact_id=456&created_after=architecto&created_before=architecto&updated_after=architecto&updated_before=architecto&sort=created_at&order=desc&count=1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"count\": \"false\",
    \"title\": \"g\",
    \"pipeline_id\": 16,
    \"stage_id\": 16,
    \"source_id\": 16,
    \"assigned_user_id\": 16,
    \"status\": 3,
    \"organization_id\": 16,
    \"person_id\": 16,
    \"contact_id\": 16,
    \"created_after\": \"2026-10-29T12:47:25\",
    \"created_before\": \"2026-10-29T12:47:25\",
    \"updated_after\": \"2026-10-29T12:47:25\",
    \"updated_before\": \"2026-10-29T12:47:25\",
    \"sort\": \"expected_close_date\",
    \"order\": \"asc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "title": "Maria",
    "pipeline_id": "7",
    "stage_id": "29",
    "source_id": "4",
    "assigned_user_id": "12",
    "status": "1",
    "organization_id": "7",
    "person_id": "42",
    "contact_id": "456",
    "created_after": "architecto",
    "created_before": "architecto",
    "updated_after": "architecto",
    "updated_before": "architecto",
    "sort": "created_at",
    "order": "desc",
    "count": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "count": "false",
    "title": "g",
    "pipeline_id": 16,
    "stage_id": 16,
    "source_id": 16,
    "assigned_user_id": 16,
    "status": 3,
    "organization_id": 16,
    "person_id": 16,
    "contact_id": 16,
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "updated_after": "2026-10-29T12:47:25",
    "updated_before": "2026-10-29T12:47:25",
    "sort": "expected_close_date",
    "order": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'title' => 'Maria',
            'pipeline_id' => '7',
            'stage_id' => '29',
            'source_id' => '4',
            'assigned_user_id' => '12',
            'status' => '1',
            'organization_id' => '7',
            'person_id' => '42',
            'contact_id' => '456',
            'created_after' => 'architecto',
            'created_before' => 'architecto',
            'updated_after' => 'architecto',
            'updated_before' => 'architecto',
            'sort' => 'created_at',
            'order' => 'desc',
            'count' => '1',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'count' => 'false',
            'title' => 'g',
            'pipeline_id' => 16,
            'stage_id' => 16,
            'source_id' => 16,
            'assigned_user_id' => 16,
            'status' => 3,
            'organization_id' => 16,
            'person_id' => 16,
            'contact_id' => 16,
            'created_after' => '2026-10-29T12:47:25',
            'created_before' => '2026-10-29T12:47:25',
            'updated_after' => '2026-10-29T12:47:25',
            'updated_before' => '2026-10-29T12:47:25',
            'sort' => 'expected_close_date',
            'order' => 'asc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "count": "false",
    "title": "g",
    "pipeline_id": 16,
    "stage_id": 16,
    "source_id": 16,
    "assigned_user_id": 16,
    "status": 3,
    "organization_id": 16,
    "person_id": 16,
    "contact_id": 16,
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "updated_after": "2026-10-29T12:47:25",
    "updated_before": "2026-10-29T12:47:25",
    "sort": "expected_close_date",
    "order": "asc"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'title': 'Maria',
  'pipeline_id': '7',
  'stage_id': '29',
  'source_id': '4',
  'assigned_user_id': '12',
  'status': '1',
  'organization_id': '7',
  'person_id': '42',
  'contact_id': '456',
  'created_after': 'architecto',
  'created_before': 'architecto',
  'updated_after': 'architecto',
  'updated_before': 'architecto',
  'sort': 'created_at',
  'order': 'desc',
  'count': '1',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 1,
            "title": "Lead X",
            "pipeline_id": 7,
            "pipeline": {
                "id": 7,
                "name": "Funil de Vendas"
            },
            "stage_id": 29,
            "stage_entered_at": "2026-05-11T00:00:00-03:00",
            "assigned_user_id": 12,
            "assigned_user": {
                "id": 12,
                "name": "Hugo Ferreira",
                "image_url": null
            },
            "organization_id": 7,
            "person_id": 42,
            "organization": {
                "id": 7,
                "name": "Acme Ltda"
            },
            "person": {
                "id": 42,
                "name": "Maria Silva",
                "organization": {
                    "id": 7,
                    "name": "Acme Ltda"
                },
                "email": "[email protected]",
                "phone": "(11) 99999-0000"
            },
            "additional_persons": [
                {
                    "id": 456,
                    "name": "Giovanna Senger",
                    "organization": {
                        "id": 8,
                        "name": "Jalles"
                    },
                    "email": "[email protected]",
                    "phone": "(19) 99999-0000"
                }
            ]
        }
    ],
    "meta": {
        "total": 137,
        "next_cursor": null
    }
}
 

Request   

GET api/v2/leads

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco da página. Example: architecto

limit   integer  opcional    

Itens por página (1-100). Example: 25

title   string  opcional    

Filtro substring por título. Example: Maria

pipeline_id   integer  opcional    

Example: 7

stage_id   integer  opcional    

Example: 29

source_id   integer  opcional    

Example: 4

assigned_user_id   integer  opcional    

Example: 12

status   integer  opcional    

1=ativo, 2=ganho, 3=perdido. Example: 1

organization_id   integer  opcional    

Example: 7

person_id   integer  opcional    

Casa só o contato PRINCIPAL (leads.person_id). Example: 42

contact_id   integer  opcional    

Casa leads em que a pessoa é o contato PRINCIPAL OU um contato ADICIONAL. Example: 456

created_after   string  opcional    

ISO-8601. Example: architecto

created_before   string  opcional    

ISO-8601. Example: architecto

updated_after   string  opcional    

ISO-8601. Example: architecto

updated_before   string  opcional    

ISO-8601. Example: architecto

sort   string  opcional    

title|lead_value|expected_close_date|created_at|updated_at. Example: created_at

order   string  opcional    

asc|desc. Example: desc

count   boolean  opcional    

Quando true, inclui meta.total = total de leads que batem com os filtros (ignora paginação). Rode apenas na 1ª página / troca de filtro; sem o param o COUNT não roda. Example: true

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

count   string  opcional    

Example: false

Must be one of:
  • 1
  • 0
  • true
  • false
title   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

pipeline_id   integer  opcional    

Example: 16

stage_id   integer  opcional    

Example: 16

source_id   integer  opcional    

Example: 16

assigned_user_id   integer  opcional    

Example: 16

status   integer  opcional    

Example: 3

Must be one of:
  • 1
  • 2
  • 3
organization_id   integer  opcional    

Example: 16

person_id   integer  opcional    

Example: 16

contact_id   integer  opcional    

Example: 16

created_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

created_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

updated_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

updated_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

sort   string  opcional    

Example: expected_close_date

Must be one of:
  • title
  • lead_value
  • expected_close_date
  • created_at
  • updated_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc

Lista as opções dos custom attributes select de lead (temperatura, score) do tenant atual, para o app montar os Selects. Resolvido por code (ids variam por tenant); options ordenadas por sort_order; label = nome da opção.

requer autenticação

Attribute ausente no tenant → lista vazia para aquele campo.

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/leads/attribute-options" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/attribute-options"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/attribute-options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/attribute-options'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "temperature": [
            {
                "id": 15,
                "label": "Quente"
            },
            {
                "id": 16,
                "label": "Morno"
            },
            {
                "id": 17,
                "label": "Frio"
            }
        ],
        "score": [
            {
                "id": 18,
                "label": "5"
            },
            {
                "id": 19,
                "label": "4"
            },
            {
                "id": 20,
                "label": "3"
            },
            {
                "id": 21,
                "label": "2"
            },
            {
                "id": 22,
                "label": "1"
            }
        ]
    }
}
 

Request   

GET api/v2/leads/attribute-options

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v2/leads/flow

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/leads/flow?granularity=month&months=6&month=2026-07&date_from=2026-02-01&date_to=2026-07-31&user_id=42&pipeline_id=7&source_id=4" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"granularity\": \"day\",
    \"months\": 16,
    \"month\": \"4255-12\",
    \"date_from\": \"2026-10-29\",
    \"date_to\": \"2052-11-21\",
    \"user_id\": 16,
    \"pipeline_id\": 16,
    \"source_id\": 16
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/flow"
);

const params = {
    "granularity": "month",
    "months": "6",
    "month": "2026-07",
    "date_from": "2026-02-01",
    "date_to": "2026-07-31",
    "user_id": "42",
    "pipeline_id": "7",
    "source_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "granularity": "day",
    "months": 16,
    "month": "4255-12",
    "date_from": "2026-10-29",
    "date_to": "2052-11-21",
    "user_id": 16,
    "pipeline_id": 16,
    "source_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/flow';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'granularity' => 'month',
            'months' => '6',
            'month' => '2026-07',
            'date_from' => '2026-02-01',
            'date_to' => '2026-07-31',
            'user_id' => '42',
            'pipeline_id' => '7',
            'source_id' => '4',
        ],
        'json' => [
            'granularity' => 'day',
            'months' => 16,
            'month' => '4255-12',
            'date_from' => '2026-10-29',
            'date_to' => '2052-11-21',
            'user_id' => 16,
            'pipeline_id' => 16,
            'source_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/flow'
payload = {
    "granularity": "day",
    "months": 16,
    "month": "4255-12",
    "date_from": "2026-10-29",
    "date_to": "2052-11-21",
    "user_id": 16,
    "pipeline_id": 16,
    "source_id": 16
}
params = {
  'granularity': 'month',
  'months': '6',
  'month': '2026-07',
  'date_from': '2026-02-01',
  'date_to': '2026-07-31',
  'user_id': '42',
  'pipeline_id': '7',
  'source_id': '4',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "granularity": "month",
        "buckets": [
            {
                "period": "2026-02",
                "label": "fev. 2026",
                "leads_created": {
                    "count": 18,
                    "value": 240000
                },
                "deals_won": {
                    "count": 5,
                    "value": 88000
                },
                "deals_lost": {
                    "count": 3,
                    "value": 42000
                }
            }
        ]
    }
}
 

Exemplo de resposta (403):


{
    "error": {
        "code": "resource.forbidden",
        "message": "Você não tem permissão para esta ação."
    }
}
 

Request   

GET api/v2/leads/flow

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

granularity   string  opcional    

Granularidade: month (default) ou day. Example: month

months   integer  opcional    

Modo month sem âncora: nº de meses (1-24) contando o atual. Default 6. Ignorado quando month é enviado. Example: 6

month   string  opcional    

YYYY-MM. Modo day: mês do drill-down (obrigatório). Modo month: âncora opcional → devolve esse mês + o anterior (2 buckets). Example: 2026-07

date_from   string  opcional    

YYYY-MM-DD. Modo month: início do range explícito (normalizado pro 1º dia do mês). Exigido junto com date_to; ignora months/month. Span máx. 36 meses. Example: 2026-02-01

date_to   string  opcional    

YYYY-MM-DD. Modo month: fim do range explícito (normalizado pro último dia do mês). Exigido junto com date_from; deve ser >= date_from. Example: 2026-07-31

user_id   integer  opcional    

Filtro adicional por responsável. Comum só pode pedir dentro do próprio escopo. Example: 42

pipeline_id   integer  opcional    

Filtro por funil (dimensão do dashboard). Vale nos 3 modos. Example: 7

source_id   integer  opcional    

Filtro por origem (dimensão do dashboard). Vale nos 3 modos. Example: 4

Parâmetros do body

granularity   string  opcional    

Example: day

Must be one of:
  • month
  • day
months   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 24. Example: 16

month   string  opcional    

This field is required when granularity is day. Must match the regex /^\d{4}-(0[1-9]|1[0-2])$/. Example: 4255-12

date_from   string  opcional    

This field is required when date_to is present. Must be a valid date in the format Y-m-d. Example: 2026-10-29

date_to   string  opcional    

This field is required when date_from is present. Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_from. Example: 2052-11-21

user_id   integer  opcional    

Example: 16

pipeline_id   integer  opcional    

Example: 16

source_id   integer  opcional    

Example: 16

Retorna um lead por id.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/leads/1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 1,
        "title": "Lead X",
        "pipeline_id": 7,
        "pipeline": {
            "id": 7,
            "name": "Funil de Vendas"
        },
        "assigned_user_id": 12,
        "assigned_user": {
            "id": 12,
            "name": "Hugo Ferreira",
            "image_url": null
        }
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

GET api/v2/leads/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Cria um lead. Aceita find-or-create de empresa e pessoa.

requer autenticação

Quando pipeline_id/stage_id/source_id/assigned_user_id são omitidos, usa defaults configurados em api_token_metadata. assigned_user_id cai pro próprio user do token se nem default existir.

Resolução de empresa: organization_id (ID literal) > organization_name (find-or-create case-insensitive). Mesma lógica para pessoa, mas usa person_id > person_email > person_phone > person_name como fallback.

Requer header Idempotency-Key.

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/leads" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Lead da Maria\",
    \"description\": \"Veio pelo Google Ads, quer automatizar o processo comercial. Orçamento estimado R$ 5k.\",
    \"lead_value\": 5000,
    \"expected_close_date\": \"architecto\",
    \"pipeline_id\": 7,
    \"stage_id\": 29,
    \"source_id\": 4,
    \"lead_type_id\": 2,
    \"assigned_user_id\": 12,
    \"organization_id\": 16,
    \"organization_name\": \"Acme Corp\",
    \"organization_website\": \"https:\\/\\/acme.com\",
    \"organization_phone\": \"+55 47 99999-0000\",
    \"organization_email\": \"[email protected]\",
    \"organization_cnpj\": \"12.345.678\\/0001-90\",
    \"person_id\": 16,
    \"person_name\": \"architecto\",
    \"person_email\": \"[email protected]\",
    \"person_phone\": \"architecto\",
    \"additional_person_ids\": [
        456,
        789
    ],
    \"list_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Lead da Maria",
    "description": "Veio pelo Google Ads, quer automatizar o processo comercial. Orçamento estimado R$ 5k.",
    "lead_value": 5000,
    "expected_close_date": "architecto",
    "pipeline_id": 7,
    "stage_id": 29,
    "source_id": 4,
    "lead_type_id": 2,
    "assigned_user_id": 12,
    "organization_id": 16,
    "organization_name": "Acme Corp",
    "organization_website": "https:\/\/acme.com",
    "organization_phone": "+55 47 99999-0000",
    "organization_email": "[email protected]",
    "organization_cnpj": "12.345.678\/0001-90",
    "person_id": 16,
    "person_name": "architecto",
    "person_email": "[email protected]",
    "person_phone": "architecto",
    "additional_person_ids": [
        456,
        789
    ],
    "list_ids": [
        16
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Lead da Maria',
            'description' => 'Veio pelo Google Ads, quer automatizar o processo comercial. Orçamento estimado R$ 5k.',
            'lead_value' => 5000.0,
            'expected_close_date' => 'architecto',
            'pipeline_id' => 7,
            'stage_id' => 29,
            'source_id' => 4,
            'lead_type_id' => 2,
            'assigned_user_id' => 12,
            'organization_id' => 16,
            'organization_name' => 'Acme Corp',
            'organization_website' => 'https://acme.com',
            'organization_phone' => '+55 47 99999-0000',
            'organization_email' => '[email protected]',
            'organization_cnpj' => '12.345.678/0001-90',
            'person_id' => 16,
            'person_name' => 'architecto',
            'person_email' => '[email protected]',
            'person_phone' => 'architecto',
            'additional_person_ids' => [
                456,
                789,
            ],
            'list_ids' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads'
payload = {
    "title": "Lead da Maria",
    "description": "Veio pelo Google Ads, quer automatizar o processo comercial. Orçamento estimado R$ 5k.",
    "lead_value": 5000,
    "expected_close_date": "architecto",
    "pipeline_id": 7,
    "stage_id": 29,
    "source_id": 4,
    "lead_type_id": 2,
    "assigned_user_id": 12,
    "organization_id": 16,
    "organization_name": "Acme Corp",
    "organization_website": "https:\/\/acme.com",
    "organization_phone": "+55 47 99999-0000",
    "organization_email": "[email protected]",
    "organization_cnpj": "12.345.678\/0001-90",
    "person_id": 16,
    "person_name": "architecto",
    "person_email": "[email protected]",
    "person_phone": "architecto",
    "additional_person_ids": [
        456,
        789
    ],
    "list_ids": [
        16
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (201):


{
    "data": {
        "id": 1,
        "title": "Lead da Maria",
        "organization_id": 7,
        "person_id": 42,
        "additional_persons": [
            {
                "id": 456,
                "name": "Giovanna Senger",
                "organization": null,
                "email": "[email protected]",
                "phone": null
            }
        ]
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.required_field_no_default",
        "message": "...",
        "fields": {
            "pipeline_id": [
                "..."
            ]
        }
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.stage_pipeline_mismatch",
        "message": "Stage não pertence ao pipeline informado."
    }
}
 

Request   

POST api/v2/leads

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

title   string     

Título do lead. Example: Lead da Maria

description   string  opcional    

Conteúdo inicial do lead. Quando enviado, além de salvar no lead, cria automaticamente uma nota (activity type=note) vinculada — não é necessário um segundo POST em /activities para registrar esse conteúdo. Example: Veio pelo Google Ads, quer automatizar o processo comercial. Orçamento estimado R$ 5k.

lead_value   number  opcional    

Valor do lead em BRL. Example: 5000

expected_close_date   string  opcional    

ISO-8601. Data esperada de fechamento. Example: architecto

pipeline_id   integer  opcional    

Pipeline (default = token default). Example: 7

stage_id   integer  opcional    

Stage do pipeline (deve pertencer ao pipeline). Example: 29

source_id   integer  opcional    

Source. Example: 4

lead_type_id   integer  opcional    

ID do tipo (lead_types). Validado contra o tenant. Example: 2

assigned_user_id   integer  opcional    

User responsável. Example: 12

organization_id   integer  opcional    

ID da organization existente. Example: 16

organization_name   string  opcional    

Nome — cria se não existir, reusa se existir (case-insensitive). Example: Acme Corp

organization_website   string  opcional    

Aplicado apenas quando a organization é CRIADA (não sobrescreve existente). Example: https://acme.com

organization_phone   string  opcional    

Aplicado apenas quando a organization é CRIADA (não sobrescreve existente). Example: +55 47 99999-0000

organization_email   string  opcional    

Aplicado apenas quando a organization é CRIADA (não sobrescreve existente). Example: [email protected]

organization_cnpj   string  opcional    

Aplicado apenas quando a organization é CRIADA (não sobrescreve existente). Example: 12.345.678/0001-90

person_id   integer  opcional    

ID da person existente. Example: 16

person_name   string  opcional    

Nome (usado como fallback de busca). Example: architecto

person_email   string  opcional    

Email — chave de busca primária. Example: [email protected]

person_phone   string  opcional    

Phone — chave de busca secundária. Example: architecto

additional_person_ids   integer[]  opcional    

IDs de pessoas do mesmo tenant/company a vincular como contatos ADICIONAIS do lead (além do principal). Máximo 20. Cada ID precisa existir, estar visível ao token e ser de outra pessoa que não o principal.

list_ids   integer[]  opcional    

Atualiza um lead (parcial). Não altera pipeline (apenas stage dentro do mesmo).

requer autenticação

Exemplo de requisição:
curl --request PUT \
    "https://ziptime.com.br/api/v2/leads/1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"lead_value\": 4326.41688,
    \"expected_close_date\": \"architecto\",
    \"stage_id\": 16,
    \"source_id\": 16,
    \"lead_type_id\": 16,
    \"assigned_user_id\": 16,
    \"additional_person_ids\": [
        456,
        789
    ],
    \"temperature\": 15,
    \"score\": 18
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "architecto",
    "description": "Eius et animi quos velit et.",
    "lead_value": 4326.41688,
    "expected_close_date": "architecto",
    "stage_id": 16,
    "source_id": 16,
    "lead_type_id": 16,
    "assigned_user_id": 16,
    "additional_person_ids": [
        456,
        789
    ],
    "temperature": 15,
    "score": 18
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'architecto',
            'description' => 'Eius et animi quos velit et.',
            'lead_value' => 4326.41688,
            'expected_close_date' => 'architecto',
            'stage_id' => 16,
            'source_id' => 16,
            'lead_type_id' => 16,
            'assigned_user_id' => 16,
            'additional_person_ids' => [
                456,
                789,
            ],
            'temperature' => 15,
            'score' => 18,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1'
payload = {
    "title": "architecto",
    "description": "Eius et animi quos velit et.",
    "lead_value": 4326.41688,
    "expected_close_date": "architecto",
    "stage_id": 16,
    "source_id": 16,
    "lead_type_id": 16,
    "assigned_user_id": 16,
    "additional_person_ids": [
        456,
        789
    ],
    "temperature": 15,
    "score": 18
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 1,
        "title": "Lead Updated",
        "temperature": {
            "id": 15,
            "label": "Quente"
        },
        "score": {
            "id": 18,
            "label": "5"
        },
        "additional_persons": [
            {
                "id": 456,
                "name": "Giovanna Senger",
                "organization": null,
                "email": null,
                "phone": null
            }
        ]
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "...",
        "fields": {
            "temperature": [
                "..."
            ]
        }
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.stage_pipeline_mismatch",
        "message": "..."
    }
}
 

Request   

PUT api/v2/leads/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Parâmetros do body

title   string  opcional    

Novo título. Example: architecto

description   string  opcional    

Descrição. Example: Eius et animi quos velit et.

lead_value   number  opcional    

Valor. Example: 4326.41688

expected_close_date   string  opcional    

ISO-8601. Example: architecto

stage_id   integer  opcional    

Novo stage (deve pertencer ao pipeline atual do lead). Example: 16

source_id   integer  opcional    

Novo source. Example: 16

lead_type_id   integer  opcional    

Novo tipo (ou null para limpar). Example: 16

assigned_user_id   integer  opcional    

Novo responsável. Example: 16

additional_person_ids   integer[]  opcional    

Lista COMPLETA de IDs de contatos ADICIONAIS do lead (sync). Quando enviada, substitui o conjunto atual de adicionais pelo informado; quando OMITIDA, os adicionais ficam inalterados. Mesmas regras do POST (mesmo tenant/company, visível, ≠ principal, máximo 20).

temperature   integer  opcional    

ID de uma opção de temperatura (GET /leads/attribute-options). Envie null para limpar. Example: 15

score   integer  opcional    

ID de uma opção de score (GET /leads/attribute-options). Envie null para limpar. Example: 18

Remove (soft delete) um lead.

requer autenticação

Exemplo de requisição:
curl --request DELETE \
    "https://ziptime.com.br/api/v2/leads/1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Exemplo de resposta (204):

Resposta vazia
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

DELETE api/v2/leads/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Marca um lead como GANHO (status=2, closed_at=now()). Consome o mesmo `LeadStatusService` das MCP tools — zero lógica duplicada.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/leads/1/mark-won" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"closed_at\": \"2026-01-15T10:00:00-03:00\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1/mark-won"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "closed_at": "2026-01-15T10:00:00-03:00"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1/mark-won';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'closed_at' => '2026-01-15T10:00:00-03:00',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1/mark-won'
payload = {
    "closed_at": "2026-01-15T10:00:00-03:00"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 1,
        "title": "Lead X",
        "status": 2,
        "closed_at": "2026-01-15T10:00:00-03:00"
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.already_won",
        "message": "Lead já está marcado como Ganho."
    }
}
 

Request   

POST api/v2/leads/{id}/mark-won

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Parâmetros do body

closed_at   string  opcional    

ISO-8601. Sobrescreve a data de fechamento (default now()). Example: 2026-01-15T10:00:00-03:00

Marca um lead como PERDIDO (status=3, closed_at=now(), lost_reason_id).

requer autenticação

Consome o mesmo LeadStatusService das MCP tools. A validação de tenant do lost reason acontece no service (422 cross_tenant_violation).

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/leads/1/mark-lost" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"lost_reason_id\": 3,
    \"closed_at\": \"2026-02-20T09:00:00-03:00\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1/mark-lost"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "lost_reason_id": 3,
    "closed_at": "2026-02-20T09:00:00-03:00"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1/mark-lost';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'lost_reason_id' => 3,
            'closed_at' => '2026-02-20T09:00:00-03:00',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1/mark-lost'
payload = {
    "lost_reason_id": 3,
    "closed_at": "2026-02-20T09:00:00-03:00"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 1,
        "title": "Lead X",
        "status": 3,
        "closed_at": "2026-02-20T09:00:00-03:00"
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "...",
        "fields": {
            "lost_reason_id": [
                "..."
            ]
        }
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.already_lost",
        "message": "Lead já está marcado como Perdido."
    }
}
 

Request   

POST api/v2/leads/{id}/mark-lost

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Parâmetros do body

lost_reason_id   integer     

Id do motivo de perda (GET /lost-reasons pra descobrir). Example: 3

closed_at   string  opcional    

ISO-8601. Sobrescreve a data de fechamento (default now()). Example: 2026-02-20T09:00:00-03:00

Reabre um lead FECHADO (won/lost) de volta para ATIVO (status=1). Consome o mesmo `LeadStatusService::reactivate()` do admin web — zero lógica duplicada. Limpa `closed_at` e `lost_reason_id`, preserva pipeline/stage/ stage_entered_at, loga activity `type=system` "Reativado" e dispara `lead.update.before/after`.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/leads/1/reopen" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1/reopen"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1/reopen';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1/reopen'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 1,
        "title": "Lead X",
        "status": 1,
        "closed_at": null
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.already_active",
        "message": "Lead já está ativo."
    }
}
 

Request   

POST api/v2/leads/{id}/reopen

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Transfere um lead para outro funil (pipeline + stage). Consome o mesmo `LeadPipelineTransferService` do `massMovePipeline` do admin web — zero lógica de transição duplicada. Reseta o SLA (`stage_entered_at=now()`), fecha o `LeadStageHistory` aberto e abre um novo com `change_reason='pipeline_transfer'`. Status do lead é preservado (won/lost transferíveis, paridade com a web).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/leads/1/transfer" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pipeline_id\": 7,
    \"stage_id\": 29
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/leads/1/transfer"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pipeline_id": 7,
    "stage_id": 29
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/leads/1/transfer';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'pipeline_id' => 7,
            'stage_id' => 29,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/leads/1/transfer'
payload = {
    "pipeline_id": 7,
    "stage_id": 29
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 1,
        "title": "Lead X",
        "pipeline_id": 7,
        "stage_id": 29,
        "stage_entered_at": "2026-07-22T10:00:00-03:00"
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "...",
        "fields": {
            "pipeline_id": [
                "..."
            ]
        }
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "lead.stage_pipeline_mismatch",
        "message": "Stage não pertence ao pipeline informado."
    }
}
 

Request   

POST api/v2/leads/{id}/transfer

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do lead. Example: 1

Parâmetros do body

pipeline_id   integer     

Pipeline destino (do tenant). Example: 7

stage_id   integer     

Stage destino (deve pertencer ao pipeline). Example: 29

Listas de contatos

Lista as listas vivas da company, ordenadas por nome (§5.2).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/lists?q=News&cursor=architecto&per_page=25" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"b\",
    \"cursor\": \"architecto\",
    \"per_page\": 22
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists"
);

const params = {
    "q": "News",
    "cursor": "architecto",
    "per_page": "25",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "b",
    "cursor": "architecto",
    "per_page": 22
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'q' => 'News',
            'cursor' => 'architecto',
            'per_page' => '25',
        ],
        'json' => [
            'q' => 'b',
            'cursor' => 'architecto',
            'per_page' => 22,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists'
payload = {
    "q": "b",
    "cursor": "architecto",
    "per_page": 22
}
params = {
  'q': 'News',
  'cursor': 'architecto',
  'per_page': '25',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

GET api/v2/lists

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

q   string  opcional    

Busca por nome (substring). Example: News

cursor   string  opcional    

Cursor opaco da página. Example: architecto

per_page   integer  opcional    

Itens por página (1-100). Example: 25

Parâmetros do body

q   string  opcional    

O campo value não pode ter mais que 150 caracteres. Example: b

cursor   string  opcional    

Example: architecto

per_page   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

Detalhe de uma lista (§5.2).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/lists/12" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists/12"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists/12';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists/12'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

GET api/v2/lists/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da lista. Example: 12

Cria uma lista (§5.3). Nome único por company entre listas vivas (§5.5).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/lists" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Newsletter\",
    \"description\": \"Inscritos do site\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Newsletter",
    "description": "Inscritos do site"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Newsletter',
            'description' => 'Inscritos do site',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists'
payload = {
    "name": "Newsletter",
    "description": "Inscritos do site"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/v2/lists

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

name   string     

Nome da lista (até 150). Example: Newsletter

description   string  opcional    

Descrição (até 500). Example: Inscritos do site

Atualiza nome e/ou descrição de uma lista (§5.3).

requer autenticação

Exemplo de requisição:
curl --request PUT \
    "https://ziptime.com.br/api/v2/lists/12" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Newsletter 2026\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists/12"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Newsletter 2026",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists/12';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Newsletter 2026',
            'description' => 'Eius et animi quos velit et.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists/12'
payload = {
    "name": "Newsletter 2026",
    "description": "Eius et animi quos velit et."
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/v2/lists/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da lista. Example: 12

Parâmetros do body

name   string  opcional    

Novo nome (até 150). Example: Newsletter 2026

description   string  opcional    

Nova descrição (até 500). Example: Eius et animi quos velit et.

Membros ativos e visíveis da lista, da entrada mais recente para a mais antiga (§5.4).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/lists/12/members?cursor=architecto&per_page=25&source=form&added_since=2026-10-01" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"per_page\": 22,
    \"source\": \"manual\",
    \"added_since\": \"2026-10-29T12:47:25\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists/12/members"
);

const params = {
    "cursor": "architecto",
    "per_page": "25",
    "source": "form",
    "added_since": "2026-10-01",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "per_page": 22,
    "source": "manual",
    "added_since": "2026-10-29T12:47:25"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists/12/members';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'per_page' => '25',
            'source' => 'form',
            'added_since' => '2026-10-01',
        ],
        'json' => [
            'cursor' => 'architecto',
            'per_page' => 22,
            'source' => 'manual',
            'added_since' => '2026-10-29T12:47:25',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists/12/members'
payload = {
    "cursor": "architecto",
    "per_page": 22,
    "source": "manual",
    "added_since": "2026-10-29T12:47:25"
}
params = {
  'cursor': 'architecto',
  'per_page': '25',
  'source': 'form',
  'added_since': '2026-10-01',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

GET api/v2/lists/{id}/members

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da lista. Example: 12

Parâmetros de query

cursor   string  opcional    

Cursor opaco da página. Example: architecto

per_page   integer  opcional    

Itens por página (1-100). Example: 25

source   string  opcional    

manual|bulk|form|api|mcp. Example: form

added_since   string  opcional    

Data ISO-8601 — só entradas a partir dela. Example: 2026-10-01

Parâmetros do body

cursor   string  opcional    

Example: architecto

per_page   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

source   string  opcional    

Example: manual

Must be one of:
  • manual
  • bulk
  • form
  • api
  • mcp
added_since   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

Adiciona pessoas à lista (origem `api`). Idempotente (§5.4). Ids não visíveis/inexistentes caem em `not_found` sem derrubar o lote (4.7).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/lists/12/members" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"person_ids\": [
        840,
        841
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists/12/members"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "person_ids": [
        840,
        841
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists/12/members';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'person_ids' => [
                840,
                841,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists/12/members'
payload = {
    "person_ids": [
        840,
        841
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/v2/lists/{id}/members

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da lista. Example: 12

Parâmetros do body

person_ids   integer[]     

Ids de pessoa (até 500).

Remove pessoas da lista (soft, reversível). Idempotente (§5.4).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/lists/12/members/remove" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"person_ids\": [
        840
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lists/12/members/remove"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "person_ids": [
        840
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lists/12/members/remove';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'person_ids' => [
                840,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lists/12/members/remove'
payload = {
    "person_ids": [
        840
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/v2/lists/{id}/members/remove

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da lista. Example: 12

Parâmetros do body

person_ids   integer[]     

Ids de pessoa (até 500).

Minha conta

Retorna identidade do user autenticado, tenant e company atuais e abilities do token.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 42,
        "name": "Alice",
        "email": "[email protected]",
        "image_url": null,
        "brand_color": "#0275F1",
        "is_api_user": false,
        "is_admin": true,
        "tenant": {
            "id": 100,
            "name": "Acme"
        },
        "company": {
            "id": 1,
            "name": "Acme HQ"
        },
        "abilities": [
            "*"
        ]
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

GET api/v2/me

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Atualiza name/email/phone do usuário autenticado.

requer autenticação

Exemplo de requisição:
curl --request PUT \
    "https://ziptime.com.br/api/v2/me" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Alice Silva\",
    \"email\": \"[email protected]\",
    \"phone\": \"11999998888\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/me"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Alice Silva",
    "email": "[email protected]",
    "phone": "11999998888"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Alice Silva',
            'email' => '[email protected]',
            'phone' => '11999998888',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me'
payload = {
    "name": "Alice Silva",
    "email": "[email protected]",
    "phone": "11999998888"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 42,
        "name": "Alice Silva",
        "email": "[email protected]",
        "image_url": null,
        "brand_color": "#0275F1",
        "is_api_user": false,
        "is_admin": true,
        "tenant": {
            "id": 100,
            "name": "Acme"
        },
        "company": {
            "id": 1,
            "name": "Acme HQ"
        },
        "abilities": [
            "*"
        ]
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "Validação falhou.",
        "fields": {
            "email": [
                "The email has already been taken."
            ]
        }
    }
}
 

Request   

PUT api/v2/me

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

name   string  opcional    

Nome do usuário. Example: Alice Silva

email   string  opcional    

Email (único na plataforma). Example: [email protected]

phone   string  opcional    

Telefone. Example: 11999998888

Troca a senha do usuário autenticado.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/me/change-password" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"senhaAtual123\",
    \"new_password\": \"novaSenha456\",
    \"new_password_confirmation\": \"novaSenha456\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/change-password"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "senhaAtual123",
    "new_password": "novaSenha456",
    "new_password_confirmation": "novaSenha456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/change-password';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'current_password' => 'senhaAtual123',
            'new_password' => 'novaSenha456',
            'new_password_confirmation' => 'novaSenha456',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/change-password'
payload = {
    "current_password": "senhaAtual123",
    "new_password": "novaSenha456",
    "new_password_confirmation": "novaSenha456"
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "updated": true
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "auth.invalid_current_password",
        "message": "Senha atual incorreta."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "Validação falhou.",
        "fields": {
            "new_password": [
                "The new password confirmation does not match."
            ]
        }
    }
}
 

Request   

POST api/v2/me/change-password

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

current_password   string     

Senha atual. Example: senhaAtual123

new_password   string     

Nova senha (min 8). Example: novaSenha456

new_password_confirmation   string     

Confirmação da nova senha. Example: novaSenha456

Retorna o plano ativo do tenant do usuário autenticado.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me/subscription" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/subscription"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/subscription';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/subscription'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "plan": {
            "id": 2,
            "name": "Pro",
            "slug": "pro"
        },
        "status": "active",
        "billing_cycle": "monthly",
        "price": 149.9,
        "auto_renew": true,
        "renews_at": "2026-08-21T00:00:00-03:00",
        "users_count": 8,
        "expires_at": null,
        "current_period_end": "2026-08-21T00:00:00-03:00",
        "next_invoice_at": "2026-08-21T00:00:00-03:00"
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "Recurso não encontrado."
    }
}
 

Request   

GET api/v2/me/subscription

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Retorna os totais do usuário autenticado.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me/stats" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/stats"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/stats'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "open_leads": 24,
        "organizations": 12,
        "contacts": 38
    }
}
 

Request   

GET api/v2/me/stats

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Lista sessões ativas do user e quota por canal (max/used).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me/sessions" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/sessions"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/sessions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/sessions'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "sessions": [
            {
                "id": 12,
                "client_type": "web_login_via_api",
                "device_name": "Chrome",
                "is_current": true
            }
        ],
        "channel_limits": {
            "web_login_via_api": {
                "max": 1,
                "used": 1
            },
            "mobile_app": {
                "max": 3,
                "used": 0
            }
        }
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

GET api/v2/me/sessions

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Lista histórico de sessões do user atual, últimos 90 dias.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me/sessions/history?cursor=architecto&limit=25" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/sessions/history"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/sessions/history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/sessions/history'
payload = {
    "cursor": "architecto",
    "limit": 22
}
params = {
  'cursor': 'architecto',
  'limit': '25',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 12,
            "client_type": "web_login_via_api",
            "device_name": "Chrome",
            "ended_reason": "logout",
            "is_active": false
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Exemplo de resposta (401):


{
    "error": {
        "code": "auth.invalid_token",
        "message": "Token de autenticação inválido ou ausente."
    }
}
 

Request   

GET api/v2/me/sessions/history

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco da próxima página. Example: architecto

limit   integer  opcional    

Itens por página (1-100). Example: 25

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

Revoga uma sessão específica do user atual.

requer autenticação

Exemplo de requisição:
curl --request DELETE \
    "https://ziptime.com.br/api/v2/me/sessions/12" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/sessions/12"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/sessions/12';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/sessions/12'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Exemplo de resposta (204):

Resposta vazia
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "Sessão não encontrada."
    }
}
 

Request   

DELETE api/v2/me/sessions/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do token (PersonalAccessToken). Example: 12

Revoga todas as sessões do user atual, exceto a sessão que originou a request.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/me/sessions/revoke-others" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/sessions/revoke-others"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/sessions/revoke-others';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/sessions/revoke-others'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "revoked": 3
    }
}
 

Request   

POST api/v2/me/sessions/revoke-others

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Notificações

Lista notificações do usuário (paginado por cursor).

requer autenticação

Ordenadas por created_at DESC (tiebreak id). Filtro status: all (default, lidas+não-lidas não-arquivadas), unread (não-lidas não-arquivadas), archived (só arquivadas).

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me/notifications?cursor=architecto&limit=25&status=all" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"status\": \"unread\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/notifications"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "status": "all",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "status": "unread"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/notifications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'status' => 'all',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'status' => 'unread',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/notifications'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "status": "unread"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'status': 'all',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": "9b2f...",
            "notification_type": "mention",
            "category": "trigger",
            "title": "Maria mencionou você em uma nota",
            "body": "Confirma o desconto...",
            "entity_type": "note",
            "entity_id": 4821,
            "cta_url": "/admin/leads/312",
            "cta_url_mobile": null,
            "cta_label": "Ver nota",
            "cta_target": "_self",
            "read_at": null,
            "archived_at": null,
            "created_at": "2026-07-21T09:14:00-03:00"
        }
    ],
    "meta": {
        "next_cursor": "eyJ..."
    }
}
 

Request   

GET api/v2/me/notifications

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco para a próxima página. Example: Example: architecto

limit   integer  opcional    

Itens por página (1..100, default 25). Example: 25

status   string  opcional    

Filtro de estado: all|unread|archived (default all). Example: all

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

status   string  opcional    

Example: unread

Must be one of:
  • all
  • unread
  • archived

Contador de não-lidas (para o badge do sino).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/me/notifications/unread-count" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/notifications/unread-count"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/notifications/unread-count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/notifications/unread-count'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "count": 7
    }
}
 

Request   

GET api/v2/me/notifications/unread-count

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Marca todas as não-lidas (não-arquivadas) como lidas.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/me/notifications/read-all" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/notifications/read-all"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/notifications/read-all';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/notifications/read-all'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "updated": 7
    }
}
 

Request   

POST api/v2/me/notifications/read-all

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Marca uma notificação como lida (idempotente).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../read" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../read"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../read';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../read'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": "9b2f...",
        "read_at": "2026-07-21T09:20:00-03:00"
    }
}
 

Request   

POST api/v2/me/notifications/{id}/read

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   string     

UUID da notificação. Example: 9b2f1c3e-...

Arquiva uma notificação (some da view padrão, não apaga).

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../archive" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../archive"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../archive';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/me/notifications/9b2f1c3e-.../archive'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": "9b2f...",
        "archived_at": "2026-07-21T09:20:00-03:00"
    }
}
 

Request   

POST api/v2/me/notifications/{id}/archive

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   string     

UUID da notificação. Example: 9b2f1c3e-...

Pessoas

Lista pessoas do tenant atual com paginação cursor-based.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/persons?cursor=architecto&limit=25&name=Maria&email=maria%40&phone=5511&organization_id=7&created_after=2026-01-01&created_before=2026-12-31&sort=created_at&order=desc&count=1" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"email\": \"[email protected]\",
    \"phone\": \"d\",
    \"organization_id\": 16,
    \"list_id\": 16,
    \"created_after\": \"2026-10-29T12:47:25\",
    \"created_before\": \"2026-10-29T12:47:25\",
    \"sort\": \"updated_at\",
    \"order\": \"asc\",
    \"count\": \"false\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/persons"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "name": "Maria",
    "email": "maria@",
    "phone": "5511",
    "organization_id": "7",
    "created_after": "2026-01-01",
    "created_before": "2026-12-31",
    "sort": "created_at",
    "order": "desc",
    "count": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "email": "[email protected]",
    "phone": "d",
    "organization_id": 16,
    "list_id": 16,
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "sort": "updated_at",
    "order": "asc",
    "count": "false"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/persons';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'name' => 'Maria',
            'email' => 'maria@',
            'phone' => '5511',
            'organization_id' => '7',
            'created_after' => '2026-01-01',
            'created_before' => '2026-12-31',
            'sort' => 'created_at',
            'order' => 'desc',
            'count' => '1',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'email' => '[email protected]',
            'phone' => 'd',
            'organization_id' => 16,
            'list_id' => 16,
            'created_after' => '2026-10-29T12:47:25',
            'created_before' => '2026-10-29T12:47:25',
            'sort' => 'updated_at',
            'order' => 'asc',
            'count' => 'false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/persons'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "email": "[email protected]",
    "phone": "d",
    "organization_id": 16,
    "list_id": 16,
    "created_after": "2026-10-29T12:47:25",
    "created_before": "2026-10-29T12:47:25",
    "sort": "updated_at",
    "order": "asc",
    "count": "false"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'name': 'Maria',
  'email': 'maria@',
  'phone': '5511',
  'organization_id': '7',
  'created_after': '2026-01-01',
  'created_before': '2026-12-31',
  'sort': 'created_at',
  'order': 'desc',
  'count': '1',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 42,
            "name": "Maria",
            "emails": [],
            "contact_numbers": []
        }
    ],
    "meta": {
        "total": 957,
        "next_cursor": null
    }
}
 

Request   

GET api/v2/persons

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco da página. Example: architecto

limit   integer  opcional    

Itens por página (1-100). Example: 25

name   string  opcional    

Filtro substring por nome. Example: Maria

email   string  opcional    

Filtro substring por email. Example: maria@

phone   string  opcional    

Filtro substring por phone. Example: 5511

organization_id   integer  opcional    

Filtro por organization. Example: 7

created_after   string  opcional    

ISO-8601. Example: 2026-01-01

created_before   string  opcional    

ISO-8601. Example: 2026-12-31

sort   string  opcional    

name|created_at|updated_at. Example: created_at

order   string  opcional    

asc|desc. Example: desc

count   boolean  opcional    

Quando true, inclui meta.total = total de pessoas que batem com os filtros (ignora paginação). Rode apenas na 1ª página / troca de filtro; sem o param o COUNT não roda. Example: true

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

email   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: [email protected]

phone   string  opcional    

O campo value não pode ter mais que 30 caracteres. Example: d

organization_id   integer  opcional    

Example: 16

list_id   integer  opcional    

Example: 16

created_after   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

created_before   string  opcional    

O campo value não é uma data válida. Example: 2026-10-29T12:47:25

sort   string  opcional    

Example: updated_at

Must be one of:
  • name
  • created_at
  • updated_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc
count   string  opcional    

Example: false

Must be one of:
  • 1
  • 0
  • true
  • false

Lookup de pessoa por telefone. Endpoint dedicado pra cobrir o caso "WhatsApp manda E.164, banco guarda mascarado".

requer autenticação

Normaliza input e os números armazenados em dígitos puros, depois casa pelos ÚLTIMOS 8 dígitos. O corte 8 foi escolhido pra cobrir tanto celulares (9 dígitos pós-DDD) quanto fixos (8 dígitos), e absorver divergência de DDD/DDI entre o que o WhatsApp manda (5511999998888) e o que está cadastrado ((11) 99999-8888).

Pode retornar 0, 1 ou N persons (duplicados são caso suportado; o cliente decide como tratar).

Respeita tenant (HasTenantScope no Person) e view_permission (AuthorizedUserScope) como os outros endpoints de person.

Aceita phone OU lid (pelo menos um). Se lid válido vier informado, o ramo LID tem prioridade. O LID do WhatsApp é identificador completo (~15 dígitos), casado por igualdade exata de dígitos contra entradas com label whatsapp_lid; já o phone casa por sufixo (últimos 8 dígitos) e ignora entradas whatsapp_lid (evita colisão de sufixo entre um telefone real e o LID de outra pessoa).

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/persons/lookup?phone=5511999998888&lid=190636586180822" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"b\",
    \"lid\": \"n\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/persons/lookup"
);

const params = {
    "phone": "5511999998888",
    "lid": "190636586180822",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "phone": "b",
    "lid": "n"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/persons/lookup';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'phone' => '5511999998888',
            'lid' => '190636586180822',
        ],
        'json' => [
            'phone' => 'b',
            'lid' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/persons/lookup'
payload = {
    "phone": "b",
    "lid": "n"
}
params = {
  'phone': '5511999998888',
  'lid': '190636586180822',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 42,
            "name": "Maria",
            "contact_numbers": [
                {
                    "value": "(11) 99999-8888",
                    "label": "mobile"
                }
            ]
        }
    ]
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "O telefone precisa ter ao menos 4 dígitos."
    }
}
 

Request   

GET api/v2/persons/lookup

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

phone   string  opcional    

Telefone em qualquer formato (E.164, mascarado, dígitos puros). Obrigatório se lid ausente. Example: 5511999998888

lid   string  opcional    

LID do WhatsApp (identificador completo, ~15 dígitos). Obrigatório se phone ausente. Example: 190636586180822

Parâmetros do body

phone   string  opcional    

This field is required when lid is not present. O campo value deve ter no mínimo 4 caracteres. O campo value não pode ter mais que 30 caracteres. Example: b

lid   string  opcional    

This field is required when phone is not present. O campo value deve ter no mínimo 4 caracteres. O campo value não pode ter mais que 30 caracteres. Example: n

Retorna uma pessoa por id.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/persons/42" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/persons/42"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/persons/42';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/persons/42'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 42,
        "name": "Maria",
        "emails": [
            {
                "value": "maria@x",
                "label": "work"
            }
        ]
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "Recurso não encontrado."
    }
}
 

Request   

GET api/v2/persons/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da person. Example: 42

Cria uma pessoa. Requer header `Idempotency-Key`.

requer autenticação

Exemplo de requisição:
curl --request POST \
    "https://ziptime.com.br/api/v2/persons" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Maria Silva\",
    \"job_title\": \"Diretora Comercial\",
    \"organization_id\": 7,
    \"emails\": [
        \"architecto\"
    ],
    \"contact_numbers\": [
        \"architecto\"
    ],
    \"list_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/persons"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Maria Silva",
    "job_title": "Diretora Comercial",
    "organization_id": 7,
    "emails": [
        "architecto"
    ],
    "contact_numbers": [
        "architecto"
    ],
    "list_ids": [
        16
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/persons';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Maria Silva',
            'job_title' => 'Diretora Comercial',
            'organization_id' => 7,
            'emails' => [
                'architecto',
            ],
            'contact_numbers' => [
                'architecto',
            ],
            'list_ids' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/persons'
payload = {
    "name": "Maria Silva",
    "job_title": "Diretora Comercial",
    "organization_id": 7,
    "emails": [
        "architecto"
    ],
    "contact_numbers": [
        "architecto"
    ],
    "list_ids": [
        16
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (201):


{
    "data": {
        "id": 42,
        "name": "Maria"
    }
}
 

Exemplo de resposta (400):


{
    "error": {
        "code": "idempotency.key_required",
        "message": "..."
    }
}
 

Exemplo de resposta (422):


{
    "error": {
        "code": "validation.failed",
        "message": "..."
    }
}
 

Request   

POST api/v2/persons

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros do body

name   string     

Nome completo. Example: Maria Silva

job_title   string  opcional    

Cargo. Example: Diretora Comercial

organization_id   integer  opcional    

FK para organization (mesmo tenant). Example: 7

emails   string[]  opcional    

Lista de emails [{value, label}]. label ∈ work|home|personal.

value   string  opcional    

This field is required when emails.* is present. O campo value deve ser um endereço de e-mail válido. O campo value não pode ter mais que 255 caracteres. Example: n

label   string  opcional    

Example: home

Must be one of:
  • work
  • home
  • personal
*   object  opcional    
value   string  opcional    

required_with:emails Email válido. Example: [email protected]

label   string  opcional    

Example: work

contact_numbers   string[]  opcional    

Lista de telefones [{value, label}]. label ∈ work|home|mobile.

value   string  opcional    

This field is required when contact_numbers.* is present. O campo value não pode ter mais que 30 caracteres. Example: g

label   string  opcional    

Example: other

Must be one of:
  • work
  • home
  • mobile
  • other
  • whatsapp_lid
*   object  opcional    
value   string  opcional    

required_with:contact_numbers. Example: +5511999999999

label   string  opcional    

Example: mobile

list_ids   integer[]  opcional    

Atualiza uma pessoa (parcial — só campos enviados).

requer autenticação

Exemplo de requisição:
curl --request PUT \
    "https://ziptime.com.br/api/v2/persons/42" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"job_title\": \"architecto\",
    \"organization_id\": 16,
    \"emails\": [
        \"architecto\"
    ],
    \"contact_numbers\": [
        \"architecto\"
    ],
    \"list_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/persons/42"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto",
    "job_title": "architecto",
    "organization_id": 16,
    "emails": [
        "architecto"
    ],
    "contact_numbers": [
        "architecto"
    ],
    "list_ids": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/persons/42';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'architecto',
            'job_title' => 'architecto',
            'organization_id' => 16,
            'emails' => [
                'architecto',
            ],
            'contact_numbers' => [
                'architecto',
            ],
            'list_ids' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/persons/42'
payload = {
    "name": "architecto",
    "job_title": "architecto",
    "organization_id": 16,
    "emails": [
        "architecto"
    ],
    "contact_numbers": [
        "architecto"
    ],
    "list_ids": [
        16
    ]
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Exemplo de resposta (200):


{
    "data": {
        "id": 42,
        "name": "Maria Updated"
    }
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

PUT api/v2/persons/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da person. Example: 42

Parâmetros do body

name   string  opcional    

Novo nome. Example: architecto

job_title   string  opcional    

Cargo. Example: architecto

organization_id   integer  opcional    

FK para organization. Example: 16

emails   string[]  opcional    

Lista de emails.

value   string  opcional    

This field is required when emails.* is present. O campo value deve ser um endereço de e-mail válido. O campo value não pode ter mais que 255 caracteres. Example: n

label   string  opcional    

Example: home

Must be one of:
  • work
  • home
  • personal
contact_numbers   string[]  opcional    

Lista de telefones.

value   string  opcional    

This field is required when contact_numbers.* is present. O campo value não pode ter mais que 30 caracteres. Example: g

label   string  opcional    

Example: whatsapp_lid

Must be one of:
  • work
  • home
  • mobile
  • other
  • whatsapp_lid
list_ids   integer[]  opcional    

Remove (soft delete) uma pessoa.

requer autenticação

Exemplo de requisição:
curl --request DELETE \
    "https://ziptime.com.br/api/v2/persons/42" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/persons/42"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/persons/42';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/persons/42'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Exemplo de resposta (204):

Resposta vazia
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

DELETE api/v2/persons/{id}

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id da person. Example: 42

Referências

Lista pipelines do tenant.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/pipelines?cursor=architecto&limit=25&name=architecto&is_default=&sort=name&order=architecto" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"is_default\": \"1\",
    \"sort\": \"name\",
    \"order\": \"asc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/pipelines"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "name": "architecto",
    "is_default": "0",
    "sort": "name",
    "order": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "is_default": "1",
    "sort": "name",
    "order": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/pipelines';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'name' => 'architecto',
            'is_default' => '0',
            'sort' => 'name',
            'order' => 'architecto',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'is_default' => '1',
            'sort' => 'name',
            'order' => 'asc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/pipelines'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "is_default": "1",
    "sort": "name",
    "order": "asc"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'name': 'architecto',
  'is_default': '0',
  'sort': 'name',
  'order': 'architecto',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 7,
            "name": "Vendas Corporativo",
            "is_default": true
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Request   

GET api/v2/pipelines

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Cursor opaco. Example: architecto

limit   integer  opcional    

1-100. Example: 25

name   string  opcional    

Filtro substring. Example: architecto

is_default   boolean  opcional    

Filtra is_default=1. Example: false

sort   string  opcional    

name|created_at. Example: name

order   string  opcional    

asc|desc. Example: architecto

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

is_default   string  opcional    

Example: 1

Must be one of:
  • 0
  • 1
  • true
  • false
sort   string  opcional    

Example: name

Must be one of:
  • name
  • created_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc

Lista stages de um pipeline (sem paginação — pipelines têm dezenas no máximo).

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/pipelines/7/stages" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ziptime.com.br/api/v2/pipelines/7/stages"
);

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/pipelines/7/stages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/pipelines/7/stages'
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 29,
            "name": "Novo Lead",
            "code": "new",
            "sort_order": 1,
            "probability": 10,
            "pipeline_id": 7,
            "max_days_in_stage": 7
        },
        {
            "id": 30,
            "name": "Qualificação",
            "code": "qualification",
            "sort_order": 2,
            "probability": 25,
            "pipeline_id": 7,
            "max_days_in_stage": null
        }
    ]
}
 

Exemplo de resposta (404):


{
    "error": {
        "code": "resource.not_found",
        "message": "..."
    }
}
 

Request   

GET api/v2/pipelines/{id}/stages

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros da URL

id   integer     

Id do pipeline. Example: 7

Lista sources do tenant.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/sources?cursor=architecto&limit=25&name=architecto&sort=architecto&order=architecto" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"sort\": \"name\",
    \"order\": \"asc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/sources"
);

const params = {
    "cursor": "architecto",
    "limit": "25",
    "name": "architecto",
    "sort": "architecto",
    "order": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "sort": "name",
    "order": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/sources';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '25',
            'name' => 'architecto',
            'sort' => 'architecto',
            'order' => 'architecto',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'sort' => 'name',
            'order' => 'asc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/sources'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "sort": "name",
    "order": "asc"
}
params = {
  'cursor': 'architecto',
  'limit': '25',
  'name': 'architecto',
  'sort': 'architecto',
  'order': 'architecto',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 4,
            "name": "Site Nano"
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Request   

GET api/v2/sources

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

1-100. Example: 25

name   string  opcional    

Filtro substring. Example: architecto

sort   string  opcional    

name|created_at. Example: architecto

order   string  opcional    

asc|desc. Example: architecto

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

sort   string  opcional    

Example: name

Must be one of:
  • name
  • created_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc

Lista types do tenant.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/types?cursor=architecto&limit=16&name=architecto&sort=architecto&order=architecto" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"sort\": \"created_at\",
    \"order\": \"desc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/types"
);

const params = {
    "cursor": "architecto",
    "limit": "16",
    "name": "architecto",
    "sort": "architecto",
    "order": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "sort": "created_at",
    "order": "desc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '16',
            'name' => 'architecto',
            'sort' => 'architecto',
            'order' => 'architecto',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'sort' => 'created_at',
            'order' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/types'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "sort": "created_at",
    "order": "desc"
}
params = {
  'cursor': 'architecto',
  'limit': '16',
  'name': 'architecto',
  'sort': 'architecto',
  'order': 'architecto',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 2,
            "name": "Cliente"
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Request   

GET api/v2/types

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

1-100. Example: 16

name   string  opcional    

Filtro substring. Example: architecto

sort   string  opcional    

name|created_at. Example: architecto

order   string  opcional    

asc|desc. Example: architecto

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

sort   string  opcional    

Example: created_at

Must be one of:
  • name
  • created_at
order   string  opcional    

Example: desc

Must be one of:
  • asc
  • desc

Lista tags do tenant.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/tags?cursor=architecto&limit=16&name=architecto&color=6366f1&sort=architecto&order=architecto" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"color\": \"zmiyvdl\",
    \"sort\": \"created_at\",
    \"order\": \"desc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/tags"
);

const params = {
    "cursor": "architecto",
    "limit": "16",
    "name": "architecto",
    "color": "6366f1",
    "sort": "architecto",
    "order": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "color": "zmiyvdl",
    "sort": "created_at",
    "order": "desc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/tags';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '16',
            'name' => 'architecto',
            'color' => '6366f1',
            'sort' => 'architecto',
            'order' => 'architecto',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'color' => 'zmiyvdl',
            'sort' => 'created_at',
            'order' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/tags'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "color": "zmiyvdl",
    "sort": "created_at",
    "order": "desc"
}
params = {
  'cursor': 'architecto',
  'limit': '16',
  'name': 'architecto',
  'color': '6366f1',
  'sort': 'architecto',
  'order': 'architecto',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 11,
            "name": "VIP",
            "color": "6366f1"
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Request   

GET api/v2/tags

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

1-100. Example: 16

name   string  opcional    

Filtro substring. Example: architecto

color   string  opcional    

Filtro exato (hex sem #). Example: 6366f1

sort   string  opcional    

name|created_at. Example: architecto

order   string  opcional    

asc|desc. Example: architecto

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

color   string  opcional    

O campo value não pode ter mais que 7 caracteres. Example: zmiyvdl

sort   string  opcional    

Example: created_at

Must be one of:
  • name
  • created_at
order   string  opcional    

Example: desc

Must be one of:
  • asc
  • desc

Lista users humanos do tenant (filtra `is_api_user=false`).

requer autenticação

Útil pra integradores resolverem assigned_user_id. NÃO retorna user-API (tokens de outras integrações ficam ocultos).

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/users?cursor=architecto&limit=16&name=architecto&email=gbailey%40example.net&status=architecto&sort=architecto&order=architecto" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"email\": \"[email protected]\",
    \"status\": \"active\",
    \"sort\": \"email\",
    \"order\": \"desc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/users"
);

const params = {
    "cursor": "architecto",
    "limit": "16",
    "name": "architecto",
    "email": "[email protected]",
    "status": "architecto",
    "sort": "architecto",
    "order": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "email": "[email protected]",
    "status": "active",
    "sort": "email",
    "order": "desc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '16',
            'name' => 'architecto',
            'email' => '[email protected]',
            'status' => 'architecto',
            'sort' => 'architecto',
            'order' => 'architecto',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'email' => '[email protected]',
            'status' => 'active',
            'sort' => 'email',
            'order' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/users'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "email": "[email protected]",
    "status": "active",
    "sort": "email",
    "order": "desc"
}
params = {
  'cursor': 'architecto',
  'limit': '16',
  'name': 'architecto',
  'email': '[email protected]',
  'status': 'architecto',
  'sort': 'architecto',
  'order': 'architecto',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 12,
            "name": "Comercial Nano",
            "email": "[email protected]",
            "status": 1,
            "image_url": "https://.../storage/user/12/avatar.png"
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Request   

GET api/v2/users

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

1-100. Example: 16

name   string  opcional    

Filtro substring por nome. Example: architecto

email   string  opcional    

Filtro substring por email. Example: [email protected]

status   string  opcional    

active|1 (ativo). Outros valores = inativo. Example: architecto

sort   string  opcional    

name|email|created_at. Example: architecto

order   string  opcional    

asc|desc. Example: architecto

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

email   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: [email protected]

status   string  opcional    

Example: active

Must be one of:
  • 0
  • 1
  • active
  • inactive
sort   string  opcional    

Example: email

Must be one of:
  • name
  • email
  • created_at
order   string  opcional    

Example: desc

Must be one of:
  • asc
  • desc

Lista os motivos de perda (lost reasons) do tenant. Usado pelo app pra montar o seletor antes de POST /leads/{id}/mark-lost.

requer autenticação

Exemplo de requisição:
curl --request GET \
    --get "https://ziptime.com.br/api/v2/lost-reasons?cursor=architecto&limit=16&name=architecto&sort=architecto&order=architecto" \
    --header "Authorization: Bearer {seu_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cursor\": \"architecto\",
    \"limit\": 22,
    \"name\": \"g\",
    \"sort\": \"created_at\",
    \"order\": \"asc\"
}"
const url = new URL(
    "https://ziptime.com.br/api/v2/lost-reasons"
);

const params = {
    "cursor": "architecto",
    "limit": "16",
    "name": "architecto",
    "sort": "architecto",
    "order": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {seu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "sort": "created_at",
    "order": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://ziptime.com.br/api/v2/lost-reasons';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {seu_token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'cursor' => 'architecto',
            'limit' => '16',
            'name' => 'architecto',
            'sort' => 'architecto',
            'order' => 'architecto',
        ],
        'json' => [
            'cursor' => 'architecto',
            'limit' => 22,
            'name' => 'g',
            'sort' => 'created_at',
            'order' => 'asc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://ziptime.com.br/api/v2/lost-reasons'
payload = {
    "cursor": "architecto",
    "limit": 22,
    "name": "g",
    "sort": "created_at",
    "order": "asc"
}
params = {
  'cursor': 'architecto',
  'limit': '16',
  'name': 'architecto',
  'sort': 'architecto',
  'order': 'architecto',
}
headers = {
  'Authorization': 'Bearer {seu_token}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()

Exemplo de resposta (200):


{
    "data": [
        {
            "id": 3,
            "name": "Preço alto",
            "is_active": true
        }
    ],
    "meta": {
        "next_cursor": null
    }
}
 

Request   

GET api/v2/lost-reasons

Headers

Authorization        

Example: Bearer {seu_token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Parâmetros de query

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

1-100. Example: 16

name   string  opcional    

Filtro substring por nome. Example: architecto

sort   string  opcional    

name|created_at. Example: architecto

order   string  opcional    

asc|desc. Example: architecto

Parâmetros do body

cursor   string  opcional    

Example: architecto

limit   integer  opcional    

O campo value deve ser no mínimo 1. O campo value não pode ser maior que 100. Example: 22

name   string  opcional    

O campo value não pode ter mais que 255 caracteres. Example: g

sort   string  opcional    

Example: created_at

Must be one of:
  • name
  • created_at
order   string  opcional    

Example: asc

Must be one of:
  • asc
  • desc