API

Integrate NextBot into your systems.

REST API with full documentation for custom integrations.

Authentication

All API requests require an API key in the header. Get your key from Dashboard > Settings > API Keys.

Authorization: Bearer YOUR_API_KEY

Base URL

All endpoints start with this base URL.

https://api.nextbot.me/v1

Send Message

POST /messages/send — Sends a message on behalf of Neo.

// Request
POST /messages/send
Content-Type: application/json

{
  "channel": "whatsapp",
  "recipient": "+359888123456",
  "message": "Hello! How can I help you?"
}

// Response — 200 OK
{
  "id": "msg_123abc",
  "status": "sent",
  "timestamp": "2025-02-14T15:30:00Z"
}

Get Messages

GET /messages — Retrieves list of messages. Query params: channel, limit (max 100), offset.

// Request
GET /messages?channel=whatsapp&limit=10

// Response — 200 OK
{
  "messages": [
    {
      "id": "msg_123",
      "channel": "whatsapp",
      "sender": "+359888123456",
      "message": "Do you have rooms available?",
      "timestamp": "2025-02-14T15:30:00Z",
      "replied": true
    }
  ],
  "total": 1,
  "hasMore": false
}

Webhooks

POST /webhooks — Register webhook for real-time notifications.

// Register webhook
POST /webhooks
{
  "url": "https://yoursite.com/webhook",
  "events": ["message.received", "message.sent"]
}

// Webhook Payload
{
  "event": "message.received",
  "data": {
    "id": "msg_123",
    "channel": "whatsapp",
    "sender": "+359888123456",
    "message": "Hello",
    "timestamp": "2025-02-14T15:30:00Z"
  }
}

Rate Limits

100 requests/minute, 10,000 requests/day. Exceeding returns HTTP 429.

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1644854400

Errors

Error codes: invalid_api_key, rate_limit_exceeded, invalid_request, server_error.

{
  "error": {
    "code": "invalid_api_key",
    "message": "API key is invalid or expired"
  }
}

Need help with the API?

api@nextbot.me