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

# Create Collection Endpoint



## OpenAPI

````yaml /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/collections
openapi: 3.1.0
info:
  title: Depict Portal API
  version: 1.0.0
  description: >-
    REST API behind the Depict merchant portal: merchants, products,
    collections, curation, metrics, analytics and search insights. All endpoints
    require an Auth0-issued bearer token.
servers:
  - url: ''
security: []
paths:
  /api/v1/merchants/{merchant_id}/collections:
    post:
      tags:
        - Collections
      summary: Create Collection Endpoint
      operationId: >-
        create_collection_endpoint_api_v1_merchants__merchant_id__collections_post
      parameters:
        - name: merchant_id
          in: path
          required: true
          schema:
            type: string
            title: Merchant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionCreateResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Auth0: []
components:
  schemas:
    CollectionCreateRequest:
      properties:
        collection_type:
          $ref: '#/components/schemas/CollectionType'
        title:
          type: string
          maxLength: 512
          minLength: 1
          title: Title
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        show_in_filter:
          type: boolean
          title: Show In Filter
          default: true
        show_in_search_suggestions:
          type: boolean
          title: Show In Search Suggestions
          default: false
        appear_in_quicklinks:
          type: boolean
          title: Appear In Quicklinks
          default: true
        display_breadcrumb:
          type: boolean
          title: Display Breadcrumb
          default: true
        cover_image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cover Image Url
      additionalProperties: false
      type: object
      required:
        - collection_type
        - title
      title: CollectionCreateRequest
    CollectionCreateResponse:
      properties:
        collection_id:
          type: string
          format: uuid
          title: Collection Id
      type: object
      required:
        - collection_id
      title: CollectionCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CollectionType:
      type: string
      enum:
        - long_tail_collection
        - campaign
        - category
        - smart_pick
        - style
        - brand
        - look
      title: CollectionType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Auth0:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            openid: OpenID Connect
            profile: User profile
            email: User email
          authorizationUrl: https://depictai.eu.auth0.com/oauth/authorize
          tokenUrl: https://depictai.eu.auth0.com/oauth/token
      x-tokenName: id_token

````