Cayra Messaging API

The messaging API from Cayra — 2 operation(s) for messaging.

Operations 2

POST /api/v1/messaging/whatsapp/send Send WhatsApp message via Twilio #
POST /api/v1/messaging/whatsapp/status-callback Handle Twilio WhatsApp delivery status callbacks #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cayra-io:cayra-io-messaging-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cayra-io-messaging-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cayra License Server Messaging API
  description: '# Cayra Chat Agent - License Management Server


    Centralized license management for on-premise deployments.


    ## Features


    - 🔑 License key generation (installation, update, trial)

    - ⏰ Dynamic expiry management (extend/shorten licenses)

    - 🔄 Activation tracking and monitoring

    - 💓 Heartbeat mechanism (1-hour intervals)

    - 📊 Audit logging for compliance

    - 🔐 JWT tokens with RSA-4096 encryption


    ## API Categories


    ### Admin Endpoints (Requires API Key)

    Manage licenses, view activations, update expiry dates.


    ### Client Endpoints (Public)

    Activate licenses, send heartbeats, check status.


    ## Authentication


    Admin endpoints require API key in header:

    ```

    X-Admin-API-Key: your-admin-key-here

    ```


    ## Security


    - 🔒 RSA-4096 asymmetric encryption

    - 🔐 JWT tokens for offline validation

    - 📝 Complete audit trail

    - 🛡️ Rate limiting (Phase 6)'
  contact:
    name: Cayra AI Team
    email: support@cayra.ai
  license:
    name: Proprietary
  version: 1.0.0
tags:
- name: Messaging
paths:
  /api/v1/messaging/whatsapp/send:
    post:
      tags:
      - Messaging
      summary: Send WhatsApp message via Twilio
      description: Dispatch WhatsApp message using centralized Twilio credentials.
      operationId: send_whatsapp_message_api_v1_messaging_whatsapp_send_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppSendRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppSendResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/messaging/whatsapp/status-callback:
    post:
      tags:
      - Messaging
      summary: Handle Twilio WhatsApp delivery status callbacks
      description: Process asynchronous delivery events from Twilio.
      operationId: whatsapp_status_callback_api_v1_messaging_whatsapp_status_callback_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_whatsapp_status_callback_api_v1_messaging_whatsapp_status_callback_post'
        required: true
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WhatsAppSendRequest:
      properties:
        license_key:
          type: string
          maxLength: 256
          minLength: 10
          title: License Key
        phone_number:
          type: string
          maxLength: 32
          minLength: 8
          title: Phone Number
        message:
          anyOf:
          - type: string
            maxLength: 1600
            minLength: 1
          - type: 'null'
          title: Message
        template:
          anyOf:
          - $ref: '#/components/schemas/WhatsAppTemplatePayload'
          - type: 'null'
          description: Provide ContentSid/variables for business-initiated templates
        media_url:
          anyOf:
          - type: string
            maxLength: 2083
            minLength: 1
            format: uri
          - type: 'null'
          title: Media Url
          description: Optional media attachment hosted by client
        metadata:
          type: object
          title: Metadata
          description: Optional metadata stored with the log
        request_id:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Request Id
          description: Idempotency key to prevent duplicate deliveries
      type: object
      required:
      - license_key
      - phone_number
      title: WhatsAppSendRequest
      description: Request payload for WhatsApp messaging.
    WhatsAppTemplatePayload:
      properties:
        content_sid:
          type: string
          maxLength: 64
          minLength: 5
          title: Content Sid
        content_variables:
          type: object
          title: Content Variables
          description: Key/value pairs injected into the WhatsApp template
      type: object
      required:
      - content_sid
      title: WhatsAppTemplatePayload
      description: Template-based delivery payload for business-initiated messages.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Body_whatsapp_status_callback_api_v1_messaging_whatsapp_status_callback_post:
      properties:
        MessageSid:
          type: string
          title: Messagesid
          description: Twilio message SID
        MessageStatus:
          anyOf:
          - type: string
          - type: 'null'
          title: Messagestatus
          description: Latest status (queued, sent, delivered, undelivered, ...)
        ErrorCode:
          anyOf:
          - type: string
          - type: 'null'
          title: Errorcode
          description: Twilio error code
        ErrorMessage:
          anyOf:
          - type: string
          - type: 'null'
          title: Errormessage
          description: Twilio error message
        EventType:
          anyOf:
          - type: string
          - type: 'null'
          title: Eventtype
          description: Event type when provided
      type: object
      required:
      - MessageSid
      title: Body_whatsapp_status_callback_api_v1_messaging_whatsapp_status_callback_post
    WhatsAppSendResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        message_sid:
          type: string
          title: Message Sid
        status:
          type: string
          title: Status
        cost_usd:
          anyOf:
          - type: number
          - type: 'null'
          title: Cost Usd
        currency:
          anyOf:
          - type: string
          - type: 'null'
          title: Currency
        delivery_log_id:
          type: string
          title: Delivery Log Id
      type: object
      required:
      - message_sid
      - status
      - cost_usd
      - currency
      - delivery_log_id
      title: WhatsAppSendResponse
      description: Response returned after attempting delivery.