- Dashboard
- Community
- GETReturn the logs for a call
- PATCHSet call as viewed by the user making the request
- GETGets an organization's usage
- GETList Call tags
- PATCHUpdate a note on a call
- GETGet Call
- POSTAdd a note to a call
- GETList Calls
- GETGet Transcript
- PATCHSet call rating
- GETGet Calls
- POSTStop Call
- DELDelete a call
- GETReturn a pre-signed URL to the call recording
- DELDelete a note from a call
- POSTCreate Assistant
- PATCHUpdate Assistant
- DELDelete Assistant
- GETList Assistants
- GETGet Assistant
- PATCHUpdate an existing tool
- GETReturns a list of tools for a use case id
- DELDelete a tool
- POSTCreate a new tool
- GETReturns a list of tools for a use case id
- GETReturns a list of tools for a use case id
- GETGet Campaigns
- POSTCreate batched Outbound Calls
- POSTCreate Outbound Call
- POSTCreate Outbound Call
- GETGet all users for an organization
- POSTCreate a new member for an organization
- GETGet an organization
- DELDelete a member from an organization
- PATCHUpdate a user
- PATCHUpdate an organization
- DELDelete a list of numbers
- GETReturns a list of phone numbers
- DELDelete a phone number
- PATCHUpdate a phone number routes
- POSTBuy a new phone number
- GETReturns a single number
- POSTCreate a new hook
- PATCHUpdate an existing hook
- GETReturns a list of hooks for an assistant id
- DELDelete a hook
- DELDelete a message
- GETReturns a list of samples for an assistant id
- POSTGenerate a list of samples in jsonl format
- GETReturns a sample by id
- POSTAdd a new message
- DELDelete a list of samples
- PATCHUpdate an existing example
- PATCHUpdate an existing message
- POSTCreate a new sample
- POSTDownload a backup of a list of samples
- GETGet Use Case
- POSTCreate a Use Case
- DELDelete Use Case
- GETList Use Cases
- PATCHUpdate Use Case
- POSTCreate a label for Use Case
- DELDelete Use Case's label
- POSTCreate a new agent
- GETReturns a list of agents
- DELDelete an agent
- GETReturns a single agent
- PATCHUpdate an existing agent
- GETReturn the logs for a call
- PATCHSet call as viewed by the user making the request
- GETGets an organization's usage
- GETList Call tags
- PATCHUpdate a note on a call
- GETGet Call
- POSTAdd a note to a call
- POSTCancel Call
- GETGet Transcript
- PATCHSet call rating
- GETList Calls
- POSTStop Call
- DELDelete a call
- GETReturn a pre-signed URL to the call recording
- DELDelete a note from a call
Calls
Assistants
Tools
Dial
Orgs
Numbers
Hooks
Samples
Usecases
Agents
Analytics
Create a new sample
curl --request POST \
--url https://app.happyrobot.ai/api/v1/samples \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '{
"assistant_id": "<string>",
"call_id": "<string>",
"split": "train",
"status": "to_review",
"messages": [
{
"id": "<string>",
"role": "system",
"content": "<string>",
"tool_calls": [
{
"type": "<string>",
"id": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"name": "<string>",
"tool_call_id": "<string>",
"start": 123,
"end": 123,
"interrupted_thoughts": "<string>",
"discard": true
}
]
}'
{
"id": "<string>",
"organization_id": "<string>",
"assistant_id": "<string>",
"call_id": "<string>",
"split": "train",
"created": "<string>",
"status": "to_review",
"messages": [
{
"id": "<string>",
"role": "system",
"content": "<string>",
"tool_calls": [
{
"type": "<string>",
"id": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"name": "<string>",
"tool_call_id": "<string>",
"start": 123,
"end": 123,
"interrupted_thoughts": "<string>",
"discard": true
}
]
}
Headers
Body
train
, test
to_review
, reviewed
, final
Unique identifier for the message.
Role of the message.
system
, assistant
, user
, tool
Content of the message.
Tool calls made by the assistant.
Type of the tool call.
ID of the tool call.
Function to call.
Name of the function to call.
Arguments to pass to the function.
Name of the tool.
ID of the tool call.
Start unix time of the message.
End unix time of the message.
Thoughts that the assistant was going to speak when the user interrupted.
Whether the message should be discarded when generating a dataset.
Response
train
, test
to_review
, reviewed
, final
Unique identifier for the message.
Role of the message.
system
, assistant
, user
, tool
Content of the message.
Tool calls made by the assistant.
Type of the tool call.
ID of the tool call.
Function to call.
Name of the function to call.
Arguments to pass to the function.
Name of the tool.
ID of the tool call.
Start unix time of the message.
End unix time of the message.
Thoughts that the assistant was going to speak when the user interrupted.
Whether the message should be discarded when generating a dataset.
Was this page helpful?
curl --request POST \
--url https://app.happyrobot.ai/api/v1/samples \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '{
"assistant_id": "<string>",
"call_id": "<string>",
"split": "train",
"status": "to_review",
"messages": [
{
"id": "<string>",
"role": "system",
"content": "<string>",
"tool_calls": [
{
"type": "<string>",
"id": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"name": "<string>",
"tool_call_id": "<string>",
"start": 123,
"end": 123,
"interrupted_thoughts": "<string>",
"discard": true
}
]
}'
{
"id": "<string>",
"organization_id": "<string>",
"assistant_id": "<string>",
"call_id": "<string>",
"split": "train",
"created": "<string>",
"status": "to_review",
"messages": [
{
"id": "<string>",
"role": "system",
"content": "<string>",
"tool_calls": [
{
"type": "<string>",
"id": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"name": "<string>",
"tool_call_id": "<string>",
"start": 123,
"end": 123,
"interrupted_thoughts": "<string>",
"discard": true
}
]
}