> ## Documentation Index
> Fetch the complete documentation index at: https://docs.member.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# One-click unsubscribe (RFC 8058)

> RFC 8058 one-click unsubscribe endpoint.

Mail clients (Gmail, Apple Mail) POST to this URL with the form body:
  List-Unsubscribe=One-Click

The JWT token is accepted from either:
  - ``t`` query parameter (standard form)
  - Implicit in the original ``t`` query parameter on the URL

Returns 200 with an EMPTY body on success. Gmail / Apple require either
200 or 204 with no body content.

Status codes:
  200 — success (empty body)
  400 — invalid or expired token (empty body)



## OpenAPI

````yaml /openapi/mio-openapi.json post /unsubscribe
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /unsubscribe:
    post:
      tags:
        - email-unsubscribe
      summary: One-click unsubscribe (RFC 8058)
      description: |-
        RFC 8058 one-click unsubscribe endpoint.

        Mail clients (Gmail, Apple Mail) POST to this URL with the form body:
          List-Unsubscribe=One-Click

        The JWT token is accepted from either:
          - ``t`` query parameter (standard form)
          - Implicit in the original ``t`` query parameter on the URL

        Returns 200 with an EMPTY body on success. Gmail / Apple require either
        200 or 204 with no body content.

        Status codes:
          200 — success (empty body)
          400 — invalid or expired token (empty body)
      operationId: email_unsubscribe.post_email_unsubscribe_post_unsubscribe
      parameters:
        - description: Signed unsubscribe JWT token.
          in: query
          name: t
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Signed unsubscribe JWT token.
            title: T
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/post_unsubscribe'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    post_unsubscribe:
      properties:
        List-Unsubscribe:
          anyOf:
            - type: string
            - type: 'null'
          description: RFC 8058 form field; value should be 'One-Click'.
          title: List-Unsubscribe
      title: Body_email-unsubscribe.post_unsubscribe
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http

````