> ## 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.

# Create an admin_block suppression for a hub

> Create a manual admin_block suppression for a specific email address.

Scope is always 'hub'. reason is always 'admin_block'.
hub_id comes from the URL path. source_event_type is 'manual'.

team_id is resolved from the hub row (CHECK constraint requires
hub-scope rows to have team_id NOT NULL).  Returns 404 if the hub
does not exist.

Returns 201 with the created resource on success, 404 if hub unknown,
422 on bad input.



## OpenAPI

````yaml /openapi/mio-openapi.json post /v1/hubs/{hub_id}/email-suppressions
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:
  /v1/hubs/{hub_id}/email-suppressions:
    post:
      tags:
        - email-suppressions-hub
      summary: Create an admin_block suppression for a hub
      description: |-
        Create a manual admin_block suppression for a specific email address.

        Scope is always 'hub'. reason is always 'admin_block'.
        hub_id comes from the URL path. source_event_type is 'manual'.

        team_id is resolved from the hub row (CHECK constraint requires
        hub-scope rows to have team_id NOT NULL).  Returns 404 if the hub
        does not exist.

        Returns 201 with the created resource on success, 404 if hub unknown,
        422 on bad input.
      operationId: >-
        email_suppressions_hub.post_email_suppressions_hub_post_v1_hubs_by_hub_id_email_suppressions
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HubCreateSuppressionEnvelope'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SuppressionResponse'
          description: Successful Response
        '400':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable entity
      security:
        - HTTPBearer: []
components:
  schemas:
    HubCreateSuppressionEnvelope:
      properties:
        data:
          $ref: '#/components/schemas/HubCreateSuppressionData'
      required:
        - data
      title: HubCreateSuppressionEnvelope
      type: object
    SuppressionResponse:
      description: Single-resource JSON:API response.
      properties:
        data:
          $ref: '#/components/schemas/SuppressionResource'
      required:
        - data
      title: SuppressionResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    HubCreateSuppressionData:
      properties:
        attributes:
          $ref: '#/components/schemas/HubCreateSuppressionAttributes'
        type:
          default: email_suppressions
          title: Type
          type: string
      required:
        - attributes
      title: HubCreateSuppressionData
      type: object
    SuppressionResource:
      description: JSON:API resource object for email-suppression.
      properties:
        attributes:
          $ref: '#/components/schemas/SuppressionAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: 'null'
              type: object
            - type: 'null'
          title: Links
        type:
          default: email_suppressions
          title: Type
          type: string
      required:
        - id
        - attributes
      title: SuppressionResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    HubCreateSuppressionAttributes:
      properties:
        email_address:
          format: email
          title: Email Address
          type: string
        reason:
          default: admin_block
          description: Suppression reason. For hub-admin creates, must be 'admin_block'.
          title: Reason
          type: string
      required:
        - email_address
      title: HubCreateSuppressionAttributes
      type: object
    SuppressionAttributes:
      description: Attributes block for an email-suppression resource object.
      properties:
        email_address:
          title: Email Address
          type: string
        hub_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Hub Id
        is_active:
          title: Is Active
          type: boolean
        lifted_at:
          anyOf:
            - {}
            - type: 'null'
          title: Lifted At
        lifted_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Lifted By
        reason:
          title: Reason
          type: string
        scope:
          title: Scope
          type: string
        source_event_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Event Type
        suppressed_at:
          title: Suppressed At
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
      required:
        - email_address
        - scope
        - reason
        - is_active
        - suppressed_at
      title: SuppressionAttributes
      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
    HTTPBearer:
      scheme: bearer
      type: http

````