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

# Finalize Attachment Upload



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/hub/{hub_id}/attachment-uploads/{file_id}/finalize
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/hub/{hub_id}/attachment-uploads/{file_id}/finalize:
    post:
      tags:
        - community-attachment-upload
      summary: Finalize Attachment Upload
      operationId: >-
        community_attachment_upload.post_community_attachment_upload_post_hub_by_hub_id_attachment_uploads_by_file_id_finalize
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: file_id
          required: true
          schema:
            title: File Id
            type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: >-
                  #/components/schemas/JsonApiResponse_AttachmentFinalizeAttributes_
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    JsonApiResponse_AttachmentFinalizeAttributes_:
      properties:
        data:
          $ref: '#/components/schemas/JsonApiResource_AttachmentFinalizeAttributes_'
        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: JsonApiResponse[AttachmentFinalizeAttributes]
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    JsonApiResource_AttachmentFinalizeAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/AttachmentFinalizeAttributes'
        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[AttachmentFinalizeAttributes]
      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
    AttachmentFinalizeAttributes:
      additionalProperties: false
      description: >-
        Response attributes for a finalized attachment upload (B4).


        Carries the render metadata the composer needs to display the attachment

        inline. ``url``/``thumbnail_url`` enrichment is deferred to Task B6
        (signed

        URL derivation); this response returns the durable media facts only.
      properties:
        asset_kind:
          title: Asset Kind
          type: string
        file_id:
          title: File Id
          type: string
        filename:
          title: Filename
          type: string
        media_id:
          title: Media Id
          type: string
        mime_type:
          title: Mime Type
          type: string
        size_bytes:
          title: Size Bytes
          type: integer
        status_upload:
          title: Status Upload
          type: string
      required:
        - file_id
        - media_id
        - status_upload
        - mime_type
        - asset_kind
        - filename
        - size_bytes
      title: AttachmentFinalizeAttributes
      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

````