PATCH
/
use-cases
/
{id}
curl --request PATCH \
  --url https://app.happyrobot.ai/api/v1/use-cases/{id} \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "name": "Carrier Sales",
  "transfer_number": "<string>",
  "extract_with_ai": [
    {
      "name": "<string>",
      "description": "<string>",
      "type": "string",
      "example": "<string>",
      "required": true
    }
  ],
  "classification_tags": [
    {
      "name": "<string>",
      "description": "<string>"
    }
  ],
  "language": "en-US",
  "keywords": [
    "<string>"
  ],
  "hook": {
    "url": "<string>",
    "headers": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ]
  },
  "params": {},
  "amd": true,
  "amd_behavior": "Hangup",
  "amd_messages": {},
  "timezone": "<string>",
  "work_start": "<string>",
  "work_end": "<string>",
  "hidden": true
}'
{
  "id": "<string>",
  "organization_id": "<string>",
  "name": "Kate",
  "transfer_number": "<string>",
  "extract_with_ai": [
    {
      "name": "<string>",
      "description": "<string>",
      "type": "string",
      "example": "<string>",
      "required": true
    }
  ],
  "classification_tags": [
    {
      "name": "<string>",
      "description": "<string>"
    }
  ],
  "language": "en-US",
  "work_start": "<string>",
  "work_end": "<string>",
  "timezone": "<string>",
  "keywords": [
    "<string>"
  ],
  "hook": {
    "url": "<string>",
    "headers": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ]
  },
  "params": {},
  "amd": true,
  "amd_behavior": "Hangup",
  "amd_messages": {},
  "sample_labels": [
    {
      "name": "<string>",
      "color": "slate"
    }
  ],
  "hidden": true,
  "evaluation_models": [
    "<string>"
  ]
}

Headers

authorization
string
required

Your API key for authentication. Use Bearer format.

Path Parameters

id
string
required

ID of the use case.

Body

application/json
name
string

Name of the use case.

transfer_number
string

Fallback phone number to transfer the call to if something breaks.

extract_with_ai
object[]

Parameters to extract with AI.

classification_tags
object[]

Classification tags for the use case.

language
enum<string>

Preferred language for the use case.

Available options:
en-US,
es-MX,
es-ES,
in-IN
keywords
string[]

Keywords you want the transcriber to know about.

hook
object | null

Webhook to call when the use case is executed.

params
object

Parameters to pass to the use case.

amd
boolean

Enable automatic machine detection. This is a prerequisite to end calls on machines or for Phone Tree Navigation.

amd_behavior
enum<string>

AI assistant behavior when AMD is enabled. Continue is used for Phone Tree Navigation, Hangup to end the call and Message to leave a message. If amd is set, this field is required.

Available options:
Hangup,
Continue,
Message
amd_messages
object

Record of messages to leave on voicemail if amd_behavior is set to Message. You may use parameters as you do in the prompt for templating. The key is the language of the message and the value is the message.

timezone
string

Timezone of the use case.

work_start
string

Start of the work hours.

work_end
string

End of the work hours.

hidden
boolean

Hide the use case from the UI.

Response

200 - application/json
id
string
required

ID of the use case.

organization_id
string
required

ID of the organization that owns the use case.

name
string

Name of the use case.

transfer_number
string

Fallback phone number to transfer the call to if something breaks.

extract_with_ai
object[]

Parameters to extract with AI.

classification_tags
object[]

Classification tags for the use case.

language
enum<string>
default: en-US

Preferred language for the use case.

Available options:
en-US,
es-MX,
es-ES,
in-IN
work_start
string

Start of the work hours.

work_end
string

End of the work hours.

timezone
string

Timezone of the use case.

keywords
string[]

Keywords you want the transcriber to know about.

hook
object | null

Webhook to call when the use case is executed.

params
object

Parameters to pass to the use case.

amd
boolean

Enable automatic machine detection. This is a prerequisite to end calls on machines or for Phone Tree Navigation.

amd_behavior
enum<string>

AI assistant behavior when AMD is enabled. Continue is used for Phone Tree Navigation, Hangup to end the call and Message to leave a message. If amd is set, this field is required.

Available options:
Hangup,
Continue,
Message
amd_messages
object

Record of messages to leave on voicemail if amd_behavior is set to Message. You may use parameters as you do in the prompt for templating. The key is the language of the message and the value is the message.

sample_labels
object[]

Available labels for the samples.

hidden
boolean

Hide the use case from the UI.

evaluation_models
string[]

Models the use case is evaluated on.