### GET /v2/panel Source: https://helena.readme.io/reference/get_v2-panel Retrieves panel information including steps, tags, and cards. Requires Bearer authentication. ```APIDOC ## GET /v2/panel ### Description Retrieves panel information including steps, tags, and cards. ### Method GET ### Endpoint /v2/panel ### Authentication - **Bearer** (apiKey) - Required - Header: `Authorization` - Use permanent token generated for your account in the integrations section. Format: `Bearer [token]` (e.g., `Bearer pn_h4ggkn0PbulUOPlIwP8w5y0QAHPwt0Shmkp5B6fGmrQ`). ### Response #### Success Response (200) - **id** (string, uuid) - Panel ID - **createdAt** (string, date-time) - Creation timestamp - **updatedAt** (string, date-time) - Last update timestamp - **companyId** (string, uuid) - Company ID - **panelId** (string, uuid) - Panel ID - **archived** (boolean) - Whether the panel is archived - **position** (number, double) - Panel position - **title** (string, nullable) - Panel title - **isInitial** (boolean) - Whether this is the initial panel - **isFinal** (boolean) - Whether this is the final panel - **cardCount** (integer, nullable) - Number of cards - **overdueCardCount** (integer, nullable) - Number of overdue cards - **monetaryAmount** (number, double, nullable) - Monetary amount - **fields** (array of PublicPanelStepFieldDTO, nullable) - List of step fields - **cards** (PublicPanelCardDTOPublicPageListDTO) - Cards data #### Response Example ```json { "id": "string", "createdAt": "string", "updatedAt": "string", "companyId": "string", "panelId": "string", "archived": true, "position": 0, "title": "string", "isInitial": true, "isFinal": true, "cardCount": 0, "overdueCardCount": 0, "monetaryAmount": 0, "fields": [ { "key": "string", "type": "DEFAULT_FIELD", "position": 0, "visible": true } ], "cards": {} } ``` ``` -------------------------------- ### GET /v2/panel Source: https://helena.readme.io/reference/get_v2-panel Lista painéis com filtros opcionais por título, tipo, detalhes e datas de criação/atualização. Suporta paginação e ordenação. Requer autenticação via Bearer token. ```APIDOC ## [GET] /v2/panel ### Description Lista painéis com filtros opcionais por título, tipo, detalhes e datas de criação/atualização. Suporta paginação e ordenação. Requer autenticação via Bearer token. ### Method GET ### Endpoint /v2/panel ### Parameters #### Query Parameters - **Title** (string) - Optional - Filtro por título do painel. - **Type** (string) - Optional - Filtro por tipo do painel. Valores: MANAGEMENT, SALES. - **IncludeDetails** (array of string) - Optional - Detalhes que devem ser incluídos na resposta. Valores: Tags, Steps, StepsCardCount, PanelCardOverdueCount. - **CreatedAt.Before** (string, date-time) - Optional - Limite superior de busca, sempre em fuso horário UTM. - **CreatedAt.After** (string, date-time) - Optional - Limite inferior de busca, sempre em fuso horário UTM. - **UpdatedAt.Before** (string, date-time) - Optional - Limite superior de busca, sempre em fuso horário UTM. - **UpdatedAt.After** (string, date-time) - Optional - Limite inferior de busca, sempre em fuso horário UTM. - **PageNumber** (integer, int32) - Optional - Número da página a ser obtida. Mínimo: 0, Máximo: 2147483647, Padrão: 1. - **PageSize** (integer, int32) - Optional - Tamanho da página a ser obtida. Mínimo: 1, Máximo: 100, Padrão: 15. - **OrderBy** (string) - Optional - Nome do campo para ser utilizado como pivô da ordenação. - **OrderDirection** (string) - Optional - Determina se a ordenação deve ser crescente ou decrescente. Valores: ASCENDING, DESCENDING. ### Response #### Success Response (200) - **PublicPanelDTOPublicPageListDTO** - Lista paginada de painéis. #### Response Example { "items": [], "pageNumber": 1, "pageSize": 15, "totalItems": 0, "totalPages": 0 } #### Error Response (500) - **InternalException** - Erro interno do servidor. #### Error Response Example { "error": true, "date": "2023-01-01T00:00:00Z", "key": "string", "text": "string" } ### Security - **Bearer** - Autenticação via token Bearer. ``` -------------------------------- ### GET /core/v2/file Source: https://helena.readme.io/llms.txt Envie os metadados do arquivo e você receberá uma URL e deverá fazer upload para ela usando o método PUT. Após enviar o conteúdo do arquivo, faça uma chamada para o endpoint POST /core/v2/file. ```APIDOC ## [GET] /core/v2/file ### Description Envie os metadados do arquivo e você receberá uma URL e deverá fazer upload para ela usando o método PUT. Após enviar o conteúdo do arquivo, faça uma chamada para o endpoint POST /core/v2/file. ### Method GET ### Endpoint /core/v2/file ``` -------------------------------- ### GET /v1/contact/{id} Source: https://helena.readme.io/reference/get_v1-contact-id Retrieves a contact by its unique identifier. Requires Bearer authentication. ```APIDOC ## GET /v1/contact/{id} ### Description Retrieves a contact by its unique identifier. ### Method GET ### Endpoint /v1/contact/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the contact. ### Authentication Requires a Bearer token in the Authorization header. ### Response #### Success Response (200) Returns the contact details. #### Response Example ```json { "id": "string", "name": "string", "email": "string" } ``` ``` -------------------------------- ### POST /core/v2/file Source: https://helena.readme.io/llms.txt Após o upload do arquivo na URL fornecida na rota GET /core/v2/file, execute este método para obter o ID do arquivo. O ID do arquivo pode ser fornecido no envio de mensagens. ```APIDOC ## [POST] /core/v2/file ### Description Após o upload do arquivo na URL fornecida na rota GET /core/v2/file, execute este método para obter o ID do arquivo. O ID do arquivo pode ser fornecido no envio de mensagens. ### Method POST ### Endpoint /core/v2/file ``` -------------------------------- ### POST /v1/send/video Source: https://helena.readme.io/reference/post_v1-send-video Envia uma mensagem de vídeo para um contato. O campo FileIdOrUrl é obrigatório; informe uma URL pública ou o ID de um arquivo previamente cadastrado. O arquivo deve seguir as regras do canal de atendimento (formato e tamanho). O campo CallbackUrl permite receber webhook quando a mensagem for entregue ou falhar. Este endpoint tem rate limit individual e permite 1000 requisições a cada 2 minutos. ```APIDOC ## POST /v1/send/video ### Description Envia uma mensagem de vídeo para um contato. O campo FileIdOrUrl é obrigatório; informe uma URL pública ou o ID de um arquivo previamente cadastrado. O arquivo deve seguir as regras do canal de atendimento (formato e tamanho). O campo CallbackUrl permite receber webhook quando a mensagem for entregue ou falhar. Este endpoint tem rate limit individual e permite 1000 requisições a cada 2 minutos. ### Method POST ### Endpoint /v1/send/video ### Parameters #### Request Body - **FileIdOrUrl** (string) - Required - URL pública ou ID de um arquivo previamente cadastrado. - **CallbackUrl** (string) - Optional - URL para receber webhook quando a mensagem for entregue ou falhar. ### Request Example { "fileIdOrUrl": "https://example.com/video.mp4", "callbackUrl": "https://example.com/webhook" } ### Response #### Success Response (200) - **messageId** (string) - Identificador da mensagem enviada. #### Response Example { "messageId": "12345" } ### Error Responses - **400** (Bad Request) - Requisição inválida. - **401** (Unauthorized) - Autenticação necessária. - **429** (Too Many Requests) - Limite de requisições excedido. - **500** (Server Error) - Erro interno do servidor. ``` -------------------------------- ### GET /v2/session Source: https://helena.readme.io/reference/get_v2-session Retrieves a paginated list of sessions with optional filters for metadata, type, and creation/update timestamps. Supports pagination and sorting. ```APIDOC ## [GET] /v2/session ### Description Retrieves a paginated list of sessions with optional filters for metadata, type, and creation/update timestamps. Supports pagination and sorting. ### Method GET ### Endpoint /v2/session ### Parameters #### Query Parameters - **Metadata** (object) - Optional - Filtro por metadados. - **Type** (string) - Optional - Filtro por tipo da conversa. Enum: INDIVIDUAL, GROUP. - **CreatedAt.Before** (string, date-time) - Optional - Limite superior de busca, sempre em fuso horário UTM. - **CreatedAt.After** (string, date-time) - Optional - Limite inferior de busca, sempre em fuso horário UTM. - **UpdatedAt.Before** (string, date-time) - Optional - Limite superior de busca, sempre em fuso horário UTM. - **UpdatedAt.After** (string, date-time) - Optional - Limite inferior de busca, sempre em fuso horário UTM. - **PageNumber** (integer, int32) - Optional - Número da página a ser obtida. Default: 1. Minimum: 0, Maximum: 2147483647. - **PageSize** (integer, int32) - Optional - Tamanho da página a ser obtida. Default: 15. Minimum: 1, Maximum: 100. - **OrderBy** (string) - Optional - Nome do campo para ser utilizado como pivô da ordenação. - **OrderDirection** (string) - Optional - Determina se a ordenação deve ser crescente ou decrescente. Enum: ASCENDING, DESCENDING. ### Response #### Success Response (200) - Returns a paginated list of sessions (PublicSessionDTOV2PublicPageListDTO). #### Error Response (500) - Returns an InternalException object. ### Security Requires Bearer authentication. ``` -------------------------------- ### URL do componente de conversas com preview e interação Source: https://helena.readme.io/reference/login-integrado Combina as variações /preview e ?interactive=true para exibir apenas a conversa com interação pré-habilitada na rota /chat2/sessions/XXXXXX. ```text /chat2/sessions/XXXXXX/preview?interactive=true ``` -------------------------------- ### GET /v2/session Source: https://helena.readme.io/reference/get_v2-session Retrieves session information for the current user. This endpoint returns details about the authenticated session, including user and agent data. ```APIDOC ## [GET] /v2/session ### Description Retrieves session information for the current user. This endpoint returns details about the authenticated session, including user and agent data. ### Method GET ### Endpoint /v2/session ### Parameters No parameters are documented for this endpoint. ### Response #### Success Response (200) - **id** (string, uuid) - Session identifier. - **userId** (string, uuid) - Identifier of the user associated with the session. - **agent** (object) - Public agent data associated with the session. - **id** (string, uuid) - Agent identifier. - **userId** (string, uuid) - User identifier of the agent owner. - **name** (string, nullable) - Agent name. - **shortName** (string, nullable) - Short name of the agent. - **phoneNumber** (string, nullable) - Agent phone number. - **email** (string, nullable) - Agent email. - **pictureFileId** (string, uuid, nullable) - File identifier for the agent picture. - **pictureUrl** (string, nullable) - URL of the agent picture. - **channelIdentity** (object) - Public channel identity information. - **humanId** (string, nullable) - Human-readable identifier. - **platform** (string, nullable) - Platform name. - **provider** (string, nullable) - Provider name. - **providerVariable** (string, nullable) - Provider variable. - **pictureUrl** (string, nullable) - Channel picture URL. - **displayName** (string, nullable) - Display name. - **contact** (object) - Public contact data. - **id** (string, uuid, nullable) - Contact identifier. - **name** (string, nullable) - Contact name. - **pictureUrl** (string, nullable) - Contact picture URL. - **phonenumber** (string, nullable) - Contact phone number. - **instagram** (string, nullable) - Instagram handle. - **phonenumberFormatted** (string, nullable) - Formatted phone number. - **tagsId** (array of string, uuid, nullable) - Tag identifiers. - **tagsName** (array of string, nullable) - Tag names. #### Response Example { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "agent": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "shortName": "string", "phoneNumber": "string", "email": "string", "pictureFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "pictureUrl": "string" }, "channelIdentity": { "humanId": "string", "platform": "string", "provider": "string", "providerVariable": "string", "pictureUrl": "string", "displayName": "string" }, "contact": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "pictureUrl": "string", "phonenumber": "string", "instagram": "string", "phonenumberFormatted": "string", "tagsId": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6" ], "tagsName": [ "string" ] } } ``` -------------------------------- ### GET /v2/panel/card Source: https://helena.readme.io/reference/get_v2-panel-card Retrieves panel card information. This endpoint requires Bearer authentication using a permanent token generated in the integrations section. ```APIDOC ## [GET] /v2/panel/card ### Description Retrieves panel card information. This endpoint requires Bearer authentication using a permanent token generated in the integrations section. ### Method GET ### Endpoint /v2/panel/card ### Authentication - **Authorization** (header) - Required - Bearer token. Example: 'Bearer pn_h4ggkn0PbulUOPlIwP8w5y0QAHPwt0Shmkp5B6fGmrQ'. ### Response #### Success Response (200) - **items** (array of PublicPanelCardDTO) - List of panel cards. - **totalItems** (integer) - Total number of items. - **totalPages** (integer) - Total number of pages. - **hasMorePages** (boolean) - Indicates if there are more pages. #### PublicPanelCardDTO - **id** (string, uuid) - Card identifier. - **responsibleUser** (PublicPanelCardResponsibleUserDTO) - Responsible user information. #### PublicPanelCardResponsibleUserDTO - **id** (string, uuid) - User identifier. - **name** (string) - User name. #### Response Example { "items": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "responsibleUser": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string" } } ], "totalItems": 0, "totalPages": 0, "hasMorePages": true } ``` -------------------------------- ### JSON body para concluir atendimento (PUT /v1/session/{id}/complete) Source: https://helena.readme.io/reference/1-ler-textos-1 Cole este JSON no corpo da requisição ao configurar a função de concluir atendimento. O campo reactivateOnNewMessage define se o atendimento deve ser reativado quando o contato enviar nova mensagem. Marque a opção 'Send Body' antes de colar. ```json { "reactivateOnNewMessage": true } ``` -------------------------------- ### GET /v2/department Source: https://helena.readme.io/reference/get_v2-department Retrieves department information using the V2 API. This endpoint returns department details including agents, channels, and distribution configuration. ```APIDOC ## GET /v2/department ### Description Retrieves department information using the V2 API. This endpoint returns department details including agents, channels, and distribution configuration. ### Method GET ### Endpoint /v2/department ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example No request body required. ### Response #### Success Response (200) - **id** (string, uuid) - Department ID - **companyId** (string, uuid) - Company ID - **createdAt** (string, date-time) - Creation timestamp - **updatedAt** (string, date-time) - Last update timestamp - **name** (string, nullable) - Department name - **isDefault** (boolean) - Whether this is the default department - **distribuitionEnabled** (boolean) - Whether distribution is enabled - **restrictionType** (enum: NONE, DEPARTMENT_RESTRICTION, USER_RESTRICTION) - Restriction type - **distributionConfig** (object) - Distribution configuration details - **agents** (array of PublicDepartmentAgentDTO, nullable) - List of agents in the department - **channels** (array of DepartmentChannelDTO, nullable) - List of channels associated with the department - **directLinks** (object, nullable) - Direct links #### Response Example ```json { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "createdAt": "2023-01-01T00:00:00Z", "updatedAt": "2023-01-01T00:00:00Z", "name": "Support", "isDefault": false, "distribuitionEnabled": true, "restrictionType": "NONE", "distributionConfig": {}, "agents": [ { "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "departmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "isAgent": true, "isSupervisor": false } ], "channels": [], "directLinks": {} } ``` ### Authentication Requires Bearer token in the Authorization header. Format: 'Bearer [token]'. ``` -------------------------------- ### POST /v1/send/template/batch Source: https://helena.readme.io/reference/post_v1-send-template-batch Envia um modelo de mensagem para múltiplos destinatários em uma única requisição. O campo TemplateId é compartilhado por todos os destinatários, e cada item da lista pode ter parâmetros e arquivo próprios. É possível enviar até 100 mensagens por requisição, com rate limit de 1000 requisições a cada 2 minutos. ```APIDOC ## [POST] /v1/send/template/batch ### Description Envia um modelo de mensagem para múltiplos destinatários em uma única requisição. O campo TemplateId é compartilhado por todos os destinatários, e cada item da lista pode ter parâmetros e arquivo próprios. É possível enviar até 100 mensagens por requisição, com rate limit de 1000 requisições a cada 2 minutos. ### Method POST ### Endpoint /v1/send/template/batch ### Parameters #### Request Body - **PublicReqSendTemplateBatchDTO** (object) - Required - Dados para envio em lote, incluindo canal de origem, template e lista de destinatários. ### Request Example ```json { "templateId": "string", "to": [ { "to": "string", "parameters": {}, "fileIdOrUrl": "string", "callbackUrl": "string" } ], "user": "string", "department": "string", "enableBot": true } ``` ### Response #### Success Response (200) - **PublicRespSendMessagesDTO** (object) - Resposta com os resultados do envio. #### Response Example ```json { "messages": [ { "id": "string", "status": "string" } ] } ``` #### Error Responses - **400** (Bad Request) - **ProblemDetails** - Erro de validação ou requisição inválida. - **401** (Unauthorized) - **ProblemDetails** - Falha de autenticação. - **429** (Too Many Requests) - **ProblemDetails** - Excedeu o rate limit. - **500** (Server Error) - **InternalException** - Erro interno do servidor. ### Security - **Bearer** - Autenticação via token Bearer. ``` -------------------------------- ### JSON body para transferência de equipe (PUT /v1/session/{id}/transfer) Source: https://helena.readme.io/reference/1-ler-textos-1 Cole este JSON no corpo da requisição ao configurar a função de transferência de equipe. Use o placeholder {departmentId} para que o modelo preencha com o ID do departamento. Marque a opção 'Send Body' antes de colar. ```json { "type": "DEPARTMENT", "newDepartmentId": "{departmentId}" } ``` -------------------------------- ### GET /v1/session/note/{id} Source: https://helena.readme.io/reference/get_v1-session-note-id Retrieves an internal note by its ID. This endpoint requires Bearer authentication and returns the note details in JSON format. ```APIDOC ## GET /v1/session/note/{id} ### Description Retrieves an internal note by its ID. ### Method GET ### Endpoint `/v1/session/note/{id}` ### Parameters #### Path Parameters - **id** (string, uuid) - Required - The unique identifier of the note. ### Authentication - **Bearer** - Required - Bearer token authentication. ### Response #### Success Response (200) Returns the note details as a `PublicMessageDTO` object. #### Error Response (500) Returns an `InternalException` object with error details. ### Response Example ```json { "error": false, "date": "2023-01-01T00:00:00Z", "key": "string", "text": "string", "isUnsolvableError": false, "details": null, "id": { "value": "string", "shortValue": "string" }, "httpStatusCode": "OK", "version": "string", "environment": "string" } ``` ``` -------------------------------- ### GET /v2/file Source: https://helena.readme.io/reference/get_v2-file Obtém uma URL para upload de arquivo. Envie os metadados do arquivo e receba uma URL para fazer upload usando o método PUT. Após enviar o conteúdo, chame o endpoint POST /core/v2/file. ```APIDOC ## [GET] /v2/file ### Description Obtém uma URL para upload de arquivo. Envie os metadados do arquivo e receba uma URL para fazer upload usando o método PUT. Após enviar o conteúdo, chame o endpoint POST /core/v2/file. ### Method GET ### Endpoint https://api.helena.run/core/v2/file ### Parameters #### Query Parameters - **Type** (string) - Required - Tipo do arquivo. Se informado o tipo UNDEFINED o sistema tentará identificar o tipo do arquivo. Arquivos do tipo DOCUMENT não passam por transformação ou compressão, mas arquivos do tipo IMAGE e VIDEO são transformados para que sejam compatíveis com todas as plataformas. Valores: UNDEFINED, PDF, EXCEL, WORD, IMAGE, AUDIO, VIDEO, DOCUMENT. - **Name** (string) - Required - Nome do arquivo, com extensão (ex.: paisagem.jpg). - **MimeType** (string) - Optional - Mimetype do arquivo. Se não informado ele será definido pelo tipo ou extensão do arquivo. ### Response #### Success Response (200) - **PublicUrlUploadFileV2DTO** (object) - Dados da URL de upload. #### Response Example ```json { "url": "https://...", "fileId": "..." } ``` #### Error Response (500) - **InternalException** (object) - Erro interno do servidor. #### Response Example ```json { "error": true, "date": "2023-01-01T00:00:00Z", "key": "...", "text": "...", "isUnsolvableError": false, "details": null, "id": {}, "httpStatusCode": "InternalServerError" } ``` ### Security - **Bearer** - Autenticação via token Bearer. ``` -------------------------------- ### GET /v1/webhook/subscription/{subscriptionId} Source: https://helena.readme.io/reference/get_v1-webhook-subscription-subscriptionid Retrieves a webhook subscription by its unique identifier. This endpoint requires Bearer authentication and returns the subscription details in JSON format. ```APIDOC ## [GET] /v1/webhook/subscription/{subscriptionId} ### Description Busca assinatura de webhook através do ID. ### Method GET ### Endpoint /v1/webhook/subscription/{subscriptionId} ### Parameters #### Path Parameters - **subscriptionId** (string, uuid) - Required - ID da assinatura de webhook. ### Response #### Success Response (200) - Returns a `PublicWebhookSubscriptionDTO` object (schema reference). #### Error Response (500) - Returns an `InternalException` object. ### Security - Bearer authentication required. ``` -------------------------------- ### Concatenar mensagens de áudio transcritas com node Code Source: https://helena.readme.io/reference/2-processar-audios Código para o node "Code" que concatena as transcrições de áudio em uma única mensagem e recupera o sessionId do webhook. Inicializa text como string vazia, itera por todos os itens de entrada adicionando o texto de cada um com nova linha, e retorna objeto com text e sessionId. ```javascript var text = ""; var sessionId = $('Webhook').first().json.body.sessionId; for (const item of $input.all()) { text += item.json.text + " \n"; } return { "text": text, "sessionId": sessionId }; ``` -------------------------------- ### GET /v1/message/{id} Source: https://helena.readme.io/reference/get_v1-message-id Retrieves a message by its unique identifier. This endpoint requires Bearer authentication and returns the message details in JSON format. ```APIDOC ## [GET] /v1/message/{id} ### Description Retrieves a message by its unique identifier. ### Method GET ### Endpoint /v1/message/{id} ### Parameters #### Path Parameters - **id** (string, uuid) - Required - ID da mensagem. ### Response #### Success Response (200) Returns the message details (PublicMessageDTO). #### Error Response (500) Returns an InternalException object. ### Security Requires Bearer authentication. ``` -------------------------------- ### GET /v1/contact/{id} Source: https://helena.readme.io/reference/get_v1-contact-id Retrieves a contact by its unique identifier. The response includes detailed contact information such as name, phone, email, tags, and custom fields. ```APIDOC ## GET /v1/contact/{id} ### Description Retrieves a contact by its unique identifier. The response includes detailed contact information such as name, phone, email, tags, and custom fields. ### Method GET ### Endpoint /v1/contact/{id} ### Parameters #### Path Parameters - **id** (string, uuid) - Required - The unique identifier of the contact. ### Response #### Success Response (200) - **id** (string, uuid) - Contact ID - **createdAt** (string, date-time) - Creation timestamp - **updatedAt** (string, date-time) - Last update timestamp - **companyId** (string, uuid) - Company ID - **name** (string, nullable) - Contact name - **nameWhatsapp** (string, nullable) - WhatsApp name - **nameInstagram** (string, nullable) - Instagram name - **nameMessenger** (string, nullable) - Messenger name - **phoneNumber** (string, nullable) - Phone number - **phoneNumberFormatted** (string, nullable) - Formatted phone number - **email** (string, nullable) - Email address - **instagram** (string, nullable) - Instagram handle - **messengerId** (string, nullable) - Messenger ID - **annotation** (string, nullable) - Annotation - **tagIds** (array of string, uuid, nullable) - Tag IDs - **tagNames** (array of string, nullable) - Tag names - **status** (enum: ACTIVE, ARCHIVED, BLOCKED) - Contact status - **origin** (enum: CREATED_BY_USER, CREATED_FROM_HUB, IMPORTED) - Contact origin - **importedAt** (string, date-time, nullable) - Import timestamp - **utm** (object, PublicUtmDTO) - UTM parameters - **customFields** (object, nullable) - Custom fields - **portfolioIds** (array of string, uuid, nullable) - Portfolio IDs - **portfolioNames** (array of string, nullable) - Portfolio names - **metadata** (object, nullable) - Metadata #### Response Example ```json { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "createdAt": "2023-01-01T00:00:00Z", "updatedAt": "2023-01-01T00:00:00Z", "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "John Doe", "nameWhatsapp": null, "nameInstagram": null, "nameMessenger": null, "phoneNumber": "+5511999999999", "phoneNumberFormatted": "+55 11 99999-9999", "email": "john.doe@example.com", "instagram": null, "messengerId": null, "annotation": null, "tagIds": [], "tagNames": [], "status": "ACTIVE", "origin": "CREATED_BY_USER", "importedAt": null, "utm": { "sourceId": null, "source": null, "clid": null, "medium": null, "campaign": null, "content": null, "headline": null, "term": null, "referralUrl": null }, "customFields": {}, "portfolioIds": [], "portfolioNames": [], "metadata": {} } ``` ``` -------------------------------- ### Requisição POST para autenticar usuário Source: https://helena.readme.io/reference/login-integrado Corpo JSON da requisição POST para https://api.helena.run/auth/v1/login/authenticate. Identifica o usuário por phoneNumber ou email, define o tenantId e o redirectUrl opcionais. ```json { "phoneNumber": "5531999999999", "email": "email@seudominio.com", "tenantId": "3f47yed5-0539-4a57-81b2-35e89e4c7a68", "redirectUrl": "/chat2/sessions/df98b9fb-2280-45z5-bce1-3fe8aa7047e5/preview" } ``` -------------------------------- ### GET /v1/company/{id} Source: https://helena.readme.io/reference/get_v1-company-id Retrieves company information by its unique identifier. This endpoint returns details about the company, including its plan and included resources. ```APIDOC ## GET /v1/company/{id} ### Description Retrieves company information by its unique identifier. This endpoint returns details about the company, including its plan and included resources. ### Method GET ### Endpoint /v1/company/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the company. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the company. - **name** (string) - The name of the company. - **plan** (object) - Details about the company's plan. - **includedAgents** (integer) - Quantidade de agentes incluídos. - **includedAiAgents** (integer) - Quantidade de agentes de AI incluídos. - **includedPanels** (integer) - Quantidade de painéis incluídos. - **includedChatbots** (integer) - Quantidade de chatbots incluídos. - **includedChatbotAutomations** (integer) - Quantidade de automações de chatbot incluídas. - **includedWhatsAppChannels** (integer) - Quantidade de canais de WhatsApp incluídos. - **includedInstagramChannels** (integer) - Quantidade de canais do Instagram incluídos. - **includedMessengerChannels** (integer) - Quantidade de canais do Messenger incluídos. - **includedSequences** (integer) - Quantidade de sequências incluídas. - **includedWebchatChannels** (integer) - Quantidade de canais de webchat incluídos. #### Response Example ```json { "id": "string", "name": "string", "plan": { "includedAgents": 0, "includedAiAgents": 0, "includedPanels": 0, "includedChatbots": 0, "includedChatbotAutomations": 0, "includedWhatsAppChannels": 0, "includedInstagramChannels": 0, "includedMessengerChannels": 0, "includedSequences": 0, "includedWebchatChannels": 0 } } ``` ### Authentication Requires a Bearer token in the Authorization header. Use the permanent token generated for your account in the integrations section. Format: 'Bearer [token]' (e.g., 'Bearer pn_h4ggkn0PbulUOPlIwP8w5y0QAHPwt0Shmkp5B6fGmrQ'). ``` -------------------------------- ### GET /v1/agent Source: https://helena.readme.io/reference/get_v1-agent Retrieves agent information. This endpoint requires Bearer token authentication and returns agent details including profile, availability, and department associations. ```APIDOC ## GET /v1/agent ### Description Retrieves agent information. This endpoint requires Bearer token authentication and returns agent details including profile, availability, and department associations. ### Method GET ### Endpoint /v1/agent ### Authentication - **Bearer** (apiKey) - Required - Header: `Authorization` - Use permanent token generated for your account in the integrations section. Format: `Bearer [token]` (e.g., `Bearer pn_h4ggkn0PbulUOPlIwP8w5y0QAHPwt0Shmkp5B6fGmrQ`). ### Response #### Success Response (200) - **id** (string, uuid) - Agent identifier - **createdAt** (string, date-time) - Creation timestamp - **updatedAt** (string, date-time) - Last update timestamp - **companyId** (string, uuid) - Company identifier - **userId** (string, uuid) - User identifier - **name** (string, nullable) - Agent name - **shortName** (string, nullable) - Short name - **email** (string, nullable) - Email address - **phoneNumber** (string, nullable) - Phone number - **phoneNumberFormatted** (string, nullable) - Formatted phone number - **profile** (string, nullable) - Profile information - **isOwner** (boolean) - Whether the agent is an owner - **departments** (array of PublicAgentDepartmentDTO, nullable) - Department associations - **availability** (enum: AVAILABLE, UNAVAILABLE) - Availability status #### Response Example ```json { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "createdAt": "2023-01-01T00:00:00Z", "updatedAt": "2023-01-01T00:00:00Z", "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "John Doe", "shortName": "John", "email": "john@example.com", "phoneNumber": "+1234567890", "phoneNumberFormatted": "+1 (234) 567-890", "profile": "Profile text", "isOwner": false, "departments": [ { "agentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "departmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "isAgent": true, "isSupervisor": false } ], "availability": "AVAILABLE" } ``` ``` -------------------------------- ### POST /v1/sequence/{id}/contact/batch Source: https://helena.readme.io/reference/post_v1-sequence-id-contact-batch Adiciona contatos em uma sequência aplicando um filtro. Requer autenticação via Bearer token. ```APIDOC ## POST /v1/sequence/{id}/contact/batch ### Description Adiciona contatos em uma sequência aplicando um filtro. ### Method POST ### Endpoint `/v1/sequence/{id}/contact/batch` ### Parameters #### Path Parameters - **id** (string, uuid) - Obrigatório - ID da sequência. #### Request Body - **Parâmetros para adicionar os contatos** (PublicRequestSequenceBatchContactDTO) - Obrigatório - Corpo da requisição contendo os parâmetros para adicionar contatos. ### Request Example ```json { "filter": {} } ``` ### Response #### Success Response (200) - **PublicSequenceContactDTOPublicPageListDTO** - Lista paginada de contatos da sequência. #### Response Example ```json { "items": [], "page": 0, "total": 0 } ``` #### Error Response (500) - **InternalException** - Erro interno do servidor. #### Error Response Example ```json { "error": true, "date": "2023-01-01T00:00:00Z", "key": "string", "text": "string", "isUnsolvableError": false, "details": null, "id": {}, "httpStatusCode": "InternalServerError" } ``` ### Authentication - **Bearer** - Requer token de autenticação Bearer. ``` -------------------------------- ### GET /v2/panel/card Source: https://helena.readme.io/reference/get_v2-panel-card Retrieves a paginated list of public panel cards. Supports sorting by a specified field with ascending or descending order. Requires Bearer authentication. ```APIDOC ## GET /v2/panel/card ### Description Retrieves a paginated list of public panel cards. Supports sorting by a specified field with ascending or descending order. Requires Bearer authentication. ### Method GET ### Endpoint /v2/panel/card ### Parameters #### Query Parameters - **sortField** (string) - Optional - Field to sort by. - **sortOrder** (string) - Optional - Sort order, either ASCENDING or DESCENDING. ### Response #### Success Response (200) - Returns a paginated list of public panel cards (PublicPanelCardDTOV2PublicPageListDTO). #### Response Example (No explicit example provided in source) #### Error Response (500) - Returns an InternalException object with error details. ### Security - Bearer authentication required. ``` -------------------------------- ### Resposta da autenticação com urlRedirect Source: https://helena.readme.io/reference/login-integrado Resposta JSON da requisição de autenticação. Use o campo urlRedirect para redirecionar o usuário, que iniciará a sessão já autenticado. ```json { "userId": "48525e80-43a7-4e06-86e0-f6b67b7d6629", "tenantId": "d4ed253d-f0c6-435c-8f7f-59a0598885fe", "urlRedirect": "https://web.helena.run/auth/external-login?code=3aXTxVyWtU5p6x7PpGmtlL62XRjbmKUFIWxADykpaWQ&userId=58525e80-43z7-4e06-86e0-f6b67b7d6629&tenantId=d4ed253d-y0c6-435c-8f7f-59a0598885fe", "expiresIn": "2026-01-01T00:00:00Z" } ``` -------------------------------- ### GET /v1/message/{id} Source: https://helena.readme.io/reference/get_v1-message-id Retrieves a message by its unique identifier. This endpoint returns the message details including content, metadata, and associated tracking information. ```APIDOC ## GET /v1/message/{id} ### Description Retrieves a message by its unique identifier. This endpoint returns the message details including content, metadata, and associated tracking information. ### Method GET ### Endpoint /v1/message/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the message to retrieve. ### Response #### Success Response (200) - **id** (string) - The message identifier. - **content** (string) - The message content. - **metadata** (object) - Additional metadata associated with the message. #### Response Example { "id": "string", "content": "string", "metadata": {} } ```