Skip to main content

Search Instance

POST 

/api/v2/business/:businessId/instance/search

Retrieve all instances connected to WhatsApp in a paginated way, using search filters.

With this feature, companies can segment and visualize data according to specific criteria, simplifying analysis and streamlining the management of customer interactions in each instance.

Request

Path Parameters

    businessId stringrequired

    Business ID.

Query Parameters

    page Page

    Default value: 1

    (Optional) Page number in pagination.

Body

Properties:

  1. instanceId: (optional) Filter instances by instance id.

  2. name: (optional) Filter instances by instance name.

  3. state: (optional) Filter instances by state (active or inactive).

  4. connection: (optional) Filter instances by connection state (open, closed, or refused).

    search object
    instanceId Instance ID
    name Name
    state State

    Default value: active | inactive

    connection Connection

    Default value: open | close | refused

Responses

Returns a paginated list with detailed information about instances that match the specified search filters.

  • Instances per page: 50
Schema
    businessId stringrequired
    name stringrequired
    businessToken stringrequired
    attributes objectrequired
    createdAt date-timerequired
    updatedAt date-timerequired
    deletedAt date-timerequired
    BusinessWebhook object
    webhookId stringrequired
    url stringrequired
    enabled booleanrequired
    createdAt date-timerequired
    updatedAt date-timerequired
    BusinessPage object
    totalRecords numberrequired
    totalPages numberrequired
    currentPage numberrequired
    records object[]required
  • Array [
  • instanceId stringrequired
    name stringrequired
    state stringrequired
    connection stringrequired
    createdAt date-timerequired
    deletedAt date-timerequired
    Auth objectrequired
    authId stringrequired
    jwt stringrequired
    createdAt date-timerequired
    updatedAt date-timerequired
    WhatsApp objectrequired
    whatsappId stringrequired
    remoteJid stringrequired
    pictureUrl stringrequired
    pushName stringrequired
    createdAt stringrequired
    Webhook object[]required
  • Array [
  • name Namerequired

    Identification name of your webhook

    url Urlrequired

    Instance unique url.

    enabled Enabled

    Default value: false

    Enable or disable the url.

    webhookId stringrequired
    createdAt date-timerequired
    updatedAt date-timerequired
    instanceInstanceId stringrequired
    WebhookEvents objectrequired
    qrcodeUpdate QrCode Update

    Default value: true

    Enables sending the qr code.

    stateInstance State Instance

    Default value: true

    Enables sending instance State.

    messagesSet Messages Set

    Default value: true

    Enables batch sending of old messages.

    messagesUpsert Messages Upsert

    Default value: true

    Enables sending of all new incoming messages.

    messagesUpdate Messages Update

    Default value: true

    Enables sending all updates to the incoming or outgoing message.

    sendMessage Send Message

    Default value: true

    Enables the sending of all messages sent by the API.

    contactsSet Contacts Set

    Default value: true

    Enables sending the initial batch of loaded contacts.

    contactsUpsert Contacts Upsert

    Default value: true

    Enables sending a new contact with additional information.

    contactsUpdate Contacts Update

    Default value: true

    Enable update notification for each contact in the conversation.

    presenceUpdate Presence Update

    Default value: true

    Enables notification of contact behavior in chat.

    chatsSet Chat Set

    Default value: true

    Enables sending all loaded chats.

    chatsUpdate Chat Set

    Default value: true

    Enable notification of each chat update in the conversation.

    chatsUpsert Chat Upsert

    Default value: true

    Enable notification of every new chat started.

    chatsDelete Chat Deletedeprecated

    Default value: true

    Enable notification when a chat is deleted.

    groupsUpsert Group Upsert

    Default value: true

    Enable notification when a group is created.

    groupUpdate Group Update

    Default value: true

    c

    groupParticipantsUpdate Group Participant Update

    Default value: true

    Enable notification when a member of a group is updated.

    connectionUpdate Connection Update

    Default value: true

    Enable notification when connection status changes.

    newJwt New Jwt

    Default value: true

    Enable notification when the json web token is updated.

    webhookEventsId stringrequired
    createdAt date-timerequired
    updatedAt date-timerequired
  • ]
  • ]
Loading...