Skip to content

API Reference

Complete reference for all YeboLink API endpoints. This page provides a comprehensive overview of available endpoints, grouped by functionality.

Base URL

Production: https://api.yebolink.com
Development: https://dev-api.yebolink.com

Authentication Methods

YeboLink supports two authentication methods:

  • API Keys: For sending messages and accessing message data programmatically

    • Header: X-API-Key: ybk_...
    • Use for: Message sending, message retrieval
  • JWT Tokens: For dashboard access and account management

    • Header: Authorization: Bearer <token>
    • Use for: Account management, API key creation, billing, webhooks

Endpoints Overview

Authentication

MethodEndpointDescriptionAuth Required
POST/api/v1/auth/signupCreate new workspace accountNone
POST/api/v1/auth/loginLogin to workspaceNone
POST/api/v1/auth/verify-emailVerify email addressNone
POST/api/v1/auth/forgot-passwordRequest password resetNone
POST/api/v1/auth/reset-passwordReset passwordNone

Messages

MethodEndpointDescriptionAuth Required
POST/api/v1/messages/sendSend a single messageAPI Key
POST/api/v1/messages/bulkSend bulk messagesAPI Key
GET/api/v1/messagesGet message historyAPI Key
GET/api/v1/messages/:idGet message by IDAPI Key

API Keys

MethodEndpointDescriptionAuth Required
POST/api/v1/api-keysCreate new API keyJWT
GET/api/v1/api-keysList all API keysJWT
DELETE/api/v1/api-keys/:idDeactivate API keyJWT

Contacts

MethodEndpointDescriptionAuth Required
POST/api/v1/contactsCreate new contactJWT
GET/api/v1/contactsList all contactsJWT
GET/api/v1/contacts/:idGet contact by IDJWT
PUT/api/v1/contacts/:idUpdate contactJWT
DELETE/api/v1/contacts/:idDelete contactJWT

Webhooks

MethodEndpointDescriptionAuth Required
POST/api/v1/webhooksCreate webhookJWT
GET/api/v1/webhooksList all webhooksJWT
GET/api/v1/webhooks/eventsGet supported eventsJWT
GET/api/v1/webhooks/:idGet webhook by IDJWT
PUT/api/v1/webhooks/:idUpdate webhookJWT
DELETE/api/v1/webhooks/:idDelete webhookJWT
GET/api/v1/webhooks/:id/deliveriesGet webhook deliveriesJWT

Billing

MethodEndpointDescriptionAuth Required
GET/api/v1/billing/packagesGet credit packagesNone
POST/api/v1/billing/checkoutCreate checkout sessionJWT
GET/api/v1/billing/transactionsGet transaction historyJWT
POST/api/v1/billing/webhookStripe webhook endpointStripe Signature

Request & Response Format

Standard Success Response

All successful API requests return a JSON response with this structure:

json
{
  "success": true,
  "data": {
    // Response data here
  }
}

Standard Error Response

All error responses follow this structure:

json
{
  "success": false,
  "error": "Error message description"
}

Pagination

Endpoints that return lists support pagination with these query parameters:

ParameterTypeDefaultMaxDescription
pageinteger1-Page number
limitinteger50100Items per page

Paginated responses include:

json
{
  "success": true,
  "data": {
    "items": [...],
    "pagination": {
      "total": 150,
      "page": 1,
      "pages": 3,
      "limit": 50
    }
  }
}

Rate Limits

Different endpoints have different rate limits:

Endpoint TypeRate Limit
API Key endpoints100 requests/minute
Bulk messaging10 requests/minute
Authentication endpoints5 attempts/15 minutes

Rate limit headers are included in all responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1698960000

When rate limited, you'll receive a 429 Too Many Requests response:

json
{
  "success": false,
  "error": "Rate limit exceeded. Try again in 30 seconds."
}

Status Codes

CodeStatusDescription
200OKRequest succeeded
201CreatedResource created successfully
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing authentication
402Payment RequiredInsufficient credits
403ForbiddenValid auth but insufficient permissions
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error occurred

Message Channels

YeboLink supports multiple messaging channels:

ChannelValueDescription
SMSsmsText messages via cellular networks
WhatsAppwhatsappMessages via WhatsApp Business API
EmailemailEmail messages
VoicevoiceVoice calls (coming soon)

Message Status

Messages can have the following statuses:

StatusDescription
queuedMessage queued for sending
sentMessage sent to provider
deliveredMessage delivered to recipient
failedMessage failed to send
readMessage read by recipient (WhatsApp only)

Credit Costs

Different channels have different credit costs:

ChannelCredits per Message/Unit
SMS1 credit per message (160 chars)
WhatsApp0.5 credits per message
Email0.1 credits per email
Voice2 credits per minute

TIP

Long SMS messages are automatically split into segments. Each segment costs 1 credit. For example, a 320-character SMS will cost 2 credits.

Health Check

Check API health status:

bash
GET /health

Response:

json
{
  "status": "ok",
  "timestamp": "2025-11-02T12:00:00Z",
  "services": {
    "database": "ok",
    "redis": "ok",
    "queue": "ok"
  }
}

Webhook Signature Verification

All webhook events include a signature header for verification:

X-YeboLink-Signature: sha256=...

See Webhook Verification for implementation details.

Need Help?

Built with VitePress