CommsHarbor Context API

The Context API from CommsHarbor — 1 operation(s) for context.

GitHub OpenAPI

Operations 1

GET /api/context Resolve which organization and role the current session or API key is acting as #

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/commsharbor:commsharbor-context-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

commsharbor-context-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CommsHarbor Context API
  version: fd7767a6
  description: Manage domain email, mailboxes, aliases and durable jobs. Each call uses its organization's identity.
servers:
- url: https://commsharbor.com
tags:
- name: Context
paths:
  /api/context:
    get:
      operationId: commsharbor_context
      summary: Resolve which organization and role the current session or API key is acting as
      description: 'Read this before a write when you are not certain which tenant is active. Guessing is how data lands in the wrong organization. An organization API key answers `kind: api_key` with its scopes.

        Returns: { kind, organizationId, userId, sessionId, apiKeyId, scopes, role, organization }'
      security:
      - bearerAuth: []
      parameters:
      - name: X-Organization-Id
        in: header
        required: true
        schema:
          type: string
        description: 'Which organization to act in; required with a session. The shared account checks, on every request, that you belong to it and that CommsHarbor is enabled for it. An organization API key opens only its own organization: send that ID, or omit the header.'
      responses:
        '200':
          description: '{ kind, organizationId, userId, sessionId, apiKeyId, scopes, role, organization }'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
        '401':
          description: No signed-in session, or the API key is invalid or revoked (`invalid_api_key`); an old `ch_…` key answers `api_key_retired`.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: The session or key lacks the permission this operation needs (an API key never reaches billing, erasure, exports or the audit trail), an account key was used where an organization key is needed (`organization_key_required`), or an owner/admin has no second factor (`organization_mfa_required`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: The organization is not available to this session or key (no membership, CommsHarbor is not enabled for it, or the key belongs to another organization), or the resource does not exist in it. Another tenant's ID answers the same 404 — the API never confirms that it exists elsewhere.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '503':
          description: The shared account is unavailable.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      tags:
      - Context
components:
  schemas:
    Identity:
      type: object
      properties:
        kind:
          type: string
          description: How the identity was resolved.
          enum:
          - session
          - api_key
        organizationId:
          type: string
          description: The active organization.
        userId:
          type: string
          description: The person's shared-account ID (session only).
        sessionId:
          type: string
          description: Session identifier (session only).
        apiKeyId:
          type: string
          description: The organization API key's ID (API key only).
        scopes:
          type: array
          items:
            type: string
          description: 'What the API key may do (API key only): the work permissions, never billing, erasure, exports or audit.'
        role:
          type: string
          description: Role inside that organization, from the shared account; null with an API key.
          nullable: true
          enum:
          - owner
          - admin
          - member
          - null
        organization:
          type: object
          description: '`{ id, name }` of the active organization; `name` is null with an API key.'
      required:
      - kind
      - organizationId
      - userId
      - sessionId
      - apiKeyId
      - scopes
      - role
      - organization
      description: Who the current session or API key resolves to. Read this before a write when you are not sure which organization is active.
    ProblemDetails:
      type: object
      description: RFC 9457 Problem Details error response (`application/problem+json`). Includes stable `code` and backward-compatible `error` and `message` fields; route-specific extension fields (such as `accepts`, `allow`, `retry_after`, or `request_id`) may also be present.
      required:
      - type
      - title
      - status
      - detail
      - instance
      - code
      properties:
        type:
          type: string
          format: uri
          description: URI identifying the problem type, linking to `/errors#<code>` on this host.
        title:
          type: string
          description: Short human-readable summary of the problem type.
        status:
          type: integer
          description: HTTP status code generated for this occurrence.
        detail:
          type: string
          description: Human-readable explanation specific to this occurrence.
        instance:
          type: string
          description: Request path where the error occurred (without query parameters).
        code:
          type: string
          description: Stable machine-readable snake_case error code documented at `/errors`.
        error:
          type: string
          description: Backward-compatible alias of `code` (or protocol reason on x402 402 responses).
        message:
          type: string
          description: Backward-compatible alias of `detail`.
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use an organisation API key (`mmk_…`) for permitted work in that organisation. Account operations require the shared account session. Paid routes accept a global credit token (`cred_…`). Monthly purchases require a recent human session.
    globalAccount:
      type: apiKey
      in: cookie
      name: __Host-mm-auth
      description: Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token.
    contaChaveApi:
      type: http
      scheme: bearer
      bearerFormat: mmk_…
      description: 'Account API key: `Authorization: Bearer mmk_…` or `X-Api-Key: mmk_…`. Created on the account page (API keys), valid only in the product where it was created; it acts as the account (or the organization that owns it).'
    carteiraAgente:
      type: http
      scheme: bearer
      bearerFormat: mmw_…
      description: 'Wallet credential of an agent without an account (`Authorization: Bearer mmw_…`, 30 days, this product only): POST /api/auth/wallet/agent/start, check that the domain and URI of the message are the host and origin that you called, sign the message with the wallet, POST /api/auth/wallet/agent/token. The owner is `x402:<address>`.'
externalDocs:
  url: https://payapi.market/api/commsharbor
  description: PayAPI Market
x-service-info:
  categories:
  - email
  - mailbox-management
  docs:
    homepage: https://commsharbor.com/
    apiReference: https://commsharbor.com/developers
    llms: https://commsharbor.com/llms.txt
    errors: https://commsharbor.com/errors
    pricing: https://commsharbor.com/api/pricing
    billing: https://commsharbor.com/api/billing