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

# Create Procedure



## OpenAPI

````yaml post /procedures
openapi: 3.1.0
info:
  version: 1.0.0
  title: Proced AI API
servers: []
security:
  - Bearer: []
paths:
  /procedures:
    post:
      summary: Create Procedure
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProcedureSchema'
      responses:
        '200':
          description: Create procedure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcedureSchema'
        '400':
          description: Returns an error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: disconnected
                  message:
                    type: string
                    example: >-
                      The login details of this item have changed (credentials,
                      MFA, or required user action) and a user login is required
                      to update this information.
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - code
                  - message
                  - requestId
components:
  schemas:
    CreateProcedureSchema:
      type: object
      properties:
        categoryId:
          type: string
          example: cm2uqwcpd002s7xta3b1j8q3p
        doerId:
          type: string
          description: Responsable ID
          example: cm2uj5ffn001x7xtag73jmpx0
        name:
          type: string
          example: New Procedure Title
        projectId:
          type: string
          example: cm2uj5ffn001x7xtag73jmpx0
        priority:
          type: string
          enum:
            - LOW
            - MEDIUM
            - HIGH
          example: MEDIUM
        state:
          type: string
          enum:
            - TODO
            - IN_PROGRESS
            - COMPLETED
            - WAITING
          example: TODO
        dueAt:
          anyOf:
            - type: string
            - type: string
          example: '2024-09-22T22:00:00.000Z'
        content:
          anyOf:
            - type: string
            - {}
            - nullable: true
            - nullable: true
          example: Procedure content goes here.
        generateProcedure:
          type: boolean
          description: generate procedure by content with ai
          example: true
        contentType:
          type: string
          enum:
            - code
            - standard
            - api
            - process
          description: Content type becomes important when generateProcedure is true
          example: standard
        docStyle:
          type: string
          enum:
            - technical
            - simplified
            - detailed
          description: Documentation style becomes important when generateProcedure is true
          example: simplified
        language:
          type: string
          enum:
            - typescript
            - javascript
            - python
            - java
            - csharp
            - other
          description: >-
            Language becomes important when generateProcedure is true,
            especially for code documentation
          example: typescript
      required:
        - categoryId
        - doerId
        - name
        - projectId
        - priority
        - state
        - dueAt
    ProcedureSchema:
      type: object
      properties:
        id:
          type: string
          example: cm0upgshc000rwf5eop1u2awr
        shortId:
          type: string
          nullable: true
          example: cm0upgshc000rwf5eop1u2awr
        name:
          type: string
          example: Proced AI title
        priority:
          type: string
          enum:
            - LOW
            - MEDIUM
            - HIGH
          example: MEDIUM
        state:
          type: string
          enum:
            - TODO
            - IN_PROGRESS
            - COMPLETED
            - WAITING
          example: TODO
        content:
          type: string
          nullable: true
          example: Procedure content goes here.
        categoryId:
          type: string
          nullable: true
          example: cm2uqwcpd002s7xta3b1j8q3p
        doerId:
          type: string
          nullable: true
          example: cm2uj5ffn001x7xtag73jmpx0
        creatorId:
          type: string
          example: cm2uj5ffn001x7xtag73jmpx0
        position:
          type: number
          example: 1
        dueAt:
          type: string
          example: '2024-09-22T22:00:00.000Z'
        createdAt:
          type: string
          example: '2024-09-22T22:00:00.000Z'
        updatedAt:
          type: string
          example: '2024-09-22T22:00:00.000Z'
        projectId:
          type: string
          example: cm2uj5ffn001x7xtag73jmpx0
        workspaceId:
          type: string
          example: cm2uj5ffn001x7xtag73jmpx0
        captureId:
          type: string
          nullable: true
          example: cm2uqwcpd002s7xta3b1j8q3p
        displayVideo:
          type: boolean
          example: true
        isFineTunedData:
          type: boolean
          example: false
        category:
          $ref: '#/components/schemas/CategorySchema'
        doer:
          $ref: '#/components/schemas/UserSchema'
        project:
          $ref: '#/components/schemas/ProjectSchema'
        comments:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ProcedureCommentSchema'
      required:
        - id
        - name
        - priority
        - state
        - creatorId
        - position
        - dueAt
        - createdAt
        - updatedAt
        - projectId
        - workspaceId
        - displayVideo
        - isFineTunedData
    CategorySchema:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
    UserSchema:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
      required:
        - id
        - name
        - email
    ProjectSchema:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
    ProcedureCommentSchema:
      type: object
      properties:
        id:
          type: string
        text:
          type: string
        createdAt:
          type: string
      required:
        - id
        - text
        - createdAt
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````