Símbolo da AmivuSímbolo da AmivuDevelopers

Todas as rotas

Gerada da mesma especificação que a API valida.

Todas as rotas de https://api.amivu.com.br/v1. Esta página e o openapi.json saem do mesmo catálogo — se divergirem, o CI reprova antes de qualquer coisa subir.

Prefere disparar do seu cliente de API?

A coleção sai deste mesmo catálogo — todas as 66 rotas, agrupadas, com o cabeçalho de autorização pronto. A chave fica em branco: preencha amivu_api_key no seu cliente.

O arquivo é uma coleção Postman v2.1 — que o Insomnia, o Bruno e o Hoppscotch também importam. Se o seu cliente prefere especificação, aponte-o direto para o openapi.json.

Use uma chave de sandbox
Com uma chave amivu_live_…, toda mensagem disparada da coleção chega a um cliente de verdade. O sandbox aceita as mesmas rotas e não envia para ninguém.
Experimente sem sair daqui
Cada rota tem um botão Testar. A chave que você digitar fica só no seu navegador: a requisição sai daqui direto para a API, sem passar por nenhum servidor nosso, e o valor nunca é guardado.

Contatos

GET/contactsscope contacts:read

Returns the organization's contacts, newest first. Filter by `email`, `phone` or `external_id` to find a specific person without paging through the whole base.

Parâmetros de consulta

limitnumber
afterstring
emailstring
phonestring
external_idstring
querystring
tag_idstring
created_afterstring
created_beforestring

Resposta

200 — uma lista de Contact, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/contactsscope contacts:writeaccepted Idempotency-Key

Creates a contact. When `external_id` is provided and already exists, the existing contact is returned unchanged — which makes CRM synchronisation safe to re-run.

Corpo da requisição

namestring
first_namestring
last_namestring
emailstring
phonestring
external_idstring
avatar_urlstring
tagsstring[]
custom_fieldsobject
metadataobject

Resposta

201 — um objeto Contact.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/contacts/{contact_id}scope contacts:read

Returns a single contact, with its tags and custom fields.

Parâmetros de caminho

  • contact_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Contact.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts/cnt_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"
PATCH/contacts/{contact_id}scope contacts:write

Updates the given fields. Sending `tags` REPLACES the contact's tags (use `POST /contacts/{contact_id}/tags` to add without removing); sending `null` in a custom field clears it.

Parâmetros de caminho

  • contact_id — o identificador Amivu, com prefixo.

Corpo da requisição

namestring
first_namestring
last_namestring
emailstring
phonestring
external_idstring
avatar_urlstring
tagsstring[]
custom_fieldsobject
metadataobject

Resposta

200 — um objeto Contact.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts/cnt_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/contacts/{contact_id}scope contacts:write

Deletes the contact and, in cascade, the conversations and messages exchanged with that person. This cannot be undone.

Parâmetros de caminho

  • contact_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Deleted.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts/cnt_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/contacts/{contact_id}/tagsscope contacts:write

Adds the given tags to the contact and keeps the ones it already has. Tags the contact already carries are ignored, so the call is safe to repeat.

Parâmetros de caminho

  • contact_id — o identificador Amivu, com prefixo.

Corpo da requisição

tagsstring[]obrigatório

Resposta

201 — um objeto Contact.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts/cnt_01K7ZFA5X8Q2M4N6P8R0T2V4W6/tags \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/contacts/{contact_id}/tags/{tag_id}scope contacts:write

Removes one tag from the contact and keeps the others. Removing a tag the contact does not carry succeeds and changes nothing.

Parâmetros de caminho

  • contact_id — o identificador Amivu, com prefixo.
  • tag_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Contact.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/contacts/cnt_01K7ZFA5X8Q2M4N6P8R0T2V4W6/tags/tag_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Conversas

GET/conversationsscope conversations:read

Returns conversations, newest first, filterable by status, channel and assignee. WhatsApp groups are conversations too: `is_group` tells them apart, and the `is_group` filter returns only groups (`true`) or only people (`false`).

Parâmetros de consulta

limitnumber
afterstring
status"open" | "pending" | "closed"
channel_idstring
channel_type"whatsapp" | "instagram" | "messenger" | "email" | "webchat"
contact_idstring
assigned_tostring
team_idstring
tag_idstring
external_idstring
created_afterstring
created_beforestring
updated_afterstring
is_group"true" | "false"

Resposta

200 — uma lista de Conversation, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/conversationsscope conversations:writeaccepted Idempotency-Key

Opens a conversation with a contact. When `external_id` is provided and already exists, the existing conversation is returned — so a retry does not split the history in two.

Corpo da requisição

contact_idstringobrigatório
channel_idstring
external_idstring
metadataobject

Resposta

201 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/conversations/{conversation_id}scope conversations:read

