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

# Post v1voiceagents prompts



## OpenAPI

````yaml https://api.comm.com/docs/api.json post /v1/voice/agents/{agent}/prompts
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/voice/agents/{agent}/prompts:
    post:
      tags:
        - AgentPrompts
      operationId: voice.prompts.store
      parameters:
        - name: agent
          in: path
          required: true
          description: The agent ID
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                welcome_message:
                  type: string
                prompt:
                  type:
                    - string
                    - 'null'
                voice_id:
                  type:
                    - string
                    - 'null'
                voice_name:
                  type:
                    - string
                    - 'null'
              required:
                - welcome_message
      responses:
        '201':
          description: '`AgentPromptResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AgentPromptResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    example: ''
                required:
                  - message
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '500':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Failed to create prompt
                    required:
                      - message
                  - type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
components:
  schemas:
    AgentPromptResource:
      type: object
      properties:
        id:
          type: string
        agent_id:
          type: string
        welcome_message:
          type: string
        prompt:
          type:
            - string
            - 'null'
        voice_id:
          type:
            - string
            - 'null'
        voice_name:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - agent_id
        - welcome_message
        - prompt
        - voice_id
        - voice_name
        - created_at
      title: AgentPromptResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````