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

# Replace File Cards

> Atomically replace the full list of in-video CTA cards for a file.



## OpenAPI

````yaml /openapi/mio-openapi.json put /api/v1/teams/{team_id}/files/{id}/cards
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}/files/{id}/cards:
    put:
      tags:
        - media-admin
      summary: Replace File Cards
      description: Atomically replace the full list of in-video CTA cards for a file.
      operationId: media_admin.put_media_admin_put_teams_by_team_id_files_by_id_cards
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: id
          required: true
          schema:
            title: Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/FileCardsWriteRequest'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FileCardListResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    FileCardsWriteRequest:
      properties:
        data:
          $ref: '#/components/schemas/FileCardsWriteData'
      required:
        - data
      title: FileCardsWriteRequest
      type: object
    FileCardListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/JsonApiResource_FileCardAttributes_'
          title: Data
          type: array
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiPaginationLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - data
      title: FileCardListResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    FileCardsWriteData:
      properties:
        attributes:
          $ref: '#/components/schemas/FileCardsWriteAttributes'
        type:
          const: file_cards
          default: file_cards
          title: Type
          type: string
      required:
        - attributes
      title: FileCardsWriteData
      type: object
    JsonApiResource_FileCardAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/FileCardAttributes'
        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[FileCardAttributes]
      type: object
    JsonApiPaginationLinks:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiPaginationLinks
      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
    FileCardsWriteAttributes:
      additionalProperties: false
      properties:
        cards:
          items:
            $ref: '#/components/schemas/FileCardInput'
          title: Cards
          type: array
      title: FileCardsWriteAttributes
      type: object
    FileCardAttributes:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        label:
          title: Label
          type: string
        position:
          title: Position
          type: integer
        start:
          title: Start
          type: integer
        updated_at:
          format: date-time
          title: Updated At
          type: string
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      required:
        - label
        - start
        - position
        - created_at
        - updated_at
      title: FileCardAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
    FileCardInput:
      additionalProperties: false
      description: One card in a full-list replace request.
      properties:
        description:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          title: Description
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        label:
          maxLength: 160
          minLength: 1
          title: Label
          type: string
        start:
          maximum: 2147483647
          minimum: 0
          title: Start
          type: integer
        url:
          anyOf:
            - maxLength: 2048
              type: string
            - type: 'null'
          title: Url
      required:
        - label
        - start
      title: FileCardInput
      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

````