Returns a single conversation.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"
PATCH/conversations/{conversation_id}scope conversations:write

Updates status, `external_id` or `metadata`.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Corpo da requisição

status"open" | "pending" | "closed"
external_idstring
metadataobject

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
POST/conversations/{conversation_id}/closescope conversations:write

Marks the conversation as resolved and stamps the time it happened.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/close \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/conversations/{conversation_id}/reopenscope conversations:write

Brings a closed conversation back to `open`.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/reopen \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/conversations/{conversation_id}/assignscope conversations:write

Assigns the conversation to an agent or a team. The agent must belong to this organization — assigning across organizations is refused.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Corpo da requisição

user_idstring
team_idstring

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/assign \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
POST/conversations/{conversation_id}/unassignscope conversations:write

Removes the current assignee.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/unassign \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/conversations/{conversation_id}/messagesscope messages:read

Returns the conversation's messages, newest first.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Parâmetros de consulta

limitnumber
afterstring
direction"inbound" | "outbound"
created_afterstring
created_beforestring

Resposta

200 — uma lista de Message, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/messages \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/conversations/{conversation_id}/notesscope notes:read

Returns the conversation's internal notes. Notes are never delivered to the contact — they are a different entity from messages, with no send path at all.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Resposta

200 — uma lista de Note, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/notes \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/conversations/{conversation_id}/notesscope notes:write

Adds an internal note. It stays inside Amivu.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Corpo da requisição

bodystringobrigatório

Resposta

201 — um objeto Note.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/notes \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
POST/conversations/{conversation_id}/tagsscope tags:write

Applies a tag to the conversation's CONTACT — the only tag link the domain has. The tag follows the person across every conversation, filter and broadcast.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.

Corpo da requisição

tag_idstringobrigatório

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/tags \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/conversations/{conversation_id}/tags/{tag_id}scope tags:write

Removes the tag from the conversation's contact.

Parâmetros de caminho

  • conversation_id — o identificador Amivu, com prefixo.
  • tag_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Conversation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/conversations/conv_01K7ZFA5X8Q2M4N6P8R0T2V4W6/tags/tag_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Mensagens

POST/messagesscope messages:writeaccepted Idempotency-Key

Sends a message through the conversation's channel. The channel is derived from the conversation — there is no per-channel endpoint. Capabilities are checked before anything is written: a channel that does not support the type refuses with `unsupported_message_type` and nothing is recorded. Text and media are sent: for `image`, `video`, `audio` and `document`, upload the file first with `POST /uploads` and pass its `attachment_id`. `template` is part of the schema but is not sent yet — it is refused with `unsupported_message_type` on every channel. To write to a WhatsApp group, pass the group's `conversation_id` or its `group_id` (from `GET /channels/{channel_id}/groups`). In a group, `mention_all: true` notifies every participant without writing any `@` in the text, and `mentions` notifies the given phone numbers; both are refused outside a group (`mentions_not_allowed`).

Corpo da requisição

conversation_idstring
group_idstring
type"text"obrigatório
textstring
mention_allboolean
mentionsstring[]
metadataobject
attachment_idstring
templateobject

Resposta

201 — um objeto Message.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/messages \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/messages/{message_id}scope messages:read

Returns a message and its delivery state. `status` may be `null` — that is information, not absence of it: the channel does not report receipts.

Parâmetros de caminho

  • message_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Message.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/messages/msg_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Canais

GET/channelsscope channels:read

Returns the connected channels and what each one can do. Read `capabilities` before sending — it is generated from the implementation, not from the provider's brochure.

Resposta

200 — uma lista de Channel, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/channels \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/channels/{channel_id}scope channels:read

Returns one channel, with its capability matrix.

Parâmetros de caminho

  • channel_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Channel.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/channels/chn_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/channels/{channel_id}/groupsscope conversations:read

Returns the WhatsApp groups this channel's number is in, newest first, with the group's `conversation_id` and how many people are in it. Only channels with `capabilities.groups` (WhatsApp connected by QR code) have groups; any other channel is refused with `channel_without_groups`. A group is listed once Amivu has seen it: from the history imported when the number was paired, or from its first message after that.

Parâmetros de caminho

  • channel_id — o identificador Amivu, com prefixo.

Parâmetros de consulta

limitnumber
afterstring

Resposta

200 — uma lista de Group, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/channels/chn_01K7ZFA5X8Q2M4N6P8R0T2V4W6/groups \
  -H "Authorization: Bearer $AMIVU_API_KEY"
PATCH/channels/{channel_id}scope channels:write

Renames the channel or turns Ami's automatic replies on or off in it. Automatic replies also need `auto_reply_enabled` in the Ami settings. Channels are shared by both environments, so this route requires a live key.

Parâmetros de caminho

  • channel_id — o identificador Amivu, com prefixo.

Corpo da requisição

