Mensagens Agendadas

Listar

get

Listagem paginada de mensagens agendadas com filtros opcionais.

Autorizações
Parâmetros de consulta
ScheduledAt.Beforestring · date-timeOpcional

Limite superior de busca, sempre em fuso horário UTM.

ScheduledAt.Afterstring · date-timeOpcional

Limite inferior de busca, sempre em fuso horário UTM.

Statusstring · enumOpcional

Status da mensagem agendada para filtrar

Valores possíveis:
Typestring · enumOpcional

Tipo da mensagem agendada para filtrar

Valores possíveis:
FromstringOpcional

ID ou número de telefone do canal cadastrado na conta.

TostringOpcional

ID ou número de telefone do destinatário.

UserstringOpcional

ID ou nome do usuário

DepartmentstringOpcional

ID ou nome da equipe

CreatedAt.Beforestring · date-timeOpcional

Limite superior de busca, sempre em fuso horário UTM.

CreatedAt.Afterstring · date-timeOpcional

Limite inferior de busca, sempre em fuso horário UTM.

UpdatedAt.Beforestring · date-timeOpcional

Limite superior de busca, sempre em fuso horário UTM.

UpdatedAt.Afterstring · date-timeOpcional

Limite inferior de busca, sempre em fuso horário UTM.

PageNumberinteger · int32 · máx: 2147483647Opcional

Número da página a ser obtida.

Default: 1
PageSizeinteger · int32 · mín: 1 · máx: 100Opcional

Tamanho da página a ser obtida.

Default: 15
OrderBystringOpcional

Nome do campo para ser utilizado como pivô da ordenação.

OrderDirectionstring · enumOpcional

Determina se a ordenação deve ser crescente ou decrescente.

Valores possíveis:
Respostas
200

Success

application/json
get
/v1/scheduled-message
GET /chat/v1/scheduled-message HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*
{
  "pageNumber": 1,
  "pageSize": 15,
  "orderBy": "text",
  "orderDirection": "ASCENDING",
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2025-11-06T22:30:07.242Z",
      "updatedAt": "2025-11-06T22:30:07.242Z",
      "active": true,
      "companyId": "123e4567-e89b-12d3-a456-426614174000",
      "sessionId": "123e4567-e89b-12d3-a456-426614174000",
      "contactId": "123e4567-e89b-12d3-a456-426614174000",
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "departmentId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "SCHEDULED",
      "type": "TEMPLATE",
      "templateId": "123e4567-e89b-12d3-a456-426614174000",
      "botId": "123e4567-e89b-12d3-a456-426614174000",
      "scheduling": "2025-11-06T22:30:07.242Z",
      "hiddenSession": true,
      "failureReason": "text",
      "contact": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "phonenumberFormatted": "text",
        "instagram": "text",
        "pictureUrl": "text"
      },
      "user": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      },
      "channel": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "humanId": "text",
        "type": "GupShup_WhatsApp"
      },
      "department": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      },
      "chatbot": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "botId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      },
      "template": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "templateParams": {
          "parameters": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          },
          "file": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "companyId": "123e4567-e89b-12d3-a456-426614174000",
            "userId": "123e4567-e89b-12d3-a456-426614174000",
            "name": "text",
            "extension": "text",
            "mimeType": "text",
            "type": "UNDEFINED",
            "publicUrl": "text",
            "publicUrlDownload": "text",
            "size": 1,
            "isThumbnail": true,
            "thumbnail": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "publicUrl": "text"
            }
          }
        }
      }
    }
  ],
  "totalItems": 1,
  "totalPages": 1,
  "hasMorePages": true
}

Criar

post

Cria uma nova mensagem agendada com os dados fornecidos.

Autorizações
Corpo
fromstring | nuloOpcional

Número de telefone do canal cadastrado na conta.

tostring · mín: 1Obrigatório

Número de telefone do destinatário.

typestring · enumOpcional

Tipo da mensagem agendada

Valores possíveis:
templateIdstring | nuloOpcional

ID do modelo de mensagem para a mensagem a ser enviada.

botIdstring · uuid | nuloOpcional

ID do bot que será ativado após a resposta do contato.

schedulingstring · date-timeOpcional

Data e hora programada para envio da mensagem

