YouBee

API documentation

All endpoints require a Sanctum personal access token via Authorization: Bearer {token}. Tokens are created in the admin Users UI.

Base URL: https://www.otp.youbee.ai/api
List responses return {"data": [...]} without pagination links/meta. Service usage debits the wallet with ledger type service.

Authentication

HEADER Authorization: Bearer {token}

Generate a token for a user from the admin panel, then send it on every API request.

Balance

GET /api/balance

Current wallet balance for the authenticated user.

{
  "balance": "32.50"
}
GET /api/balance/ledger

Ledger entries. Optional query: search, page, per_page, sort_by, sort_dir.

{
  "data": [
    {
      "id": 1,
      "type": "add",
      "amount": "20.00",
      "balance_after": "20.00",
      "created_at": "2026-09-04T06:00:00+00:00"
    }
  ]
}

Services & activity

GET /api/services

Active service assignments for the authenticated user.

GET /api/services/{userService}

One active assignment owned by the authenticated user.

GET /api/services/{userService}/records

Activity records for that assignment: OTP requests for otp, message sends for messages.

OTP

POST /api/otp/send

Send a verification code. Body: phone (required), user_service_id (optional).

{
  "phone": "15551234567",
  "user_service_id": 1
}
POST /api/otp/verify

Verify the latest pending/sent code for a phone. Body: phone, code.

{
  "phone": "15551234567",
  "code": "123456"
}

Messages

POST /api/messages

Send WhatsApp text. Body: body, recipients[], optional user_service_id.

{
  "body": "Hello from YouBee",
  "recipients": ["15551112222", "15553334444"],
  "user_service_id": 1
}

Token

DELETE /api/token

Revoke the current access token used for the request.

{
  "message": "Token revoked successfully."
}