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

# Generate Use Cases

> Generate use cases from source materials using AI. Each input array generates one use case. Supports text, URLs, and generative names as sources.



## OpenAPI

````yaml post /api/v2/use-case/generate
openapi: 3.0.0
info:
  version: 1.0.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/use-case/generate:
    post:
      tags:
        - Use Case
      summary: Generate Use Cases
      description: >-
        Generate use cases from source materials using AI. Each input array
        generates one use case. Supports text, URLs, and generative names as
        sources.
      operationId: generateUseCases
      requestBody:
        description: Use case generation input with source materials
        content:
          application/json:
            schema:
              type: object
              properties:
                primaryOfferingOId:
                  type: string
                  description: >-
                    Primary Offering to use as context when generating use
                    cases. If not provided, the primary company attached to the
                    Workspace will be used.
                  example: o_123456
                brandVoiceOId:
                  type: string
                  description: Brand voice oId to apply to generated use cases
                  example: bv_123456
                linkingStrategy:
                  allOf:
                    - $ref: '#/components/schemas/LinkingStrategy'
                    - description: >-
                        Strategy for linking generated use cases to offerings
                        (products/services)
                useCases:
                  $ref: '#/components/schemas/UseCaseGenerationInputs'
              required:
                - useCases
      responses:
        '200':
          description: Use cases generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        oId:
                          type: string
                          minLength: 1
                          description: The ID of the use case
                          example: uc_1234
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the use case was created
                          example: '2021-01-01'
                        updatedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the use case was updated
                          example: '2021-01-01'
                        deletedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the use case was deleted
                          example: '2021-01-01'
                        archivedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the use case was archived
                          example: '2021-01-01'
                        name:
                          type: string
                          nullable: true
                          description: The name of the use case
                          example: Use Case Name
                        internalName:
                          type: string
                          nullable: true
                          description: The internal name of the use case
                          example: Use Case Internal Name
                        description:
                          type: string
                          nullable: true
                          description: The description of the use case
                          example: Use Case Description
                        primaryUrl:
                          type: string
                          nullable: true
                          description: The primary URL of the use case
                          example: https://www.use-case.com
                        active:
                          type: boolean
                          default: true
                          description: Whether the use case is active and can be used
                          example: true
                        data:
                          $ref: '#/components/schemas/UseCaseData'
                        user:
                          type: object
                          properties:
                            oId:
                              type: string
                              nullable: true
                              description: User OId
                            firstName:
                              type: string
                              nullable: true
                              description: >-
                                The first name of the user who created the use
                                case
                              example: John
                            lastName:
                              type: string
                              nullable: true
                              description: >-
                                The last name of the user who created the use
                                case
                              example: Doe
                        workspace:
                          type: object
                          properties:
                            oId:
                              type: string
                              nullable: true
                              description: Workspace OId
                        scenarios:
                          type: array
                          nullable: true
                          items:
                            type: string
                          description: Scenarios
                        desiredOutcomes:
                          type: array
                          nullable: true
                          items:
                            type: string
                          description: Desired Outcomes
                      required:
                        - oId
                        - createdAt
                        - user
                        - workspace
                required:
                  - _metadata
                  - data
        '400':
          description: Bad request - invalid sources or unable to process
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
        '404':
          description: Offering not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    LinkingStrategy:
      oneOf:
        - $ref: '#/components/schemas/LinkingStrategyAll'
        - $ref: '#/components/schemas/LinkingStrategySpecific'
      discriminator:
        propertyName: mode
        mapping:
          ALL:
            $ref: '#/components/schemas/LinkingStrategyAll'
          SPECIFIC:
            $ref: '#/components/schemas/LinkingStrategySpecific'
      default:
        mode: ALL
      description: Strategy for linking this persona to offerings (products/services)
    UseCaseGenerationInputs:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            description: >-
              Optional name for the use case - if provided, will be used as the
              entity name
            example: Automated Lead Scoring
          sources:
            type: array
            items:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - TEXT
                    - URL
                    - RESOURCE
                  description: The type of source material
                  example: TEXT
                value:
                  type: string
                  minLength: 1
                  description: The source content (text, URL, or name)
                  example: Lead generation and qualification for enterprise sales
              required:
                - type
                - value
            description: Source materials to generate the use case from
        required:
          - sources
      minItems: 1
      description: >-
        Array of use case generation requests - each object generates one use
        case
      example:
        - name: Automated Lead Scoring
          sources:
            - type: TEXT
              value: Automated lead scoring and qualification process for sales teams
        - sources:
            - type: URL
              value: https://example.com/customer-success-story
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
    UseCaseData:
      type: object
      nullable: true
      properties:
        summary:
          type: string
          nullable: true
          description: Summary
        scenarios:
          type: array
          nullable: true
          items:
            type: string
          description: Scenarios
        desiredOutcomes:
          type: array
          nullable: true
          items:
            type: string
          description: Desired Outcomes
        businessDrivers:
          type: array
          nullable: true
          items:
            type: string
          description: Business Drivers
        strategicImpact:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            The strategic, business-level benefit realized when this use case is
            solved well: quantifiable impact on revenue, cost, risk, and/or
            efficiency, and the broader value to the company.
        customFields:
          $ref: '#/components/schemas/CustomDataFields'
        additionalProperties:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
              - type: number
              - type: boolean
    LinkingStrategyAll:
      type: object
      properties:
        mode:
          type: string
          enum:
            - ALL
          description: >-
            Link to all active offerings in the workspace (products, services,
            and solutions)
          example: ALL
      required:
        - mode
    LinkingStrategySpecific:
      type: object
      properties:
        mode:
          type: string
          enum:
            - SPECIFIC
          description: >-
            Link to specific offerings by their IDs (products, services, and
            solutions)
          example: SPECIFIC
        offeringOIds:
          type: array
          items:
            type: string
            minLength: 1
          minItems: 1
          description: >-
            Array of offering IDs to link to (supports product, service, and
            solution oIds)
          example:
            - px_123
            - sc_456
            - sv_789
      required:
        - mode
        - offeringOIds
    CustomDataFields:
      type: array
      items:
        $ref: '#/components/schemas/CustomDataFieldItem'
    CustomDataFieldItem:
      type: object
      properties:
        title:
          type: string
        value:
          type: array
          items:
            type: string
      required:
        - title
        - value
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````