Personas
Create and version simulated user profiles with background, role, and language for testing.
Create a Persona
curl --request POST \
--url 'https://api.amigo.ai/v1/<YOUR-ORG-ID>/simulation/persona/' \
--header 'Authorization: Bearer <AUTH-TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Confused New User",
"role": "patient",
"tags": {"category": "onboarding", "difficulty": "low"},
"initial_version": {
"background": "A 35-year-old first-time user who is unfamiliar with the platform and tends to ask basic questions.",
"preferred_language": "eng"
}
}'Create a simulation persona.
Permissions
Simulation:CreateSimulationPersonafor the persona to create.Simulation:ModifySimulationPersonafor the persona to create.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]The name of the simulation persona.
The role of the simulation persona.
Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization was not found.
A simulation persona with this name already exists.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
The service is going through temporary maintenance.
List Personas
Retrieve simulation personas that match the given filters.
Permissions
This endpoint may be impacted by the following permissions:
- Only simulation personas that the authenticated user has
Simulation:GetSimulationPersonapermission for will be retrieved.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The IDs of the simulation personas to retrieve.
[]The maximum number of simulation personas to return.
50The continuation token from the previous request used to retrieve the next page of simulation personas.
0Whether the simulation persona is deleted.
The roles of the simulation personas.
[]The creators of the simulation personas to retrieve. Each value must be of the format org_id,user_id.
[]The tags of the simulation personas to retrieve. Each value must be of the format key:value. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.
[]The fields to sort the sets by. Supported fields are updated_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.
[]The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
Whether there are more simulation personas to fetch.
The continuation token to use to retrieve the next page of simulation personas.
For each filter that this endpoint supports that can take on dynamic values, this field includes what these values are. This is only provided for the first page in the pagination results.
Note that the values are counted assuming the authenticated user has access to all the simulation personas, so they might differ from how many personas are actually retrieved.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
Search Personas
Search for simulation personas that match the given filters and contain the given query in its name and the background of its latest version. Only the top 50 results will be returned. The results will be sorted by the relevance of the search query.
Permissions
This endpoint may be impacted by the following permissions:
- Only simulation personas that the authenticated user has
Simulation:GetSimulationPersonapermission for will be retrieved.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The query to search for. Any simulation personas containing the terms in its name and the background of its latest version would be returned.
The roles of the simulation personas.
[]The creators of the simulation personas. Each value must be of the format org_id,user_id.
[]The tags of the simulation personas. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.
[]The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
Update a Persona
Update a simulation persona.
Permissions
This endpoint requires the following permissions:
Simulation:ModifySimulationPersonafor the persona to update.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation persona to update
^[a-f0-9]{24}$The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]The tags of the simulation persona. Both the key and the value can only contain alphanumeric characters, underscores, or spaces.
Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation persona does not exist.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
The service is going through temporary maintenance.
No content
Delete a Persona
Delete a simulation persona. This endpoint only soft-deletes the simulation persona so any existing references to it would still be valid. However, they cannot be used in any new simulations.
This endpoint will error if the simulation persona is used in any simulation unit tests.
Permissions
This endpoint requires the following permissions:
Simulation:DeleteSimulationPersonaon the simulation persona to delete.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation persona to delete.
^[a-f0-9]{24}$The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
The specified simulation persona is used in a simulation unit test.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation persona does not exist.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
The service is going through temporary maintenance.
No content
Create a Persona Version
Create a new simulation persona version
Create a new version of the simulation persona.
Permissions
This endpoint requires the following permissions:
Simulation:ModifySimulationPersonafor the simulation persona.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation persona to create a version for.
^[a-f0-9]{24}$The version number of the new version. If specified, this endpoint throws an error if the next version in the database doesn't equal to the value of this parameter.
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]The background of the simulation persona.
The preferred language of the simulation persona in the ISO 639-3 format. If unspecified, the preferred language of the organization is used. If that is unspecified too, the language of the agent is used.
{}A specific type to indicate that a field is not set in the request.
The timezone of the simulation persona in the IANA tz database format. If unspecified, the organization's default timezone is used. If the organization's default timezone is not specified, UTC is used.
{}A specific type to indicate that a field is not set in the request.
A list of strings representing the user models associated with the simulation persona.
Succeeded.
The specified version number is not the expected next version to be created.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation persona does not exist.
Invalid request path parameter, request query parameter, or request body failed validation.
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
The service is going through temporary maintenance.
Get Persona Versions
Get simulation persona versions
Retrieve versions of a simulation persona.
Permissions
This endpoint requires the following permissions:
Simulation:GetSimulationPersonafor the simulation persona.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation persona to get versions for.
^[a-f0-9]{24}$The versions of the simulation persona to retrieve. One can specify an exact version to retrieve, which is either the version number or latest, which retrieves the latest version. Alternatively, one can specify a range of inclusive lower and upper bound for the version number separated by -, and every version within the range would be retrieved.
1The maximum number of simulation persona versions to return.
10The continuation token from the previous request used to retrieve the next page of simulation persona versions.
0The fields to sort the versions by. Supported fields are version. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.
[]The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
Whether there are more simulation persona versions to fetch.
A token to supply to the next request to retreive the next page of simulation persona versions.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation persona does not exist.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
Related
Last updated
Was this helpful?