hiddenSessionbooleanOpcional

Indica se a sessão deve ficar oculta (padrão: false)

Respostas
200

Success

application/json
post
/v1/scheduled-message
POST /chat/v1/scheduled-message HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 378

{
  "from": "text",
  "to": "text",
  "department": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "type": "TEMPLATE",
  "templateId": "text",
  "botId": "123e4567-e89b-12d3-a456-426614174000",
  "scheduling": "2025-11-06T22:30:07.242Z",
  "hiddenSession": true,
  "templateParams": {
    "parameters": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "fileUrl": "text",
    "fileId": "123e4567-e89b-12d3-a456-426614174000"
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-11-06T22:30:07.242Z",
  "updatedAt": "2025-11-06T22:30:07.242Z",
  "active": true,
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "contactId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "channelId": "123e4567-e89b-12d3-a456-426614174000",
  "departmentId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "SCHEDULED",
  "type": "TEMPLATE",
  "templateId": "123e4567-e89b-12d3-a456-426614174000",
  "botId": "123e4567-e89b-12d3-a456-426614174000",
  "scheduling": "2025-11-06T22:30:07.242Z",
  "hiddenSession": true,
  "failureReason": "text",
  "contact": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "phonenumberFormatted": "text",
    "instagram": "text",
    "pictureUrl": "text"
  },
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "channel": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "humanId": "text",
    "type": "GupShup_WhatsApp"
  },
  "department": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "chatbot": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "botId": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "template": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "templateParams": {
      "parameters": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "file": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "userId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "extension": "text",
        "mimeType": "text",
        "type": "UNDEFINED",
        "publicUrl": "text",
        "publicUrlDownload": "text",
        "size": 1,
        "isThumbnail": true,
        "thumbnail": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "publicUrl": "text"
        }
      }
    }
  }
}

Obter por ID

get

Retorna os detalhes de uma mensagem agendada específica.

Autorizações
Parâmetros de rota
idstring · uuidObrigatório

ID da mensagem agendada

Parâmetros de consulta
Respostas
200

Success

application/json
get
/v1/scheduled-message/{id}
GET /chat/v1/scheduled-message/{id} HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-11-06T22:30:07.242Z",
  "updatedAt": "2025-11-06T22:30:07.242Z",
  "active": true,
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "sessionId": "123e4567-e89b-12d3-a456-426614174000",
  "contactId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "channelId": "123e4567-e89b-12d3-a456-426614174000",
  "departmentId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "SCHEDULED",
  "type": "TEMPLATE",
  "templateId": "123e4567-e89b-12d3-a456-426614174000",
  "botId": "123e4567-e89b-12d3-a456-426614174000",
  "scheduling": "2025-11-06T22:30:07.242Z",
  "hiddenSession": true,
  "failureReason": "text",
  "contact": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "phonenumberFormatted": "text",
    "instagram": "text",
    "pictureUrl": "text"
  },
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "channel": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "humanId": "text",
    "type": "GupShup_WhatsApp"
  },
  "department": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "chatbot": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "botId": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "template": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "templateParams": {
      "parameters": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "file": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "userId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "extension": "text",
        "mimeType": "text",
        "type": "UNDEFINED",
        "publicUrl": "text",
        "publicUrlDownload": "text",
        "size": 1,
        "isThumbnail": true,
        "thumbnail": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "publicUrl": "text"
        }
      }
    }
  }
}

Atualizar

put

Atualiza uma mensagem agendada existente. Mensagens já enviadas não podem ser editadas.

Autorizações
Parâmetros de rota
idstring · uuidObrigatório

ID da mensagem agendada

Corpo
tostring | nuloOpcional

Número de telefone do destinatário.

fromstring | nuloOpcional

Número de telefone do canal cadastrado na conta.

typestring · enum | nuloOpcional

Tipo da mensagem agendada

Valores possíveis:
templateIdstring | nuloOpcional

ID do modelo de mensagem para a mensagem a ser enviada.

botIdstring · uuid | nuloOpcional

ID do bot que será ativado após a resposta do contato.

schedulingstring · date-time | nuloOpcional

Data e hora programada para envio da mensagem

hiddenSessionboolean | nuloOpcional

