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

# Create prompts

> Create one or more prompts in a category. Topics and tags are auto-created if referenced by name and not yet existing. Use dry_run to preview without persisting.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/profound/openapi.documented.yml post /v1/org/categories/{category_id}/prompts
openapi: 3.1.0
info:
  title: External API
  version: 6c43b49565a0c4e7cb023e22242cc3df28ee7153
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security: []
paths:
  /v1/org/categories/{category_id}/prompts:
    post:
      tags:
        - Organization
        - Categories
      summary: Create prompts
      description: >-
        Create one or more prompts in a category. Topics and tags are
        auto-created if referenced by name and not yet existing. Use dry_run to
        preview without persisting.
      operationId: create_category_prompts_v1_org_categories__category_id__prompts_post
      parameters:
        - name: category_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Category Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePromptsBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePromptsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Profound from '@profoundai/client';


            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.organizations.categories.createPrompts(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              {
                prompts: [
                  {
                    language: 'language',
                    platforms: [{}],
                    prompt: 'x',
                    regions: [{}],
                    topic: {},
                  },
                ],
              },
            );


            console.log(response.dry_run);
        - lang: Python
          source: |-
            import os
            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),  # This is the default and can be omitted
            )
            response = client.organizations.categories.create_prompts(
                category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                prompts=[{
                    "language": "language",
                    "platforms": [{}],
                    "prompt": "x",
                    "regions": [{}],
                    "topic": {},
                }],
            )
            print(response.dry_run)
components:
  schemas:
    CreatePromptsBody:
      properties:
        prompts:
          items:
            $ref: '#/components/schemas/CreatePromptInput'
          type: array
          title: Prompts
          description: List of prompts to create.
        dry_run:
          type: boolean
          title: Dry Run
          description: When true, validate and preview changes without persisting them.
          default: false
      type: object
      required:
        - prompts
      title: CreatePromptsBody
    CreatePromptsResponse:
      properties:
        dry_run:
          type: boolean
          title: Dry Run
          description: Whether this was a dry run (no changes persisted).
        created:
          type: integer
          title: Created
          description: Number of prompts created.
          default: 0
        topics_created:
          type: integer
          title: Topics Created
          description: Number of new topics created.
          default: 0
        tags_created:
          type: integer
          title: Tags Created
          description: Number of new tags created.
          default: 0
        prompts:
          items:
            $ref: '#/components/schemas/PromptPreview'
          type: array
          title: Prompts
          description: List of created (or previewed) prompts with resolved references.
          default: []
      type: object
      required:
        - dry_run
      title: CreatePromptsResponse
      description: Response from creating prompts.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreatePromptInput:
      properties:
        prompt:
          type: string
          minLength: 1
          title: Prompt
          description: The prompt text to be sent to AI platforms.
        topic:
          $ref: '#/components/schemas/IdOrName'
          description: Topic to assign. A new topic is created if the name doesn't exist.
        language:
          type: string
          title: Language
          description: Language code (e.g. 'en-US')
        tags:
          items:
            $ref: '#/components/schemas/IdOrName'
          type: array
          title: Tags
          description: Tags to assign. New tags are created if names don't exist.
          default: []
        regions:
          items:
            $ref: '#/components/schemas/IdOrName'
          type: array
          minItems: 1
          title: Regions
          description: Regions where the prompt will be collected.
        platforms:
          items:
            $ref: '#/components/schemas/IdOrName'
          type: array
          minItems: 1
          title: Platforms
          description: AI platforms where the prompt will be collected.
        personas:
          items:
            $ref: '#/components/schemas/IdOrName'
          type: array
          title: Personas
          description: Personas to use when collecting. Omit for default (no persona).
          default: []
        analysis_types:
          anyOf:
            - items:
                type: string
                enum:
                  - visibility
                  - sentiment
                  - sentiment_v2
                  - accuracy
              type: array
            - type: 'null'
          title: Analysis Types
          description: >-
            Analysis types: 'visibility', 'sentiment', 'accuracy'. Defaults to
            ['visibility'].
        prompt_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Type
          description: Deprecated. Use analysis_types instead. 'Visibility' or 'Sentiment'.
          deprecated: true
        asset:
          anyOf:
            - $ref: '#/components/schemas/IdOrName'
            - type: 'null'
          description: Required for Sentiment prompts. The brand asset to evaluate.
      type: object
      required:
        - prompt
        - topic
        - language
        - regions
        - platforms
      title: CreatePromptInput
      description: A single prompt to create within a category.
    PromptPreview:
      properties:
        id:
          type: string
          title: Id
          description: Generated prompt ID.
        prompt:
          type: string
          title: Prompt
          description: The prompt text.
        topic:
          $ref: '#/components/schemas/NamedResource'
          description: Resolved topic.
        language:
          type: string
          title: Language
          description: Language code.
        tags:
          items:
            $ref: '#/components/schemas/NamedResource'
          type: array
          title: Tags
          description: Resolved tags.
          default: []
        regions:
          items:
            $ref: '#/components/schemas/NamedResource'
          type: array
          title: Regions
          description: Resolved regions.
          default: []
        platforms:
          items:
            $ref: '#/components/schemas/NamedResource'
          type: array
          title: Platforms
          description: Resolved platforms.
          default: []
        personas:
          items:
            $ref: '#/components/schemas/NamedResource'
          type: array
          title: Personas
          description: Resolved personas.
          default: []
        analysis_types:
          items:
            type: string
            enum:
              - visibility
              - sentiment
              - sentiment_v2
              - accuracy
          type: array
          title: Analysis Types
          description: Analysis types assigned to this prompt.
          default: []
        asset:
          anyOf:
            - $ref: '#/components/schemas/NamedResource'
            - type: 'null'
          description: Resolved asset, if applicable.
      type: object
      required:
        - id
        - prompt
        - topic
        - language
      title: PromptPreview
      description: Preview of a prompt that was (or would be) created.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    IdOrName:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: UUID of the resource.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name of the resource.
      type: object
      title: IdOrName
      description: |-
        Reference by id, name, or both. Plain strings work too:
        UUIDs become id lookups, other strings become name lookups.
    NamedResource:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: NamedResource
      description: Generic id+name reference used across domain boundaries.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````