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

# Create Analytic API Endpoint

> This API endpoint allows a user to create an analytic record.



## OpenAPI

````yaml post /api/analytic/create/
openapi: 3.0.1
info:
  title: ClipVision API
  description: ClipVision AI API
  termsOfService: https://www.clipvision.ai/terms/
  contact:
    email: help@clipvision.ai
  license:
    name: ClipVision License
  version: v1
servers:
  - url: https://backend.clipvision.ai/
security:
  - Basic: []
  - api_key: []
paths:
  /api/analytic/create/:
    post:
      tags:
        - api
      summary: Create Analytic API Endpoint
      description: This API endpoint allows a user to create an analytic record.
      operationId: create_analytic
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticCreation'
        required: true
      responses:
        '201':
          description: Analytic successfully created
          content:
            application/json:
              schema:
                title: Analytic
                type: object
                properties:
                  analytic_id:
                    type: integer
                  disabled:
                    type: boolean
                  channel_id:
                    type: integer
                  total_views:
                    type: integer
                  total_subs:
                    type: integer
                  add_date:
                    type: string
                    format: date
                description: Analytic OpenAPI Schema
              example:
                analytic_id: 1
                disabled: false
                channel_id: 1
                total_views: 100
                total_subs: 100
                add_date: '2024-03-17T00:00:00.000Z'
        '400':
          description: Failed to create analytic or validation errors
          content:
            application/json:
              schema:
                title: Failed Analytic OpenAPI Schema
                type: object
                properties:
                  channel_id:
                    type: array
                    items:
                      type: integer
                  total_views:
                    type: array
                    items:
                      type: integer
                  total_subs:
                    type: array
                    items:
                      type: integer
        '500':
          description: Failed to create analytic
          content:
            application/json:
              schema:
                title: Internal Server Error
                type: object
                properties:
                  success:
                    type: boolean
                    default: false
                  error:
                    type: string
                    default: Internal Server Error
                description: Internal Server Error OpenAPI Schema
              example:
                success: false
                error: Internal Server Error
components:
  schemas:
    AnalyticCreation:
      required:
        - channel_id
        - total_subs
        - total_views
      type: object
      properties:
        channel_id:
          title: Channel id
          type: integer
        total_views:
          title: Total views
          type: integer
        total_subs:
          title: Total subs
          type: integer
  securitySchemes:
    Basic:
      type: http
      scheme: basic
    api_key:
      type: apiKey
      name: User-JWT
      in: header

````