Indica se a sessão deve ficar oculta (padrão: false)

Respostas
200

Success

application/json
put
/v1/scheduled-message/{id}
PUT /chat/v1/scheduled-message/{id} HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 401

{
  "fields": [
    "Undefined"
  ],
  "to": "text",
  "from": "text",
  "department": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "type": "TEMPLATE",
  "templateId": "text",
  "botId": "123e4567-e89b-12d3-a456-426614174000",
  "scheduling": "2025-11-06T22:30:07.242Z",
  "hiddenSession": true,
  "templateParams": {
    "parameters": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "fileUrl": "text",
    "fileId": "123e4567-e89b-12d3-a456-426614174000"
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-11-06T22:30:07.242Z",
  "updatedAt": "2025-11-06T22:30:07.242Z",
  "active": true,
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "contactId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "channelId": "123e4567-e89b-12d3-a456-426614174000",
  "departmentId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "SCHEDULED",
  "type": "TEMPLATE",
  "templateId": "123e4567-e89b-12d3-a456-426614174000",
  "botId": "123e4567-e89b-12d3-a456-426614174000",
  "scheduling": "2025-11-06T22:30:07.242Z",
  "hiddenSession": true,
  "failureReason": "text",
  "contact": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "phonenumberFormatted": "text",
    "instagram": "text",
    "pictureUrl": "text"
  },
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "channel": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "humanId": "text",
    "type": "GupShup_WhatsApp"
  },
  "department": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "chatbot": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "botId": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text"
  },
  "template": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "templateParams": {
      "parameters": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "file": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "userId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "extension": "text",
        "mimeType": "text",
        "type": "UNDEFINED",
        "publicUrl": "text",
        "publicUrlDownload": "text",
        "size": 1,
        "isThumbnail": true,
        "thumbnail": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "publicUrl": "text"
        }
      }
    }
  }
}

Cancelar

post

Cancela uma mensagem agendada específica. Apenas mensagens com status agendado podem ser canceladas.

Autorizações
Parâmetros de rota
idstring · uuidObrigatório

ID da mensagem agendada

Respostas
200

Success

Sem conteúdo

post
/v1/scheduled-message/{id}/cancel
POST /chat/v1/scheduled-message/{id}/cancel HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*

Sem conteúdo

Cancelar em massa

post

Cancela em massa mensagens agendadas. Apenas mensagens com status agendado podem ser canceladas.

Autorizações
Corpostring · uuid[]
string · uuid[]Opcional
Respostas
200

Success

application/json
post
/v1/scheduled-message/batch-cancel
POST /chat/v1/scheduled-message/batch-cancel HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 40

[
  "123e4567-e89b-12d3-a456-426614174000"
]
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-11-06T22:30:07.242Z",
    "updatedAt": "2025-11-06T22:30:07.242Z",
    "active": true,
    "companyId": "123e4567-e89b-12d3-a456-426614174000",
    "sessionId": "123e4567-e89b-12d3-a456-426614174000",
    "contactId": "123e4567-e89b-12d3-a456-426614174000",
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "channelId": "123e4567-e89b-12d3-a456-426614174000",
    "departmentId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "SCHEDULED",
    "type": "TEMPLATE",
    "templateId": "123e4567-e89b-12d3-a456-426614174000",
    "botId": "123e4567-e89b-12d3-a456-426614174000",
    "scheduling": "2025-11-06T22:30:07.242Z",
    "hiddenSession": true,
    "failureReason": "text",
    "contact": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "phonenumberFormatted": "text",
      "instagram": "text",
      "pictureUrl": "text"
    },
    "user": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text"
    },
    "channel": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "humanId": "text",
      "type": "GupShup_WhatsApp"
    },
    "department": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text"
    },
    "chatbot": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "botId": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text"
    },
    "template": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "templateParams": {
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "file": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "companyId": "123e4567-e89b-12d3-a456-426614174000",
          "userId": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text",
          "extension": "text",
          "mimeType": "text",
          "type": "UNDEFINED",
          "publicUrl": "text",
          "publicUrlDownload": "text",
          "size": 1,
          "isThumbnail": true,
          "thumbnail": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "publicUrl": "text"
          }
        }
      }
    }
  }
]

Atualizado