CommsHarbor Preferences API

The Preferences API from CommsHarbor — 2 operation(s) for preferences.

Operations 2

GET /api/preferences/{token} Read a contact's preference through a signed capability, with no login #
POST /api/preferences/{token}/unsubscribe Apply an RFC 8058 one-click unsubscribe, idempotently #

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-preferences-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

commsharbor-preferences-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CommsHarbor Preferences API
  version: 2d690e87
  description: CommsHarbor API. Organization identity is explicit and tenant-scoped.
servers:
- url: https://commsharbor.com
tags:
- name: Preferences
paths:
  /api/preferences/{token}:
    get:
      operationId: commsharbor_preference_get
      summary: Read a contact's preference through a signed capability, with no login
      description: 'The token IS the credential. It reveals preference state and nothing else — no email address, no CRM record.

        Returns: { marketing_enabled, unsubscribed_at, expires_at }'
      security:
      - bearerAuth: []
      parameters:
      - name: token
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: '{ marketing_enabled, unsubscribed_at, expires_at }'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreferenceState'
        '401':
          description: Bad signature.
        '404':
          description: Unknown or expired capability.
      tags:
      - Preferences
  /api/preferences/{token}/unsubscribe:
    post:
      operationId: commsharbor_preference_unsubscribe
      summary: Apply an RFC 8058 one-click unsubscribe, idempotently
      description: 'This is the endpoint mail clients call from the `List-Unsubscribe-Post` header, which is why the body is form-encoded and fixed. Calling it twice is the same as calling it once.

        Returns: { unsubscribed }'
      security:
      - bearerAuth: []
      parameters:
      - name: token
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            example: List-Unsubscribe=One-Click
      responses:
        '200':
          description: '{ unsubscribed }'
          content:
            application/json:
              schema:
                type: object
                properties:
                  unsubscribed:
                    type: boolean
                    description: Always true once the contact is unsubscribed, whether or not this call was the one that did it.
                required:
                - unsubscribed
        '401':
          description: Bad signature.
        '404':
          description: Unknown or expired capability.
      tags:
      - Preferences
components:
  schemas:
    PreferenceState:
      type: object
      properties:
        marketing_enabled:
          type: boolean
          description: Whether marketing may be sent.
        unsubscribed_at:
          type: string
          description: When the contact unsubscribed.
          nullable: true
        expires_at:
          type: string
          description: When this capability stops working (UTC).
      required:
      - marketing_enabled
      - unsubscribed_at
      - expires_at
      description: What the signed capability reveals. No login, and no email address is exposed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Human session or scoped organization API key. Organization identity remains explicit.