Card detail
GET
/role/detail
const url = 'https://api.harperharbor.com/open/v1/role/detail?roleId=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.harperharbor.com/open/v1/role/detail?roleId=example' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”roleId
required
string
Responses
Section titled “Responses”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"}