Skip to content

Card detail

GET
/role/detail
curl --request GET \
--url 'https://api.harperharbor.com/open/v1/role/detail?roleId=example' \
--header 'Authorization: Bearer <token>'
roleId
required
string

Card.

Media typeapplication/json

Card details, including character greetings in welcomeAlternates and suggested player lines in prologue.

object
roleId
string
roleName
string
roleDesc
string
roleWelcome

The character’s first message.

string
welcomeAlternates

Alternate first messages from the character. Let the player pick one, then send greetingIndex to /conversation/start (0 = roleWelcome).

Array<string>
prologue

Suggested first lines for the player to say. Fill the input box; never pass to /conversation/start.

Array<string>
key
additional properties
any
Examplegenerated
{
"roleId": "example",
"roleName": "example",
"roleDesc": "example",
"roleWelcome": "example",
"welcomeAlternates": [
"example"
],
"prologue": [
"example"
]
}

Not found.

Media typeapplication/json
object
error
required

Machine-readable code. unauthorized means authentication failed. Refresh the token; if refresh fails, request authorization again.

string
message
required

One English sentence a client may show verbatim.

string
retryable
boolean
detail

Present on some 4xx errors with the offending part.

object
key
additional properties
any
Example
{
"error": "unauthorized"
}