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

# Initiate Banner Upload

> Initiate a banner upload: validate, create File+Media, return presigned PUT URL.

Security gate (mirrors avatar_upload.py — initiation):
  (a) contact JWT — enforced by get_current_contact dependency
  (b) resolve hub server-side + derive team_id
  (c) require_active_for_write membership check
  (d) MIME allowlist
  (e) 10 MiB size cap
  (f) MediaService.create_file + rate limit



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/portal/hubs/{hub_id}/me/banner
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:
  /api/v1/portal/hubs/{hub_id}/me/banner:
    post:
      tags:
        - community-banner-upload
      summary: Initiate Banner Upload
      description: >-
        Initiate a banner upload: validate, create File+Media, return presigned
        PUT URL.


        Security gate (mirrors avatar_upload.py — initiation):
          (a) contact JWT — enforced by get_current_contact dependency
          (b) resolve hub server-side + derive team_id
          (c) require_active_for_write membership check
          (d) MIME allowlist
          (e) 10 MiB size cap
          (f) MediaService.create_file + rate limit
      operationId: >-
        community_banner_upload.post_community_banner_upload_post_portal_hubs_by_hub_id_me_banner
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/BannerInitiateEnvelope'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    BannerInitiateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/BannerInitiateData'
      required:
        - data
      title: BannerInitiateEnvelope
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    BannerInitiateData:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/BannerInitiateAttributes'
        type:
          title: Type
          type: string
      required:
        - type
        - attributes
      title: BannerInitiateData
      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
    BannerInitiateAttributes:
      additionalProperties: false
      description: Attributes for POST /me/banner (initiate upload).
      properties:
        mime_type:
          title: Mime Type
          type: string
        size_bytes:
          exclusiveMinimum: 0
          maximum: 10485760
          title: Size Bytes
          type: integer
      required:
        - mime_type
        - size_bytes
      title: BannerInitiateAttributes
      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

````