> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semicola.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a material (text or link) or run a library action



## OpenAPI

````yaml /openapi/storefront.yaml post /api/v2/storefront/materials
openapi: 3.1.0
info:
  title: Semicola Exchange storefront API
  version: 2.0.0
  description: >-
    Seller (storefront) endpoints: storefront setup, inventory sources,
    products, AI Business Rules, playbook, demand inbox, proposals, approvals
    and seller reporting.
servers:
  - url: https://api.semicola.com
security:
  - bearerAuth: []
  - sessionCookie: []
tags:
  - name: Storefront
  - name: Inventory Sources
  - name: Products
  - name: Business Rules
  - name: Playbook
  - name: Library
  - name: Demand Inbox
  - name: Proposals
  - name: Approvals
  - name: Creative Reviews
  - name: Media Buys
  - name: Buyers
  - name: Reporting
  - name: Activity
  - name: Test Runs
paths:
  /api/v2/storefront/materials:
    post:
      tags:
        - Library
      summary: Add a material (text or link) or run a library action
      operationId: postStorefrontMaterials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                materialId:
                  type: string
                kind:
                  type: string
                  enum:
                    - media_kit
                    - rate_card
                    - deck
                    - past_rfp
                    - note
                    - url
                title:
                  type: string
                  minLength: 1
                  maxLength: 200
                text:
                  type: string
                  maxLength: 200000
                assetRef:
                  type: string
                url:
                  type: string
                  format: uri
                action:
                  type: string
                  enum:
                    - mark_reusable
                    - confirm_claim
                    - withdraw_claim
                    - add_claim
                    - open_request
                    - close_request
                    - evaluate
                sellingPointId:
                  type: string
                claim:
                  type: string
                  minLength: 3
                  maxLength: 500
                evidence:
                  type: string
                  maxLength: 2000
                requestId:
                  type: string
                requestDetail:
                  type: string
                  maxLength: 2000
                confirm:
                  type: boolean
                confirmationUid:
                  type: string
                  minLength: 5
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - type: object
                        properties:
                          material:
                            anyOf:
                              - type: object
                                properties:
                                  materialId:
                                    type: string
                                  kind:
                                    type: string
                                    enum:
                                      - media_kit
                                      - rate_card
                                      - deck
                                      - past_rfp
                                      - note
                                      - url
                                  title:
                                    type: string
                                  status:
                                    type: string
                                    enum:
                                      - pending
                                      - scanning
                                      - planning
                                      - processing
                                      - needs_review
                                      - completed
                                      - failed
                                  reusable:
                                    type: boolean
                                  sellingPointCount:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  createdAt:
                                    type: string
                                    format: date-time
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                required:
                                  - materialId
                                  - kind
                                  - title
                                  - status
                                  - reusable
                                  - sellingPointCount
                                  - createdAt
                                additionalProperties: false
                              - type: 'null'
                          sellingPoints:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                claim:
                                  type: string
                                evidence:
                                  type:
                                    - string
                                    - 'null'
                                status:
                                  type: string
                                  enum:
                                    - backed
                                    - not_backed
                                    - not_checked
                                    - withdrawn
                                materialId:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - claim
                                - evidence
                                - status
                                - materialId
                              additionalProperties: false
                          evaluation:
                            type: object
                            properties:
                              rfpId:
                                type: string
                              turnId:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - rfpId
                              - turnId
                            additionalProperties: false
                          requests:
                            type: array
                            items:
                              type: object
                              properties:
                                requestId:
                                  type: string
                                title:
                                  type: string
                                detail:
                                  type:
                                    - string
                                    - 'null'
                                status:
                                  type: string
                                  enum:
                                    - open
                                    - closed
                                openedBy:
                                  type: string
                                  enum:
                                    - agent
                                    - seller
                                createdAt:
                                  type: string
                                  format: date-time
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                closedAt:
                                  anyOf:
                                    - type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                    - type: 'null'
                              required:
                                - requestId
                                - title
                                - detail
                                - status
                                - openedBy
                                - createdAt
                                - closedAt
                              additionalProperties: false
                        required:
                          - material
                          - sellingPoints
                        additionalProperties: false
                      - type: 'null'
                  error:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          field:
                            type: string
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                      - type: 'null'
                required:
                  - data
                  - error
                additionalProperties: false
        default:
          description: >-
            Error envelope `{data: null, error: {code, message, field?,
            details?}}`.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or OAuth access token.
    sessionCookie:
      type: apiKey
      in: cookie
      name: sc_session

````