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
POST/api/v1/messages/:id/cancelCancel a scheduled messageAPI Key

Both send endpoints accept an optional scheduled_at field to defer delivery — see Scheduling Messages — and an optional Idempotency-Key header to make retries safe — see Idempotency.

POST /api/v1/messages/send and /api/v1/messages/bulk both take a content object whose fields depend on channel. For channel: "email", this includes content.subject, content.html/content.text, and an optional content.reply_to — the email address recipient replies are routed to (defaults to your workspace's account email if omitted, since every email sends from the shared platform address). See Send Email Messages for the full field reference.

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

Inbox ​

Two-way messaging: inbound replies from customers, threaded into conversations you can read and reply to. See Two-Way Inbox for the full reference, including scopes and the read/unread semantics.

MethodEndpointDescriptionAuth Required
GET/api/v1/inbox/conversationsList conversationsAPI Key (read_messages) or JWT
GET/api/v1/inbox/conversations/:id/messagesGet a conversation's messagesAPI Key (read_messages) or JWT
POST/api/v1/inbox/conversations/:id/replyReply within a conversationAPI Key (send_messages) or JWT
POST/api/v1/inbox/conversations/:id/readMark a conversation readAPI Key (read_messages) or JWT
PATCH/api/v1/inbox/conversations/:idResolve or reopen a conversationAPI Key (send_messages) or JWT

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
POST/api/v1/webhooks/:id/testSend a test eventJWT
POST/api/v1/webhooks/:id/deliveries/:deliveryId/resendResend a webhook deliveryJWT

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
409ConflictResource is not in a valid state for this action (e.g. cancelling an already-sent message), or a request with the same Idempotency-Key is still in flight
422Unprocessable EntityAn Idempotency-Key was reused with a different request body
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
scheduledMessage is held until its scheduled_at time; credits reserved
queuedMessage queued for sending
sentMessage sent to provider
deliveredMessage delivered to recipient
failedMessage failed to send
readMessage read by recipient (WhatsApp only)
cancelledScheduled message cancelled before sending; credits refunded

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