---
title: "Generate Workspace Use Case Prompt"
method: POST
path: "/api/workspaces/{workspace_id}/usecases/generate-prompt"
---

# Generate Workspace Use Case Prompt

`POST /api/workspaces/{workspace_id}/usecases/generate-prompt`

## Path parameters

- `workspace_id` string, required

## Request body

- UseCasePromptGenerationRequest
  - `description` string, required
  - `useCaseId` string, nullable
  - `sessionId` string, nullable
  - `context` PromptGenerationContext
    - `name` string, nullable
    - `useCaseGoals` string, nullable
    - `conclusion` string, nullable
    - `type` string, nullable

## Response `200`

Successful Response

- UseCasePromptGenerationResponse
  - `prompt` string, required
  - `agentInstructions` string
  - `greeting` string
  - `mainConversationFlow` string
  - `closing` string
  - `objectionHandling` string
  - `guardrails` string
  - `useCaseGoals` string
  - `conclusion` string
  - `promptAiGenerationsUsed` integer, required
  - `generationsRemaining` integer, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-31** `7c9aff2501f3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/outcallerai/apis/fastapi/changes/api/workspaces/:workspace_id/usecases/generate-prompt/post.md)

---

[API](https://skmtc.dev/outcallerai/apis/fastapi.md) · [All operations](https://skmtc.dev/outcallerai/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/outcallerai/fastapi/revisions/6155db644bab/schema)
