Cleat Lines API

The numbers in a workspace, and the messages they received.

GitHub OpenAPI

Operations 2

GET /api/v1/lines List the lines in this key's workspace #
GET /api/v1/lines/{lineId}/messages List the messages a line received #

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/cleat-so:cleat-so-lines-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

cleat-so-lines-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cleat So Lines API
  version: 1.0.0
  contact:
    name: Cleat
    email: contact@cleat.so
    url: https://cleat.so/for/developers
  description: 'Operations tagged Lines across 2 of this provider''s published API definitions: cleat-so-openapi.json, cleat-so-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cleat.so
security:
- apiKey: []
tags:
- name: Lines
  description: The numbers in a workspace, and the messages they received.
paths:
  /api/v1/lines:
    get:
      tags:
      - Lines
      summary: List the lines in this key's workspace
      description: Newest first. Lines that have been fully released are still listed, so an id in your own records still resolves to something. This endpoint works before the workspace owner has verified their identity — only reading a line's messages waits for that.
      operationId: listLines
      responses:
        '200':
          description: The workspace's lines.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Line'
        '401':
          description: The key is missing, malformed, revoked, or its workspace owner is disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The key's scope could not be checked. Nothing is returned rather than risk widening the key; retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://cleat.so
  /api/v1/lines/{lineId}/messages:
    get:
      tags:
      - Lines
      summary: List the messages a line received
      description: 'Pass `after` to poll forwards: results come back oldest first, so you can walk them in order and keep the last `receivedAt` as your cursor. That is also how you catch up on anything a webhook could not deliver.


        Pass `before` to page backwards through history; results come back newest first. Omit both and you get the newest messages. Pass both for a range: `after` still decides the order, so those come back oldest first.


        Both bounds are exclusive. A `limit` outside 1 to 200 is clamped rather than refused, and anything unreadable as a number falls back to the default.'
      operationId: listMessages
      parameters:
      - name: lineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: after
        in: query
        required: false
        description: Only messages received strictly after this moment. Switches the order to oldest first.
        schema:
          type: string
          format: date-time
      - name: before
        in: query
        required: false
        description: Only messages received strictly before this moment.
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        required: false
        description: Clamped to this range rather than refused.
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: The line's messages.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
        '400':
          description: '`after` or `before` was not an ISO 8601 timestamp.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The key is missing, malformed, revoked, or its workspace owner is disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The line is on hold for non-payment. Its texts are kept but cannot be read until it is resubscribed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The workspace owner hasn't verified their identity yet. The line runs and keeps every text it receives, but none can be read until they do. `code` is `verify_first`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No line with that id in this key's workspace, or the line is outside this key's scope. The two are deliberately the same answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The key's scope could not be checked. Nothing is returned rather than risk widening the key; retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://cleat.so
