---
title: "Create use case with agent"
method: POST
path: "/api/v1/public/usecases/with-agent"
tags: ["public"]
---

# Create use case with agent

`POST /api/v1/public/usecases/with-agent`

Atomically create a workspace-owned use case and its voice agent as one idempotent operation.

## Headers

- `Idempotency-Key` string, required

## Request body

- CompoundUseCaseRequest
  - `name` string, required
  - `description` string, nullable
  - `purpose` string, nullable
  - `direction` 'OUTBOUND' | 'INBOUND' | 'ONE_WAY'
  - `agentName` string, required
  - `agentGender` 'MALE' | 'FEMALE'
  - `voiceId` string, nullable
  - `knowledgeBaseId` string, nullable
  - `integrations` string[]
  - `scheduleEnabled` boolean

## Response `201`

Successful Response

- CompoundUseCaseResult
  - `useCaseId` string, required
  - `useCaseName` string, required
  - `agentId` string, required
  - `agentName` string, required
  - `appUrl` string, required

## Other responses

- `422` — Validation Error

---

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