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

# Post apiv1campaignsgenerate channel prompt



## OpenAPI

````yaml https://backend.aflux.ai/openapi post /api/v1/campaigns/generate-channel-prompt
openapi: 3.0.3
info:
  title: AdFlux Backend API
  version: v1
servers:
  - url: /
security: []
tags:
  - name: auth
  - name: users
  - name: uploads
  - name: projects
  - name: campaigns
  - name: placements
  - name: billing
  - name: payments
  - name: image-generations
paths:
  /api/v1/campaigns/generate-channel-prompt:
    post:
      tags:
        - campaigns
      operationId: campaignsGenerateChannelPrompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateChannelPromptRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateChannelPromptResponse'
        default:
          $ref: '#/components/responses/DefaultError'
      security:
        - Bearer: []
components:
  schemas:
    GenerateChannelPromptRequest:
      type: object
      required:
        - projectId
        - adCopy
      properties:
        projectId:
          type: string
          format: uuid
        adCopy:
          type: string
          minLength: 1
          maxLength: 8000
          description: >-
            The ad text, markup and all, used only as material for writing the
            channel-search prompt. Same cap as everywhere else the ad text is
            accepted, so a text the editor considers valid can never be refused
            by a request-size rule on one endpoint and not another.
        objective:
          $ref: '#/components/schemas/CampaignObjective'
          nullable: true
    GenerateChannelPromptResponse:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          maxLength: 300
          description: >-
            A ready-to-edit channel search request written on the advertiser's
            behalf, in the same language as the ad copy: what the ideal channels
            post about, who reads them, how big they should be and what language
            they publish in. Meant to be dropped straight into the prompt field
            of match-channels-by-prompt, so it is capped at 300 characters — a
            search box, not a brief.
    CampaignObjective:
      type: string
      enum:
        - AWARENESS
        - TRAFFIC
        - CONVERSIONS
        - APP_INSTALLS
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    DefaultError:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````