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

# Create Prompt

> Creates a new broadcast prompt with the provided details



## OpenAPI

````yaml POST /public-api/prompts
openapi: 3.0.0
info:
  title: Agents Public API
  version: '1.0'
  description: REST API for managing contacts, campaigns, and conversations
  termsOfService: https://agents.nineteen58.co.za/terms
  contact:
    name: API Support
    url: https://agents.nineteen58.co.za/support
    email: support@nineteen58.co.za
servers:
  - url: https://agents.nineteen58.co.za
    description: Production server
security:
  - apiKeyAuth: []
tags: []
paths:
  /public-api/prompts:
    post:
      tags:
        - Prompts
      summary: Create a new broadcast prompt
      description: Creates a new broadcast prompt with the provided details
      operationId: postpublicapiprompts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - prompt
              properties:
                name:
                  type: string
                  description: Name of the prompt
                prompt:
                  type: string
                  description: The prompt content
                agent_id:
                  type: string
                  format: uuid
                  description: Associated agent ID
                is_global:
                  type: boolean
                  description: Whether the prompt is global
                goal:
                  type: string
                  description: Goal of the prompt
                flow:
                  type: string
                  description: Flow description
                tool_use_rules:
                  type: string
                  description: Rules for tool usage
                background:
                  type: string
                  description: Background information
                persona:
                  type: string
                  description: Persona description
                outcomes_json:
                  type: object
                  description: JSON structured outcomes
                example_conversation:
                  type: string
                  description: Example conversation
                outcomes:
                  type: string
                  description: Expected outcomes
      responses:
        '201':
          description: Prompt created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompt:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                      name:
                        type: string
                      prompt:
                        type: string
                      agent_id:
                        type: string
                        format: uuid
                      is_global:
                        type: boolean
                      goal:
                        type: string
                      flow:
                        type: string
                      tool_use_rules:
                        type: string
                      background:
                        type: string
                      persona:
                        type: string
                      outcomes_json:
                        type: object
                      example_conversation:
                        type: string
                      outcomes:
                        type: string
        '400':
          description: Bad request - Invalid input
        '401':
          description: Unauthorized - Invalid or missing API key
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````