Skip to main content

Introduction

The WhataBot REST API lets you programmatically manage conversation sessions, flows, workspaces, sectors, and OAuth clients. All v1 endpoints are accessible through standard HTTP requests that return JSON responses.

Base URL

All v1 API requests are made to:
https://api.whatabot.app/api/v1

Response Format

All responses are returned as JSON. Successful responses use standard HTTP status codes (200, 201, 202, 204). Error responses follow this format:
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}

Pagination

List endpoints support pagination via query parameters:
ParameterTypeDefaultDescription
pageinteger0Page number (0-based)
sizeinteger20Items per page
sortstring-Sort in field,direction format (e.g., createdAt,desc)
Paginated responses include:
{
  "content": [...],
  "pageable": {
    "pageNumber": 0,
    "pageSize": 20,
    "sort": {
      "sorted": true,
      "unsorted": false,
      "empty": false
    },
    "offset": 0,
    "paged": true,
    "unpaged": false
  },
  "totalElements": 42,
  "totalPages": 3,
  "size": 20,
  "number": 0,
  "sort": {
    "sorted": true,
    "unsorted": false,
    "empty": false
  },
  "first": true,
  "last": false,
  "numberOfElements": 20,
  "empty": false
}

Authentication

All v1 endpoints use API Key authentication via the X-Api-Key header:
curl -X GET "https://api.whatabot.app/api/v1/flows" \
  -H "X-Api-Key: wh_your_api_key_here"
See the Authentication page for instructions on how to create your API key.

Quick Reference

Authentication

API keys and iframe authentication.

Webhooks

Receive session notifications via callback.

Sessions

Create and manage conversation sessions.

Flows

Create and list conversation flows.

Workspaces

Manage workspaces.

Sectors

Manage sectors for transfers.