Pantheon Chats API

The Chats API from Pantheon — 3 operation(s) for chats.

GitHub OpenAPI

Operations 3

GET /v1/chats Get chats #
GET /v1/chats/search Get chats search #
GET /v1/chats/{contactId}/messages Get chats by contact id messages #

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/pantheon-run:pantheon-run-chats-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

pantheon-run-chats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pantheon Developer Chats API
  description: 'Public REST API for contacts, chats, files, records (contacts, companies, deals and custom tables) and AI queries. Authenticate with a developer API key (Authorization: Bearer pk_live_...).'
  version: 1.7.0
servers:
- url: https://api.pantheon.run
  description: This deployment
security:
- apiKeyAuth: []
tags:
- name: Chats
paths:
  /v1/chats:
    get:
      parameters:
      - schema:
          type: string
          maxLength: 2048
        in: query
        name: cursor
        required: false
      - schema:
          type: string
          minLength: 1
          maxLength: 100
        in: query
        name: channel
        required: false
      - schema:
          type: boolean
        in: query
        name: archived
        required: false
      - schema:
          type: string
          maxLength: 40
        in: query
        name: since
        required: false
        description: 'A time bound: an ISO-8601 timestamp or a relative window such as 1h, 24h or 7d.'
      - schema:
          type: string
          maxLength: 190
        in: query
        name: q
        required: false
        description: Case-insensitive name contains search; 2 or more characters after trimming.
      - schema:
          type: string
          maxLength: 512
        in: query
        name: type
        required: false
        description: 'Comma-separated chat types (e.g. group,supergroup): private, phone_contact, saved, group, supergroup, channel, broadcast, community. Matches any visible member row.'
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
        in: query
        name: limit
        required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  chats:
                    type: array
                    items:
                      type: object
                      properties:
                        contact_id:
                          type: string
                        name:
                          type:
                          - string
                          - 'null'
                        type:
                          type:
                          - string
                          - 'null'
                          enum:
                          - private
                          - phone_contact
                          - saved
                          - group
                          - supergroup
                          - channel
                          - broadcast
                          - community
                          - null
                        channels:
                          type: array
                          items:
                            type: string
                        last_message_at:
                          type:
                          - string
                          - 'null'
                        preview:
                          type:
                          - string
                          - 'null'
                  next_cursor:
                    type:
                    - string
                    - 'null'
                  window:
                    type: object
                    properties:
                      since:
                        type:
                        - string
                        - 'null'
                      until:
                        type:
                        - string
                        - 'null'
                  freshness:
                    type: object
                    description: 'How fresh the result is, per channel it covers: the last upload received from this account''s device (WhatsApp, iMessage), or the last Telegram sync. Not the newest message: a device that is on but quiet may have nothing to upload.'
                    properties:
                      whatsapp_personal:
                        type: object
                        properties:
                          last_received_at:
                            type:
                            - string
                            - 'null'
                            description: When this account's device last delivered messages that were accepted; null when unknown.
                      imessage:
                        type: object
                        properties:
                          last_received_at:
                            type:
                            - string
                            - 'null'
                            description: When this account's device last delivered messages that were accepted; null when unknown.
                      telegram:
                        type: object
                        properties:
                          last_synced_at:
                            type:
                            - string
                            - 'null'
                            description: 'The last time Telegram delivered for this account: the newer of when the live listener last took in an update or reconnected and when an import finished. null means not measured, never "never synced".'
        '400':
          description: The request is malformed or a parameter is invalid. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication is missing or the credential is invalid. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The workspace is not on a plan that covers this request. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The credential or its holder is not allowed to perform this request. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: A rate or budget limit was reached; check Retry-After when provided. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/Error'
                - $ref: '#/components/schemas/EdgeRateLimitError'
                - $ref: '#/components/schemas/EdgeRateLimitEnvelope'
        '500':
          description: An unexpected server error occurred; quote X-Request-ID to support. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: A required check or dependency is temporarily unavailable; retry later. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Chats
      summary: Get chats
      x-summary-source: derived
      operationId: getV1Chats
      x-operation-id-source: derived
  /v1/chats/search:
    get:
      parameters:
      - schema:
          type: string
          minLength: 2
          maxLength: 200
        in: query
        name: q
        required: true
      - schema:
          type: string
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
        in: query
        name: contact_id
        required: false
      - schema:
          type: string
          minLength: 1
          maxLength: 100
        in: query
        name: channel
        required: false
      - schema:
          type: string
          maxLength: 40
        in: query
        name: since
        required: false
        description: 'A time bound: an ISO-8601 timestamp or a relative window such as 1h, 24h or 7d.'
      - schema:
          type: string
          maxLength: 40
        in: query
        name: until
        required: false
        description: 'A time bound: an ISO-8601 timestamp or a relative window such as 1h, 24h or 7d.'
      - schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
        in: query
        name: limit
        required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  matched_in:
                    type:
                    - string
                    - 'null'
                    enum:
                    - channel
                    - person
                    - all
                    - null
                  mode:
                    type:
                    - string
                    - 'null'
                    enum:
                    - fts
                    - substring
                    - null
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        at:
                          type: string
                        channel:
                          type:
                          - string
                          - 'null'
                        from_me:
                          type: boolean
                        text:
                          type:
                          - string
                          - 'null'
                        type:
                          type:
                          - string
                          - 'null'
                        sender:
                          type:
                          - string
                          - 'null'
                        contact_id:
                          type:
                          - string
                          - 'null'
                  truncated:
                    type: boolean
                  window:
                    type: object
                    properties:
                      since:
                        type:
                        - string
                        - 'null'
                      until:
                        type:
                        - string
                        - 'null'
                  freshness:
                    type: object
                    description: 'How fresh the result is, per channel it covers: the last upload received from this account''s device (WhatsApp, iMessage), or the last Telegram sync. Not the newest message: a device that is on but quiet may have nothing to upload.'
                    properties:
                      whatsapp_personal:
                        type: object
                        properties:
                          last_received_at:
                            type:
                            - string
                            - 'null'
                            description: When this account's device last delivered messages that were accepted; null when unknown.
                      imessage:
                        type: object
                        properties:
                          last_received_at:
                            type:
                            - string
                            - 'null'
                            description: When this account's device last delivered messages that were accepted; null when unknown.
                      telegram:
                        type: object
                        properties:
                          last_synced_at:
                            type:
                            - string
                            - 'null'
                            description: 'The last time Telegram delivered for this account: the newer of when the live listener last took in an update or reconnected and when an import finished. null means not measured, never "never synced".'
        '400':
          description: The request is malformed or a parameter is invalid. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication is missing or the credential is invalid. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The workspace is not on a plan that covers this request. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The credential or its holder is not allowed to perform this request. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The requested resource does not exist or is not visible to this credential. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: A rate or budget limit was reached; check Retry-After when provided. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/Error'
                - $ref: '#/components/schemas/EdgeRateLimitError'
                - $ref: '#/components/schemas/EdgeRateLimitEnvelope'
        '500':
          description: An unexpected server error occurred; quote X-Request-ID to support. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: A required check or dependency is temporarily unavailable; retry later. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Chats
      summary: Get chats search
      x-summary-source: derived
      operationId: getV1ChatsSearch
      x-operation-id-source: derived
  /v1/chats/{contactId}/messages:
    get:
      parameters:
      - schema:
          type: string
          minLength: 1
          maxLength: 100
        in: query
        name: channel
        required: false
      - schema:
          type: string
          maxLength: 40
        in: query
        name: since
        required: false
        description: 'A time bound: an ISO-8601 timestamp or a relative window such as 1h, 24h or 7d.'
      - schema:
          type: string
          maxLength: 40
        in: query
        name: until
        required: false
        description: 'A time bound: an ISO-8601 timestamp or a relative window such as 1h, 24h or 7d.'
      - schema:
          type: string
          maxLength: 2048
        in: query
        name: cursor
        required: false
      - schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
        in: query
        name: limit
        required: false
      - schema:
          type: string
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
        in: path
        name: contactId
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  target:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                        - person
                        - channel
                        - group
                      channels:
                        type: array
                        items:
                          type: string
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        at:
                          type: string
                        channel:
                          type:
                          - string
                          - 'null'
                        from_me:
                          type: boolean
                        text:
                          type:
                          - string
                          - 'null'
                        type:
                          type:
                          - string
                          - 'null'
                        sender:
                          type:
                          - string
                          - 'null'
                        files:
                          type: array
                          items:
                            type: object
                            properties:
                              file_id:
                                type: string
                              file_name:
                                type:
                                - string
                                - 'null'
                              kind:
                                type:
                                - string
                                - 'null'
                  next_cursor:
                    type:
                    - string
                    - 'null'
                  has_more:
                    type: boolean
                  window:
                    type: object
                    properties:
                      since:
                        type:
                        - string
                        - 'null'
                      until:
                        type:
                        - string
                        - 'null'
                  freshness:
                    type: object
                    description: 'How fresh the result is, per channel it covers: the last upload received from this account''s device (WhatsApp, iMessage), or the last Telegram sync. Not the newest message: a device that is on but quiet may have nothing to upload.'
                    properties:
                      whatsapp_personal:
                        type: object
                        properties:
                          last_received_at:
                            type:
                            - string
                            - 'null'
                            description: When this account's device last delivered messages that were accepted; null when unknown.
                      imessage:
                        type: object
                        properties:
                          last_received_at:
                            type:
                            - string
                            - 'null'
                            description: When this account's device last delivered messages that were accepted; null when unknown.
                      telegram:
                        type: object
                        properties:
                          last_synced_at:
                            type:
                            - string
                            - 'null'
                            description: 'The last time Telegram delivered for this account: the newer of when the live listener last took in an update or reconnected and when an import finished. null means not measured, never "never synced".'
        '400':
          description: The request is malformed or a parameter is invalid. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication is missing or the credential is invalid. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The workspace is not on a plan that covers this request. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The credential or its holder is not allowed to perform this request. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The requested resource does not exist or is not visible to this credential. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: A rate or budget limit was reached; check Retry-After when provided. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/Error'
                - $ref: '#/components/schemas/EdgeRateLimitError'
                - $ref: '#/components/schemas/EdgeRateLimitEnvelope'
        '500':
          description: An unexpected server error occurred; quote X-Request-ID to support. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: A required check or dependency is temporarily unavailable; retry later. See https://docs.pantheon.run/errors for error codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Chats
      summary: Get chats by contact id messages
      x-summary-source: derived
      operationId: getV1ChatsByContactIdMessages
      x-operation-id-source: derived
components:
  schemas:
    EdgeRateLimitError:
      type: object
      required:
      - status
      - type
      - message
      - retryAfterMs
      properties:
        status:
          type: string
          enum:
          - error
        type:
          type: string
          enum:
          - rate_limited
        message:
          type: string
        retryAfterMs:
          type: integer
          description: Milliseconds to wait before retrying
    EdgeRateLimitEnvelope:
      type: object
      required:
      - error
      - retry_after_seconds
      properties:
        error:
          type: object
          required:
          - code
          - message
          - retryAfterMs
          - scope
          properties:
            code:
              type: string
              enum:
              - rate_limited
            message:
              type: string
            retryAfterMs:
              type: integer
              description: Milliseconds to wait before retrying
            scope:
              type: string
              enum:
              - account
              - network
        retry_after_seconds:
          type: integer
          description: Whole seconds to wait before retrying
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Machine-readable error code
            message:
              type:
              - string
              - 'null'
              description: Human-readable message
            details:
              type:
              - object
              - 'null'
              additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: 'Developer API key — Authorization: Bearer pk_live_...'