namestring
ami_auto_replyboolean

Resposta

200 — um objeto Channel.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/channels/chn_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'

Atendentes

GET/usersscope users:read

Returns the organization's agents.

Parâmetros de consulta

limitnumber
afterstring

Resposta

200 — uma lista de User, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/users \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/users/{user_id}scope users:read

Returns one agent.

Parâmetros de caminho

  • user_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto User.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/users/usr_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Times

GET/teamsscope teams:read

Returns the organization's teams.

Resposta

200 — uma lista de Team, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/teams \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/teamsscope teams:write

Creates a team.

Corpo da requisição

namestringobrigatório

Resposta

201 — um objeto Team.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/teams \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/teams/{team_id}scope teams:read

Returns one team.

Parâmetros de caminho

  • team_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Team.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/teams/team_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/teams/{team_id}/usersscope teams:read

Returns the agents that belong to the team.

Parâmetros de caminho

  • team_id — o identificador Amivu, com prefixo.

Resposta

200 — uma lista de User, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/teams/team_01K7ZFA5X8Q2M4N6P8R0T2V4W6/users \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Etiquetas

GET/tagsscope tags:read

Returns the organization's tags.

Resposta

200 — uma lista de Tag, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/tags \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/tagsscope tags:write

Creates a tag.

Corpo da requisição

namestringobrigatório
colorstring

Resposta

201 — um objeto Tag.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/tags \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
PATCH/tags/{tag_id}scope tags:write

Renames the tag or changes its colour.

Parâmetros de caminho

  • tag_id — o identificador Amivu, com prefixo.

Corpo da requisição

namestring
colorstring

Resposta

200 — um objeto Tag.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/tags/tag_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/tags/{tag_id}scope tags:write

Deletes the tag; it disappears from every contact that had it.

Parâmetros de caminho

  • tag_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Deleted.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/tags/tag_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Campos personalizados

GET/custom-fieldsscope custom_fields:read

Returns the custom field catalogue. The `key` of each field is what appears in `contact.custom_fields`, and it never changes after creation.

Resposta

200 — uma lista de CustomField, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/custom-fields \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/custom-fieldsscope custom_fields:write

Creates a custom field definition.

Corpo da requisição

namestringobrigatório
keystring
scope"contact" | "organization"
valuestring

Resposta

201 — um objeto CustomField.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/custom-fields \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'

Webhooks

GET/webhooksscope webhooks:read

Returns the endpoints registered for THIS key's environment. Secrets come masked.

Resposta

200 — uma lista de WebhookEndpoint, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/webhooks \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/webhooksscope webhooks:write

Registers an endpoint. The signing secret comes in full in this response and never again — store it before you move on. The endpoint's environment is taken from the API key, not from the body.

Corpo da requisição

urlstringobrigatório
descriptionstring
events"message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "conversation.created" | "conversation.updated" | "conversation.assigned" | "conversation.closed" | "conversation.reopened" | "contact.created" | "contact.updated" | "tag.added" | "tag.removed" | "form.response.submitted"[]obrigatório
environment"live" | "test"
enabledboolean

Resposta

201 — um objeto WebhookEndpoint.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/webhooks \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/webhooks/{webhook_id}scope webhooks:read

Returns one endpoint, with the secret masked.

Parâmetros de caminho

  • webhook_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto WebhookEndpoint.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/webhooks/wh_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"
PATCH/webhooks/{webhook_id}scope webhooks:write

Updates the URL, description, subscribed events or enabled state. Re-enabling clears the failure counter.

Parâmetros de caminho

  • webhook_id — o identificador Amivu, com prefixo.

Corpo da requisição

urlstring
descriptionstring
events"message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "conversation.created" | "conversation.updated" | "conversation.assigned" | "conversation.closed" | "conversation.reopened" | "contact.created" | "contact.updated" | "tag.added" | "tag.removed" | "form.response.submitted"[]
enabledboolean

Resposta

200 — um objeto WebhookEndpoint.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/webhooks/wh_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/webhooks/{webhook_id}scope webhooks:write

Deletes the endpoint and its delivery history.

Parâmetros de caminho

  • webhook_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Deleted.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/webhooks/wh_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/webhooks/{webhook_id}/deliveriesscope webhooks:read

Returns one row per ATTEMPT, newest first. Attempts of the same event share `event_id` — which is also what you should deduplicate on when receiving.

Parâmetros de caminho

  • webhook_id — o identificador Amivu, com prefixo.

Resposta

200 — uma lista de WebhookDelivery, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/webhooks/wh_01K7ZFA5X8Q2M4N6P8R0T2V4W6/deliveries \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Automações

GET/automationsscope automations:read

Returns every automation, on and off, newest first, without the flow: read one automation to get its `definition`.

Resposta

200 — uma lista de AutomationSummary, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/automations \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/automationsscope automations:write

