easyCoexistence Connect sessions API

The Connect sessions API from easyCoexistence — 2 operation(s) for connect sessions.

GitHub OpenAPI

Operations 2

POST /connect-sessions Create a connect session #
GET /connect-sessions/{id} Read a connect 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/easycoexistence-com:easycoexistence-com-connect-sessions-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

easycoexistence-com-connect-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EasyCoexistence Connect sessions API
  version: '1'
  description: 'Your connected numbers and channels from your own backend: status and sending health, credentials, where messages go, signed status events. Messages never pass through EasyCoexistence: send through Meta with the number''s own token. Fields are snake_case, dates ISO 8601 in UTC. New fields and events are added without notice: ignore what you do not use. Reference: https://easycoexistence.com/docs/api. 36 operations.'
servers:
- url: https://easycoexistence.com/api/v1
security:
- apiKey: []
tags:
- name: Connect sessions
paths:
  /connect-sessions:
    post:
      operationId: createConnectSession
      tags:
      - Connect sessions
      summary: Create a connect session
      description: 'Starts a hosted onboarding for one customer. Answers `201` with the URL to send them to.


        Sessions expire after 1 hour. An account may hold 50 open sessions and create 100 per hour: Meta counts every first-time onboarding against an app-wide limit that every account shares.'
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect_url:
                  type:
                  - string
                  - 'null'
                  format: uri
                  description: Where the customer lands afterwards, with `session`, `status` (`connected` or `cancelled`), `connection_id` (or `channel_id`) and `external_ref` in the query string.
                external_ref:
                  type: string
                  description: Your id for this customer. Echoed on the connection and on every event; a filter on every list.
                partner_name:
                  type: string
                  description: Shown on the hosted page. Defaults to your account name.
                webhook_url:
                  type:
                  - string
                  - 'null'
                  format: uri
                  description: 'Numbers only. Set on the number the moment it connects, so Meta delivers `messages` and `smb_message_echoes` there, plus the one-time import of chat history and contacts. Meta runs a GET handshake first: answer `hub.challenge` when `hub.verify_token` matches. Can also be set later.'
                webhook_verify_token:
                  type: string
                  description: With `webhook_url`.
                channel:
                  type: string
                  enum:
                  - whatsapp
                  - instagram
                  - facebook
                  - tiktok
                  description: '`whatsapp` (the default, a number) or a social network: the hosted page then shows the network''s own sign-in, which works on phones too, and the customer comes back with `channel_id` instead of `connection_id`.'
              required:
              - redirect_url
              additionalProperties: true
            example:
              redirect_url: https://app.example.com/whatsapp/return
              external_ref: customer_4821
              partner_name: ClinicApp
              webhook_url: https://hooks.example.com/wa/<long-random-secret>
              webhook_verify_token: another-long-random-string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                id: cs_…
                url: https://easycoexistence.com/connect/cs_…
                channel: whatsapp
                status: created
                external_ref: customer_4821
                connection_id: null
                channel_id: null
                token_ready: false
                redirect_url: https://app.example.com/whatsapp/return
                webhook_url: https://hooks.example.com/wa/…
                last_error: null
                expires_at: …
                opened_at: null
                finished_at: null
        '400':
          description: '`invalid_request`: A field is missing or wrong; the message names it. Or `channel_unavailable`: That channel cannot be used for this: not one this account can connect, or one that cannot post.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: '`unauthorized`: No key, or a key that does not exist or was revoked.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: '`billing_required`: This needs an active subscription. Reading always works.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited`: Too many requests; the message says when to retry.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /connect-sessions/{id}:
    get:
      operationId: getConnectSession
      tags:
      - Connect sessions
      summary: Read a connect session
      description: '`status` is `created`, `opened`, `connected`, `cancelled` or `expired`. `token_ready: false` on a connected session means Meta finished without issuing the customer''s own token (it happens); the hosted page asks for one more run, and if the customer skips it the number receives (the IDs are valid) but cannot send until a new session reconnects it.'
      parameters:
      - name: id
        in: path
        required: true
        description: The session's id.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                id: cs_…
                url: https://easycoexistence.com/connect/cs_…
                channel: whatsapp
                status: connected
                external_ref: customer_4821
                connection_id: 6f1c…
                channel_id: null
                token_ready: true
                redirect_url: https://app.example.com/whatsapp/return
                webhook_url: https://hooks.example.com/wa/…
                last_error: null
                expires_at: …
                opened_at: …
                finished_at: …
        '401':
          description: '`unauthorized`: No key, or a key that does not exist or was revoked.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`not_found`: Nothing with that id on this account.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              enum:
              - invalid_json
              - invalid_request
              - channel_unavailable
              - not_supported
              - invalid_media
              - unauthorized
              - billing_required
              - suspended
              - not_found
              - removed
              - conflict
              - not_managed
              - secret_change
              - rate_limited
              - internal
              - meta_error
              - meta_rejected
              - revoke_failed
              - credentials_unavailable
            message:
              type: string
              description: For people; may change.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: The account's ec_live_ key, made in Dashboard → Developers.