Sarj AI Developer API Messaging API

The messaging API from Sarj AI Developer API — 8 operation(s) for messaging.

Operations 5

POST /api/messaging/socialbot Socialbot Webhook #
POST /api/messaging/list List Sessions #
GET /api/messaging/sessions/{session_id} Get Session #
GET /api/messaging/sessions/{session_id}/messages Get Messages #
POST /api/messaging/sessions/{session_id}/end End Session #

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/sarj-ai-developer-api-messaging-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

sarj-ai-developer-api-messaging-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sarj.ai Voice Messaging API
  version: 1.0.0
tags:
- name: Messaging
paths:
  /api/messaging/socialbot:
    post:
      tags:
      - Messaging
      summary: Socialbot Webhook
      operationId: messagingSocialbotWebhook
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/SocialbotSkipped'
                - $ref: '#/components/schemas/SocialbotAccepted'
                title: Response Messagingsocialbotwebhook
                discriminator:
                  propertyName: status
                  mapping:
                    skipped: '#/components/schemas/SocialbotSkipped'
                    accepted: '#/components/schemas/SocialbotAccepted'
  /api/messaging/list:
    post:
      tags:
      - Messaging
      summary: List Sessions
      operationId: messagingListSessions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListSessionInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagingSessionList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/messaging/sessions/{session_id}:
    get:
      tags:
      - Messaging
      summary: Get Session
      operationId: messagingGetSession
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagingSession'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/messaging/sessions/{session_id}/messages:
    get:
      tags:
      - Messaging
      summary: Get Messages
      operationId: messagingGetMessages
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 20
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessagingMessage'
                title: Response Messaginggetmessages
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/messaging/sessions/{session_id}/end:
    post:
      tags:
      - Messaging
      summary: End Session
      operationId: messagingEndSession
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndSessionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndSessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EndSessionRequest:
      properties:
        reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Reason
      type: object
      title: EndSessionRequest
    SocialbotSkipped:
      properties:
        status:
          type: string
          const: skipped
          title: Status
        reason:
          type: string
          title: Reason
      type: object
      required:
      - status
      - reason
      title: SocialbotSkipped
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    MessagingProvider:
      type: string
      enum:
      - socialbot_whatsapp
      title: MessagingProvider
    SocialbotAccepted:
      properties:
        status:
          type: string
          const: accepted
          title: Status
        organization_id:
          type: string
          title: Organization Id
        task_id:
          type: string
          title: Task Id
      type: object
      required:
      - status
      - organization_id
      - task_id
      title: SocialbotAccepted
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MessagingSessionList:
      properties:
        sessions:
          items:
            $ref: '#/components/schemas/MessagingSession'
          type: array
          title: Sessions
        next_cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Next Cursor
        total_count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Total Count
      type: object
      required:
      - sessions
      title: MessagingSessionList
    ListSessionInput:
      properties:
        status:
          anyOf:
          - $ref: '#/components/schemas/MessagingSessionStatus'
          - type: 'null'
        phone_number:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone Number
        cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
        limit:
          type: integer
          maximum: 100.0
          minimum: 1.0
          title: Limit
          default: 20
      type: object
      title: ListSessionInput
    MessagingSessionStatus:
      type: string
      enum:
      - active
      - ended
      - error
      title: MessagingSessionStatus
    EndSessionResponse:
      properties:
        status:
          type: string
          title: Status
        session_id:
          type: string
          title: Session Id
        ended_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Ended At
      type: object
      required:
      - status
      - session_id
      - ended_at
      title: EndSessionResponse
    MessagingMessage:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        session_id:
          type: string
          format: uuid
          title: Session Id
        direction:
          $ref: '#/components/schemas/MessageDirection'
        content:
          type: string
          title: Content
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - session_id
      - direction
      - content
      title: MessagingMessage
    MessageDirection:
      type: string
      enum:
      - inbound
      - outbound
      title: MessageDirection
    MessagingSession:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        provider:
          $ref: '#/components/schemas/MessagingProvider'
        external_id:
          type: string
          title: External Id
        phone_number:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone Number
        status:
          $ref: '#/components/schemas/MessagingSessionStatus'
          default: active
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        messages:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Messages
        started_at:
          type: string
          format: date-time
          title: Started At
        ended_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Ended At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
      - organization_id
      - provider
      - external_id
      title: MessagingSession