Enable/Disable the Narrative Graph for your character.
Headers
Name
Type
Description
CONVAI-API-KEY*
String
The unique api-key provided for every user. Found under the Key icon when logged into your Convai account.
Request Body
Name
Type
Description
character_id
String
Id of your character.
is_narrative_driven
Bool
Set it to true or false, to enable disable Narrative Graph.
{"STATUS":"Successful"}
{"ERROR":"Invalid API key provided."}
Here are some sample codes to demonstrate the request format for the endpoint -->
import requestsimport jsonurl ="https://api.convai.com/character/toggle-is-narrative-driven"headers ={'CONVAI-API-KEY':'<Your-API-Key>','Content-Type':'application/json'}# Create a dictionary for the JSON payloadpayload ={"character_id":"<Your-Character-Id>","is_narrative_driven":True}# Convert the payload to JSONjson_payload = json.dumps(payload)response = requests.post(url, headers=headers, data=json_payload)print(response.text)
Edit section for your Character. You would send all the fields that you want to update for a section updated_character_data json. Following are the valid key.
"section_name"
"objective"
"decisions": This is a list of json. Each entry in the list should have following format.
Headers
Name
Type
Description
CONVAI-API-KEY*
String
The unique api-key provided for every user. Found under the Key icon when logged into your Convai account.
Request Body
Name
Type
Description
character_id
String
Id of your character.
updated_character_data
Json
Contains fields that are updated.
section_id
String
Id of the section to update.
Here are some sample codes to demonstrate the request format for the endpoint -->