Hail Unsubscribe API

The unsubscribe API from Hail — 1 operation(s) for unsubscribe.

GitHub OpenAPI

Operations 2

POST /v1/unsubscribe Unsubscribe #
GET /v1/unsubscribe Unsubscribe #

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/hail-so:hail-so-unsubscribe-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

hail-so-unsubscribe-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hail Unsubscribe API
  description: 'Give your AI agent a voice, a real phone number, and an inbox.


    This file is the source of truth for the Go CLI. Regenerate it after

    changing API routes — see docs/public/contributing.md.'
  version: 0.1.0
servers:
- url: https://api.hail.so
  description: Hail Cloud
tags:
- name: unsubscribe
paths:
  /v1/unsubscribe:
    post:
      tags:
      - unsubscribe
      summary: Unsubscribe
      description: 'One-click email opt-out (RFC 8058).


        ``GET`` is a person clicking the link in a sent email. ``POST`` is the

        mailbox provider''s unsubscribe button (Gmail, Yahoo), which sends the

        body ``List-Unsubscribe=One-Click``. The body is optional.


        Public and unauthenticated — the signed token query param is the sole

        credential, proving the caller holds a link Hail sent to that address.

        On success, the address is added to the org''s suppression list and all

        future outbound email to it is blocked. Returns an HTML page, not JSON.'
      operationId: unsubscribe_v1_unsubscribe_post
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '400':
          description: The token is invalid or has expired.
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                List-Unsubscribe:
                  type: string
                  enum:
                  - One-Click
    get:
      tags:
      - unsubscribe
      summary: Unsubscribe
      description: 'One-click email opt-out (RFC 8058).


        ``GET`` is a person clicking the link in a sent email. ``POST`` is the

        mailbox provider''s unsubscribe button (Gmail, Yahoo), which sends the

        body ``List-Unsubscribe=One-Click``. The body is optional.


        Public and unauthenticated — the signed token query param is the sole

        credential, proving the caller holds a link Hail sent to that address.

        On success, the address is added to the org''s suppression list and all

        future outbound email to it is blocked. Returns an HTML page, not JSON.'
      operationId: unsubscribe_v1_unsubscribe_get
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '400':
          description: The token is invalid or has expired.
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
          description: Path to the invalid field within the request, as a list of keys/indices (e.g. ['body', 'to']).
        msg:
          type: string
          title: Message
          description: Human-readable description of the validation failure.
        type:
          type: string
          title: Error Type
          description: Machine-readable error type code (e.g. 'missing', 'string_type').
        input:
          title: Input
          description: The value that was actually provided and failed validation.
        ctx:
          type: object
          title: Context
          description: Additional machine-readable context for the error, when the error type provides one.
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: 'List of validation errors: each entry gives the field location (loc), the problem (msg), and the error type (type).'
      type: object
      title: HTTPValidationError