Creates an automation from a flow in the panel builder's format. Blocks that point to a tag, team, custom field, user or channel take its Amivu id. It is created OFF unless `enabled` is `true`. Automations run on real conversations in both environments, so this route requires a live key. The flow is refused (422) when a block or edge id repeats, a `config` text is longer than 4096 characters, a webhook is not a public https URL, or a loop does not go back through an option of an `ask-question` block.

Corpo da requisição

namestringobrigatório
enabledboolean
definitionobjectobrigatório

Resposta

201 — um objeto Automation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/automations \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/automations/{automation_id}scope automations:read

Returns one automation, with its flow.

Parâmetros de caminho

  • automation_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Automation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/automations/automation_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -H "Authorization: Bearer $AMIVU_API_KEY"
PATCH/automations/{automation_id}scope automations:write

Renames, turns on or off, or replaces the flow. `definition` REPLACES the whole flow. Requires a live key.

Parâmetros de caminho

  • automation_id — o identificador Amivu, com prefixo.

Corpo da requisição

namestring
enabledboolean
definitionobject

Resposta

200 — um objeto Automation.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/automations/automation_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/automations/{automation_id}scope automations:write

Deletes the automation; it stops running at once. Requires a live key. To pause it, send `enabled: false` instead.

Parâmetros de caminho

  • automation_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Deleted.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/automations/automation_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Ami

GET/ami/settingsscope ami:read

Returns how Ami, the AI agent, is set up: automatic replies, what she knows about the business, how she picks a role, learning and each feature.

Resposta

200 — um objeto AmiSettings.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/settings \
  -H "Authorization: Bearer $AMIVU_API_KEY"
PATCH/ami/settingsscope ami:write

Changes only the given fields. The settings are one per organization and reach real customers, so this route requires a live key. The language model is chosen in the panel.

Corpo da requisição

auto_reply_enabledboolean
contextstring
orchestration"auto" | "fixed"
default_role_idstring
learning_enabledboolean
featuresobject

Resposta

200 — um objeto AmiSettings.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/settings \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
GET/ami/rolesscope ami:read

Returns Ami's roles in the order she considers them.

Resposta

200 — uma lista de AmiRole, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/roles \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/ami/rolesscope ami:write

Creates a role: a way of serving customers with its own instructions.

Corpo da requisição

namestringobrigatório
when_to_usestring
instructionsstringobrigatório
enabledboolean

Resposta

201 — um objeto AmiRole.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/roles \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
PATCH/ami/roles/{role_id}scope ami:write

Changes the given fields of a role.

Parâmetros de caminho

  • role_id — o identificador Amivu, com prefixo.

Corpo da requisição

namestring
when_to_usestring
instructionsstring
enabledboolean

Resposta

200 — um objeto AmiRole.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/roles/role_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/ami/roles/{role_id}scope ami:write

Deletes a role.

Parâmetros de caminho

  • role_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Deleted.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/roles/role_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"
GET/ami/knowledgescope ami:read

Returns the questions and answers Ami uses, newest first. `status=pending` lists what she learned from conversations and awaits review.

Parâmetros de consulta

limitnumber
afterstring
status"pending" | "approved" | "rejected"

Resposta

200 — uma lista de AmiKnowledge, com pagination.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/knowledge \
  -H "Authorization: Bearer $AMIVU_API_KEY"
POST/ami/knowledgescope ami:write

Adds a question and its answer. The item is approved and used at once.

Corpo da requisição

questionstringobrigatório
answerstringobrigatório

Resposta

201 — um objeto AmiKnowledge.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/knowledge \
  -X POST \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
PATCH/ami/knowledge/{item_id}scope ami:write

Fixes the question or the answer, or reviews a learned item: `approved` puts it to use, `rejected` takes it out.

Parâmetros de caminho

  • item_id — o identificador Amivu, com prefixo.

Corpo da requisição

questionstring
answerstring
status"approved" | "rejected"

Resposta

200 — um objeto AmiKnowledge.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/knowledge/item_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X PATCH \
  -H "Authorization: Bearer $AMIVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ }'
DELETE/ami/knowledge/{item_id}scope ami:write

Deletes an item from Ami's knowledge.

Parâmetros de caminho

  • item_id — o identificador Amivu, com prefixo.

Resposta

200 — um objeto Deleted.

Exemplo

Terminal
curl https://api.amivu.com.br/v1/ami/knowledge/item_01K7ZFA5X8Q2M4N6P8R0T2V4W6 \
  -X DELETE \
  -H "Authorization: Bearer $AMIVU_API_KEY"

Precisa gerar um cliente? Baixe a especificação — ela é OpenAPI 3.1 e funciona com os geradores de sempre. Veja também Versões e depreciação.

Escrevemos sobre operação de atendimento, canais e IA no blog da Amivu.