POST
/
samples
/
{id}
/
messages
curl --request POST \
  --url https://app.happyrobot.ai/api/v1/samples/{id}/messages \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "index": 123,
  "message": {
    "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
  }
}'
{
  "messageId": "<string>",
  "sample": {
    "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

authorization
string
required

Path Parameters

id
string
required

Body

application/json
index
number
message
object
required

Response

200 - application/json
messageId
string
required
sample
object
required