> ## 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 File Thumbnail Attachment



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/teams/{team_id}/file-thumbnail-attachments
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/teams/{team_id}/file-thumbnail-attachments:
    post:
      tags:
        - media-admin-attachments
      summary: Create File Thumbnail Attachment
      operationId: >-
        media_admin_attachments.post_media_admin_attachments_post_teams_by_team_id_file_thumbnail_attachments
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AttachmentCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    AttachmentCreateRequest:
      description: Request body for POST /api/teams/{team_id}/attachments.
      properties:
        data:
          $ref: '#/components/schemas/AttachmentCreateData'
      required:
        - data
      title: AttachmentCreateRequest
      type: object
    AttachmentResponse:
      description: Single-resource JSON:API response wrapping an AttachmentResource.
      properties:
        data:
          $ref: '#/components/schemas/JsonApiResource_AttachmentAttributes_'
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - data
      title: AttachmentResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AttachmentCreateData:
      properties:
        attributes:
          $ref: '#/components/schemas/AttachmentCreateAttributes'
        type:
          const: attachments
          default: attachments
          title: Type
          type: string
      required:
        - attributes
      title: AttachmentCreateData
      type: object
    JsonApiResource_AttachmentAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/AttachmentAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: JsonApiResource[AttachmentAttributes]
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      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
    AttachmentCreateAttributes:
      properties:
        media_id:
          description: ID of the Media asset to attach.
          title: Media Id
          type: string
        position:
          default: 0
          description: Display order within the target+role group.
          maximum: 2147483647
          minimum: 0
          title: Position
          type: integer
        role:
          description: Semantic role of the attachment.
          enum:
            - main
            - thumbnail
            - logo
            - favicon
            - attachment
            - social_image
            - background_image
            - widget_logo
            - widget_background
            - auth_logo
            - logo_dark
          title: Role
          type: string
        target_id:
          description: ID of the target entity (36-char string/UUID).
          title: Target Id
          type: string
        target_type:
          description: Type of the target entity.
          enum:
            - content_node
            - hub_branding
            - page_section
            - email_message
            - playlist
            - comment
            - discussion
            - message
            - file
          title: Target Type
          type: string
      required:
        - media_id
        - target_type
        - target_id
        - role
      title: AttachmentCreateAttributes
      type: object
    AttachmentAttributes:
      description: >-
        Serialisable attributes of an Attachment resource (no id/type inside
        attributes).


        Enumerates all response fields explicitly — mirrors P3 retro lesson #1

        ("enumerate read-shape too, not just write-shape").
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        media_id:
          title: Media Id
          type: string
        position:
          title: Position
          type: integer
        role:
          enum:
            - main
            - thumbnail
            - logo
            - favicon
            - attachment
            - social_image
            - background_image
            - widget_logo
            - widget_background
            - auth_logo
            - logo_dark
          title: Role
          type: string
        target_id:
          title: Target Id
          type: string
        target_type:
          enum:
            - content_node
            - hub_branding
            - page_section
            - email_message
            - playlist
            - comment
            - discussion
            - message
            - file
          title: Target Type
          type: string
      required:
        - media_id
        - target_type
        - target_id
        - role
        - position
        - created_at
      title: AttachmentAttributes
      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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.