Skip to content
Get an API key

API reference

Create a conversation.

POST
/conversations
curl --request POST \
--url https://api.helping.io/v1/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "id": "example" } ], "metadata": {} }'

Both fields are optional: an empty body gives you an empty conversation. items seeds it with up to 20 items, which the next response on this conversation will see as context.

The conversation to create.

Media typeapplication/json

Create a conversation.

Both fields are optional: POST /v1/conversations with an empty body is a valid call and gives you an empty conversation.

object
items

Items to seed the conversation with, up to 20.

Seeded items become part of the conversation’s context: the next response on this conversation sees them.

Array | null
Any of:
One of:

An input item, discriminated by type.

object
One of:

A message item, discriminated by role.

object
content
required
One of:
string
id
string | null
status
string | null
role
required
string
Allowed values: user
type
required
string
Allowed values: message
metadata

Labels to attach: up to 16 pairs, keys up to 64 characters, values up to 512.

object

The conversation.

Media typeapplication/json

A conversation.

OpenAI requires all four fields, so none of them is optional here and none is skipped when empty. metadata in particular: a conversation with no labels answers with {}, never with the field absent.

object
created_at
required

When the conversation was created, in seconds since the Unix epoch.

integer format: int64
id
required

The conversation’s opaque id, conv_....

string
metadata
required

The customer’s own labels on this conversation.

object
object
required

Always conversation.

string
Examplegenerated
{
"created_at": 1,
"id": "example",
"metadata": {},
"object": "example"
}

Metadata outside the documented limits, or more than 20 items (the error envelope)

Missing or invalid API key (the error envelope)

The key is not entitled to what the request asked for (the error envelope)

The Idempotency-Key was already used and its result cannot be returned for this request, or its first request is still being processed (the error envelope)

This organization has exhausted its allowance; retry after the Retry-After header.

The request could not be completed; quote the x-request-id response header when reporting it.

The request could not be served this instant; retry after the Retry-After header.