Skip to content

Open (or resume) the current conversation with a role

POST
/open/v1/conversation/start
curl --request POST \
--url https://api.harperharbor.com/open/v1/conversation/start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "roleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "language": "example", "userName": "example", "greetingIndex": 1, "firstPageSize": 0 }'

Opens or resumes the current conversation for the caller and agent. Requires chat.play and agent access. Inserts the selected greeting when creating the conversation, or into an existing conversation that has no messages yet; this endpoint does not call a model. Returns conversationId, defaultRelay (greeting text), historyConversation, roleInfo and xmlV3Compatibility=false. With firstPageSize above 0 (limit 100), a resumed conversation also returns firstPage, the same object as conversation/messages with pageNum=1 and that pageSize; a new conversation returns none. Missing or invalid roleId returns 400. Shareable configurations can be used across application tenants without community review. The conversation, player settings and subsequent charges remain scoped to the calling application and player; the source configuration and its Lorebooks remain in their storage tenant. HarperHarbor advertises responseSettingsVersion=1 for conversation response preferences. Optional capability on services that support account model preferences: When this user first starts a conversation with an agent configuration in this application, the saved account model or lane preference takes priority over the application default, unless a model is already saved for that configuration. If the preferred model or exact lane is no longer selectable or is unavailable, this call saves the application default for that configuration and returns modelPreferenceFallback=true. The account preference is retained for future configurations. Previously opened configurations keep their own model settings.

Media typeapplication/json
object
roleId
required
string format: uuid
language
string
userName
string
greetingIndex
integer
firstPageSize
integer
0 <= 100

Successful response.

Media typeapplication/json
object
conversationId
string format: uuid
defaultRelay
string
historyConversation
boolean
roleInfo
object
roleId
string format: uuid
roleName
string
roleWelcome
string
roleAvatar
string
xmlV3Compatibility
boolean
responseSettingsVersion
integer
Allowed value: 1
firstPage
object
total
integer
size
integer
pages
integer
hasNextPage
boolean
chats
Array<object>
object
chatId
string format: uuid
chatRole
string
Allowed values: USER AI
chatMessage
string
contentThinking
string
isComplete
boolean
isFirst
boolean
model
string
turnStatus
string
operations
Array<object>
object
operationId
string format: uuid
clientOperationId
string
conversationId
string format: uuid
kind
string
Allowed values: send
state
string
Allowed values: accepted generating completed failed_retryable interrupted stopped
version
integer
outputDisposition
string
retryable
boolean
assistantChatId
string format: uuid
sourceChatId
string format: uuid
chargeCredits
integer
settled
boolean
allowedActions
Array<string>
operationStatusAvailable
boolean
schemaVersion
string
responseSettingsVersion
integer
Allowed value: 1
modelPreferenceFallback

Optional capability on services that support account model preferences: true only when this call first starts an agent configuration for this user and saves the application default because the account’s preferred model or exact lane is unavailable or absent from the selectable catalog. The account preference is retained for future configurations. Resuming a previously opened configuration does not reapply the account preference.

boolean
Example
{
"responseSettingsVersion": 1,
"firstPage": {
"chats": [
{
"chatRole": "USER"
}
],
"operations": [
{
"kind": "send",
"state": "accepted"
}
],
"responseSettingsVersion": 1
}
}

Invalid_request

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

Unauthorized

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

Insufficient_scope: requires chat.play

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

Not_found: inaccessible resource

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

Chat_operation_conflict

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

Temporarily_unavailable

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}