Pular para o conteúdo

API do ISSA

Leia e grave seus leads, contatos e agendamentos pelo seu próprio software e receba uma mensagem quando algo acontecer.

Autenticação

Crie uma chave em Configurações, Desenvolvedores, e envie-a como token Bearer. As chaves têm apenas as permissões que você deu.

Authorization: Bearer issa_live_<prefix>_<secret>

Convenções

  • Cada chave pode fazer 120 requisições por minuto. Depois disso você recebe o erro ISSA-4042 e um cabeçalho Retry-After.
  • As listas usam cursores: envie limit e o cursor que recebeu em nextCursor.
  • Os erros têm este formato: { "error": { "code": "ISSA-4040", "message": "…" } }.
  • Requisições e respostas são JSON em camelCase. As datas são ISO 8601.

Descrição legível por máquinas (OpenAPI 3.1): https://holaissa.com/v1/public/api/openapi.json

Leads

GET/leads

List leads

Exige a permissão leads:read

Parâmetros
cursorquery · string
limitquery · integer
qquery · string
stageIdquery · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/leads
POST/leads

Create a lead

Exige a permissão leads:write

Corpo
nameobrigatóriostring
phonestring
intereststring
valueAmountnumber
valueCurrencystring
stageIdstring
ownerMemberIdstring
tagsstring[]
assistantIdstring

Respostas: 201 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X POST -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/leads
GET/leads/{id}

Get a lead

Exige a permissão leads:read

Parâmetros
idobrigatóriopath · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/leads/{id}
PATCH/leads/{id}

Update a lead

Exige a permissão leads:write

Parâmetros
idobrigatóriopath · string
Corpo
namestring
intereststring
stageIdstring
ownerMemberIdstring | null
valueAmountnumber | null
valueCurrencystring
productIdstring | null
tagsstring[]
lostReasonstring

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X PATCH -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/leads/{id}

Contacts

GET/contacts

List contacts

Exige a permissão leads:read

Parâmetros
cursorquery · string
limitquery · integer

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/contacts
GET/contacts/{id}

Get a contact

Exige a permissão leads:read

Parâmetros
idobrigatóriopath · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/contacts/{id}

Appointments

GET/appointments

List appointments, soonest first

Exige a permissão appointments:read

Parâmetros
cursorquery · string
limitquery · integer
fromquery · string
toquery · string
statusquery · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/appointments
POST/appointments

Create an appointment (it does not appear in an external calendar)

Exige a permissão appointments:write

Corpo
contactIdobrigatóriostring
assistantIdstring
startAtobrigatóriostring
endAtobrigatóriostring
timezonestring
notesstring

Respostas: 201 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X POST -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/appointments
GET/appointments/{id}

Get an appointment

Exige a permissão appointments:read

Parâmetros
idobrigatóriopath · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/appointments/{id}
PATCH/appointments/{id}

Reschedule, cancel or annotate an appointment

Exige a permissão appointments:write

Parâmetros
idobrigatóriopath · string
Corpo
startAtstring
endAtstring
status"booked" | "cancelled"
notesstring | null

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X PATCH -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/appointments/{id}

Patients

GET/patients

List patients (health module only)

Exige a permissão patients:read

Parâmetros
cursorquery · string
limitquery · integer
qquery · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/patients
POST/patients

Create a patient (health module only)

Exige a permissão patients:write

Corpo
fullNameobrigatóriostring
birthDatestring
sexstring
phonestring
emailstring
leadIdstring

Respostas: 201 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X POST -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/patients
GET/patients/{id}

Get a patient (health module only)

Exige a permissão patients:read

Parâmetros
idobrigatóriopath · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/patients/{id}
GET/patients/{id}/profile

Current clinical profile of a patient

Exige a permissão patients:read

Parâmetros
idobrigatóriopath · string

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/patients/{id}/profile
GET/patients/{id}/notes

Signed clinical notes of a patient, newest first

Exige a permissão patients:read

Parâmetros
idobrigatóriopath · string
cursorquery · string
limitquery · integer

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/patients/{id}/notes

Webhooks

GET/webhooks

List webhook endpoints

Exige a permissão webhooks:manage

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/webhooks
POST/webhooks

Create a webhook endpoint (the signing secret is returned once)

Exige a permissão webhooks:manage

Corpo
urlobrigatóriostring
eventsobrigatório"lead.created" | "lead.updated" | "appointment.created" | "appointment.updated" | "patient.created" | "note.signed" | "consent.signed"[]
descriptionstring

Respostas: 201 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X POST -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/webhooks
PATCH/webhooks/{id}

Update a webhook endpoint

Exige a permissão webhooks:manage

Parâmetros
idobrigatóriopath · string
Corpo
urlstring
events"lead.created" | "lead.updated" | "appointment.created" | "appointment.updated" | "patient.created" | "note.signed" | "consent.signed"[]
descriptionstring | null
activeboolean

Respostas: 200 OK · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X PATCH -H "Authorization: Bearer $ISSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://holaissa.com/v1/public/api/webhooks/{id}
DELETE/webhooks/{id}

Delete a webhook endpoint

Exige a permissão webhooks:manage

Parâmetros
idobrigatóriopath · string

Respostas: 204 Done · 400 Invalid request (ISSA-0002) · 401 Missing, invalid, expired or revoked key (ISSA-4040) · 403 The key lacks the scope (ISSA-4041) · 404 Not found · 429 More than 120 requests a minute (ISSA-4042)

curl -X DELETE -H "Authorization: Bearer $ISSA_API_KEY" \
  https://holaissa.com/v1/public/api/webhooks/{id}

Webhooks

Adicione um endereço https em Configurações, Desenvolvedores e escolha os eventos. O ISSA envia um POST com um corpo JSON com os ids do que mudou; nunca texto livre dos seus registros.

  • lead.created — apiDocs.webhooks.events.lead.created
  • lead.updated — apiDocs.webhooks.events.lead.updated
  • appointment.created — apiDocs.webhooks.events.appointment.created
  • appointment.updated — apiDocs.webhooks.events.appointment.updated

Cada mensagem traz X-ISSA-Signature: t=UNIX,v1=HEX. A assinatura é um HMAC-SHA256 de "t.body" com o segredo do seu endpoint. Confira-a e rejeite mensagens com mais de cinco minutos.

import { createHmac, timingSafeEqual } from 'node:crypto';

function verify(secret, rawBody, header) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const expected = createHmac('sha256', secret).update(parts.t + '.' + rawBody).digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && timingSafeEqual(Buffer.from(parts.v1, 'hex'), Buffer.from(expected, 'hex'));
}

Responda 2xx em até 10 segundos. Caso contrário, o ISSA tenta 8 vezes em 24 horas com esperas crescentes.

Documentação da API do ISSA