webhooks:
  message.received:
    post:
      summary: A text or transcribed call arrived on one of your lines
      description: 'Sent as the message lands. If your endpoint is unreachable or answers anything other than 2xx, the delivery is tried again: 5 attempts in all, the first straight away and the rest after 30s, 2m, 10m and an hour. Every attempt is recorded, so you can see what happened and replay any delivery from workspace settings. If all five fail, catch up with `GET /api/v1/lines/{lineId}/messages?after=...`.


        `data.label` is who the message is from in words — a contact the workspace saved, else the service Cleat recognised from the text — with `data.contact` and `data.service` behind it. All three are null when nothing is certain; `from`, `body` and `code` are unchanged.


        A retry sends the same body as the first attempt, with a signature over those bytes and a fresh timestamp, so treat deliveries as at-least-once and make your handler idempotent on `data.id`.


        Answer within 10 seconds. Redirects are not followed, and the endpoint must be an HTTPS URL that resolves to a public address.


        Verify `cleat-signature`, which is `t=,v1=`, where the hex is HMAC-SHA256 of `.` keyed with the endpoint''s signing secret. Compare it against the raw body before parsing, and reject a timestamp that is not recent.


        `type` is `message.received` for a real message and `test` for the sample delivery fired from workspace settings, which carries the same `data` shape with its own ids. Answer 200 to a `type` you don''t recognise rather than failing: more may be added.


        Nothing is sent while a line is on hold or its workspace owner has not verified their identity. Those messages are stored and can be read as soon as the reason clears, but no webhook is ever sent for them afterwards — catch up with `after`.


        An endpoint whose URL is a Slack incoming webhook or a Microsoft Teams workflow gets that app''s own message format instead of this envelope, and no `cleat-signature`: there is no shared secret with a chat app. Everything above describes an endpoint of your own.'
      parameters:
      - name: cleat-signature
        in: header
        required: true
        schema:
          type: string
        example: t=1789200000,v1=6f1a…
      - name: user-agent
        in: header
        required: false
        schema:
          type: string
          const: Cleat-Webhooks/1.0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              - data
              properties:
                type:
                  type: string
                  const: message.received
                data:
                  $ref: '#/components/schemas/Message'
      responses:
        '200':
          description: Acknowledged. Any 2xx counts.
      tags:
      - Lines
    servers:
    - url: https://cleat.so
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: A sentence meant to be shown to a person.
        code:
          type: string
    Message:
      type: object
      required:
      - id
      - line
      - from
      - body
      - code
      - receivedAt
      - service
      - contact
      - label
      properties:
        id:
          type: string
          format: uuid
        line:
          type: object
          required:
          - id
          - phone
          - label
          properties:
            id:
              type: string
              format: uuid
            phone:
              type: string
              description: E.164 without the plus, e.g. 13055550100.
              examples:
              - '13055550100'
            label:
              type:
              - string
              - 'null'
        from:
          type: string
          description: 'The sender as the network reported it: a number, or an alphanumeric sender id.'
          examples:
          - '22395'
        body:
          type: string
          description: The full text. For a call, the transcript.
        code:
          type:
          - string
          - 'null'
          description: The code as extracted, for display. Best effort — always read body when it matters.
          examples:
          - '704118'
        receivedAt:
          type: string
          format: date-time
        service:
          type:
          - object
          - 'null'
          required:
          - id
          - name
          - color
          properties:
            id:
              type: string
              description: A stable id for the service, e.g. facebook.
            name:
              type: string
              description: The service's name, e.g. Facebook.
            color:
              type: string
              description: 'A hex colour for a badge, e.g. #0866FF.'
              examples:
              - '#0866FF'
          description: The service Cleat recognised from the text, or null when it isn't clear. Recognition is conservative — several services share one short code, so the text decides and the number only breaks a tie.
        contact:
          type:
          - object
          - 'null'
          required:
          - id
          - name
          - color
          properties:
            id:
              type: string
              description: The contact's id in your workspace.
            name:
              type: string
              description: The name your team gave this sender.
            color:
              type: string
              description: 'A hex colour for a badge, e.g. #0866FF.'
              examples:
              - '#0866FF'
          description: The workspace contact that matches this message, or null. A contact always wins over `service`.
        label:
          type:
          - string
          - 'null'
          description: 'What to show: the contact''s name, else the service''s name, else null.'
          examples:
          - Facebook
    Line:
      type: object
      required:
      - id
      - phone
      - label
      - status
      - createdAt
      properties:
        id:
          type: string
          format: uuid
        phone:
          type: string
          description: E.164 without the plus, e.g. 13055550100.
          examples:
          - '13055550100'
        label:
          type:
          - string
          - 'null'
        status:
          type: string
          enum:
          - active
          - grace
          - released
          description: 'active: receiving. grace: unpaid, texts held and not readable. released: the number is gone.'
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'An API key created in workspace settings, sent as `Authorization: Bearer clt_...`. Keys begin with `clt_` and are shown once.


        A key belongs to one workspace and is limited to 120 requests per minute. It can be narrowed further when it is created: to named lines (up to 50), and to a date it stops working, up to a year out — which is what makes a key safe to hand to an agent or a contractor. A line outside a key''s scope answers 404, exactly as a line in another workspace does. Only the workspace owner can create or revoke keys.


        Keys stop working while the workspace owner''s account is disabled, and an expired key answers 401 with `code` `key_expired`.'
externalDocs:
  description: Using a line from code
  url: https://cleat.so/for/developers
x-refined-from:
- cleat-so-openapi.json
- cleat-so-openapi.yml