> ## 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 Avatar Upload



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/portal/hubs/{hub_id}/me/avatar/{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/portal/hubs/{hub_id}/me/avatar/{file_id}/finalize:
    post:
      tags:
        - community-avatar-upload
      summary: Finalize Avatar Upload
      operationId: >-
        community_avatar_upload.post_community_avatar_upload_post_portal_hubs_by_hub_id_me_avatar_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_CommunityProfileResponseAttributes_
          description: Successful Response
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            `errors[0].code == 'membership_denied'` — contact is banned or
            soft-banned from this hub.
          x-error-codes:
            - membership_denied
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            `errors[0].code` is one of: `hub_not_found` — no hub matches the
            path id; `not_a_member` — contact has no membership in this hub; or
            `profile_not_found` — the contact's community profile does not exist
            yet (profiles are auto-created on hub join, so this indicates an
            inconsistent state, not a normal flow).
          x-error-codes:
            - hub_not_found
            - not_a_member
            - profile_not_found
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Error response; see `errors[0].code` where present.
          x-error-codes:
            - invalid_avatar_file
            - not_an_image
            - upload_not_found
            - content_length_unknown
            - invalid_image_content
            - file_too_large
            - quota_exceeded
            - avatar_copy_failed
            - finalize_failed
      security:
        - HTTPBearer: []
components:
  schemas:
    JsonApiResponse_CommunityProfileResponseAttributes_:
      properties:
        data:
          $ref: >-
            #/components/schemas/JsonApiResource_CommunityProfileResponseAttributes_
        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[CommunityProfileResponseAttributes]
      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
    JsonApiResource_CommunityProfileResponseAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/CommunityProfileResponseAttributes'
        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[CommunityProfileResponseAttributes]
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      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
    CommunityProfileResponseAttributes:
      properties:
        avatar_file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar File Id
        banner_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Banner Color
        banner_file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Banner File Id
        banner_scheme:
          anyOf:
            - enum:
                - split
                - complementary
                - analogous
                - triadic
                - monochrome
                - warm
              type: string
            - type: 'null'
          title: Banner Scheme
        banner_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Banner Url
        banner_url_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Banner Url Expires At
        banner_variant:
          anyOf:
            - enum:
                - gradient
                - image
              type: string
            - type: 'null'
          title: Banner Variant
        bio:
          anyOf:
            - type: string
            - type: 'null'
          title: Bio
        contact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        hide_activity:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hide Activity
        hide_profile:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hide Profile
        hub_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Hub Id
        photo_thumbnail_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo Thumbnail Url
        photo_thumbnail_url_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Photo Thumbnail Url Expires At
        photo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo Url
        photo_url_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Photo Url Expires At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      title: CommunityProfileResponseAttributes
      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

````