List Conversations API
How to list all conversations with an Agent
API authorization set up
When on API keys page, scroll down and you will see the Region code and your Project Id.
To generate your Relevance API key, click on "Create new secret key", with the role "Admin". Click on "Generate API key". Copy the values shown on the modal.
- Authorization token
- API key
- Region
- Project
Authorization tokens are formed by combining Project Id:API Key
.
Either directly copy the Authorization token
from the API page or use the
Project id
and API key
combination as shown in the snippet below:
Agent Id
Currently, the easiest way to access Agent Ids is from URLs.
For instance, when on the "Edit agent" page, the last piece after project id and before /edit
shows the Agent Id.
The URL is structured as
https://app.relevanceai.com/agents/{region}/{project_id}/{agent_id}/edit
Conversation Id
Currently, the easiest way to access a conversation Id is from the page URL.
Click on the target conversation. In the URL, the last piece after the Agent id and before ?studioId=
shows the Conversation Id.
The URL is structured as
https://app.relevanceai.com/agents/{region}/{project_id}/{agent_id}/{conversation_id}?studioId=agent_....
API call to list all conversation Ids
The output is a list of dictionaries. All conversation Ids associated with the target agent can be found under the knowledge_set
field.
In the sample below, 041157d4-61bb-4855-8202-cdf8fab7202a
is a conversation that can be used in the next step.
'knowledge_set': '041157d4-61bb-4855-8202-cdf8fab7202a'
API call to list all conversations using the conversation Id(s)
Was this page helpful?