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

# Create content

> Creates a new content in the organization



## OpenAPI

````yaml POST /content
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.patterns.company/v1
security:
  - bearerAuth: []
paths:
  /content:
    post:
      description: Creates a new content in the organization
      requestBody:
        description: Content to add to the organization
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewContent'
        required: true
      responses:
        '200':
          description: content response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewContent:
      required:
        - prospect
        - template
        - language
      type: object
      properties:
        prospect:
          description: Prospect for whom the content is created
          type: string
        template:
          description: Template used for the content
          type: string
        language:
          description: Language of the content
          type: string
        callback:
          description: Callback URL for receiving a notification when content is ready
          type: string
    Content:
      type: object
      properties:
        id:
          description: ID of the content
          type: string
          format: ObjectId
        pattern:
          description: Pattern you neet to pass into the page with a snippet
          type: string
        user:
          description: User who created the content
          type: string
        prospect:
          description: Prospect for whom the content is created
          type: string
        template:
          description: Template used for the content
          type: string
        status:
          description: Status of the content
          type: string
          enum:
            - waiting
            - generating
            - completed
        language:
          description: Language of the content
          type: string
        analytics:
          description: Analytics of the content
          type: array
          items:
            type: object
            properties:
              id:
                description: ID of the analytics item
                type: string
              selector:
                description: CSS selector for the content element
                type: string
              type:
                description: Type of the analytics event
                type: string
                enum:
                  - view
                  - click
                  - duration
        content:
          description: Content of the content
          type: array
          items:
            type: object
            properties:
              selector:
                description: ID of the content
                type: string
              type:
                description: Type of the content
                type: string
                enum:
                  - text
                  - src
                  - href
                  - html
              payload:
                description: Payload of the content
                type: string
        createdAt:
          description: Date and time when the content was created
          type: string
          format: date-time
        updatedAt:
          description: Date and time when the content was last updated
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````