For the complete documentation index, see llms.txt. This page is also available as Markdown.

User

Get users

get
/v1/{organization}/user/

Retrieve all users in an organization.

Permissions

This endpoint is impacted by the following permissions:

  • Only users that the authenticated user has the User:GetUserInfo permission for are returned.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
Query parameters
user_idstring[]Optional

The ID of the user.

Default: []
emailstring · email[]Optional

The email of the user.

Default: []
limitinteger · max: 100Optional

The maximum number of users to retrieve.

Default: 100
continuation_tokenintegerOptional

The token from the previous request to return the next page of users.

Default: 0
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are first_name, last_name, email, user_stats.num_conversations, user_stats.num_messages, and user_stats.last_message_time. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
has_morebooleanRequired

Whether there are more users to retrieve.

continuation_tokeninteger · nullableRequired

A token to supply to the next request to retrieve the next page of users. Only populated if has_more is True.

get/v1/{organization}/user/

Create a new user

post
/v1/{organization}/user/

Invite a user to the Amigo platform. The endpoint will create a new user in the organization, linked to the supplied email address. The created user will remain in the unverified status and will not have access to most of Amigo's services.

If login_link is not-None, an email containing it will be sent to the user's email with descriptions indicating that this would allow the user to login and start their Amigo experience. Otherwise, no email will be sent.

Permissions

This endpoint requires the following permissions:

  • User:InviteUser on the user to invite.

  • The authenticated user must have greater privileges than the role assigned to the new user.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
first_namestring · min: 1Required

The first name of the user.

last_namestring · min: 1Required

The last name of the user.

emailstring · emailRequired

The email of the user. This email uniquely identifies the user in the organization.

login_linkstring · uri · min: 1 · max: 2083 · nullableOptional

If specified, this link will be sent to the user's email as the link to start their Amigo experience. For Amigo's frontend, this would be the user's organization's login page with their email already filled in.

role_namestringRequired

The role to assign to the user. Only roles that are returned from the Get roles endpoint are allowed.

Responses
201

Succeeded

application/json
user_idstringRequired

The identifier of the new user.

verify_linkstring · nullableRequired

The link sent to the user. Only present if login_link is True in the request.

post/v1/{organization}/user/

Sign in with API key

post
/v1/{organization}/user/signin_with_api_key

Given an organization API key, issue an authorization token for the specified user. The token should then be attached to the Authorization header in subsequent Amigo API calls.

This is an alternative authorization method for users who cannot use the Amigo frontend to login and authenticate.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-api-keystringRequired

The value of the API key.

x-api-key-idstringRequired

The ID of the API key.

x-user-idstringRequired

The ID of the user to sign in as.

x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
id_tokenstringRequired

The ID token that should be attached to the Authorization header for future API calls.

expires_atstring · date-timeRequired

The time at which the token expires.

post/v1/{organization}/user/signin_with_api_key

Sign in with email

post
/v1/{organization}/user/signin

Send a magic link to the user's email to sign in. If the specified email doesn't correspond to an user, the endpoint succeeds silently.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
redirect_linkstring · uri · min: 1Required

An Amigo platform link that the user gets redirected to after clicking the login link.

emailstring · emailRequired

Email of the user. This must correspond to an existing, verified user in the Amigo platform.

Responses
200

Succeeded.

application/json
anyOptional
post/v1/{organization}/user/signin

No content

Update user info

post
/v1/{organization}/user/{requested_user_id}

Update information about an user. Only fields that are specified in the request are updated.

Permissions

This endpoint requires the following permissions:

  • User:UpdateUserInfo for the user to update.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
requested_user_idstringRequired

The identifier of the user to update information for.

organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
first_namestring · min: 1 · nullableOptional

The first name of the user to update. If null, the first name is not modified.

last_namestring · min: 1 · nullableOptional

The last name of the user to update. If null, the last name is not modified.

enable_response_recommendationboolean · nullableOptional

Whether to automatically recommend responses to the user if the user hasn't replied to the coach for a while. If null, the preference is not modified.

preferred_languageany of · nullableOptional

The preferred language for the user. The agent will attempt to converse to the user in this language if set. This field must be in the ISO 639-3 format. If null, erase the user's preferred setting, and the specific language used will be the agent's default spoken language. In order to not update this field, leave it out of the request or set it to an empty object (_NotSet).

Default: {}
string · enum · min: 3 · max: 3OptionalPossible values:
or
object · _NotSetOptional

A specific type to indicate that a field is not set in the request.

timezoneany of · nullableOptional

The user's timezone in the IANA tz database format. If not specified, the organization's timezone is used.

Default: {}
string · enum · min: 1OptionalPossible values:
or
object · _NotSetOptional

A specific type to indicate that a field is not set in the request.

conversations_visible_to_adminsboolean · nullableOptional

Whether conversations are visible to the admins. If null, the preference is not modified.

user_model_visible_to_adminsboolean · nullableOptional

Whether the user's user model is visible to the admins. If null, the preference is not modified.

additional_contextstring[] · nullableOptional

A list of additional context to update. If null, the context is not modified.

audio_keytermsstring[] · max: 20 · nullableOptional

A list of keyterms that are easy to get wrong during audio transcriptions that tend to occur commonly in audio sessions using this service. If null, the keyterms are not modified.

Responses
204

Succeeded.

No content

post/v1/{organization}/user/{requested_user_id}

No content

Delete an user

delete
/v1/{organization}/user/{requested_user_id}

Delete an user. This endpoint deletes the user from the Amigo system.

Permissions

This endpoint requires the following permissions:

  • User.DeleteUser on the user to delete.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
requested_user_idstringRequired

The identifier of the user to delete.

organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
204

Succeeded.

No content

delete/v1/{organization}/user/{requested_user_id}

No content

Get user model

get
/v1/{organization}/user/{user_id}/user_model

Retrieve the user models for an user.

Permissions

This endpoint requires the following permissions:

  • User:GetUserModel for the user to retrieve the user models for.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
user_idstringRequired

The ID of the user whose user models to retrieve.

Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
additional_contextstring[]Required

The additional context for the user.

get/v1/{organization}/user/{user_id}/user_model

Get memories

get
/v1/{organization}/user/{user_id}/memory

Retrieve memories for the specified users.

Permissions

This endpoint may be impacted by the following permissions:

  • Only memories with references that the authenticated user has the Conversation:GetMessage permission on will be returned.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
user_idstringRequired

The ID of the user to retrieve memories for.

Query parameters
idstring[]Optional

The IDs of the memories to retrieve.

Default: []
conversation_idstring[]Optional

The IDs of the conversations to retrieve memories from.

Default: []
limitinteger · max: 50Optional

The maximum number of memories to retrieve.

Default: 50
continuation_tokenintegerOptional

The token from the previous request to return the next page of memories.

Default: 0
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are conversation_id and created_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
has_morebooleanRequired

Whether there are more memories to retrieve.

continuation_tokeninteger · nullableRequired

A token to supply to the next request to retrieve the next page of memories. Only populated if has_more is True.

get/v1/{organization}/user/{user_id}/memory
get
/v1/{organization}/user/search/

Search users in the organization using their names or emails.

Permissions

This endpoint may be impacted by the following permissions:

  • Only users that the authenticated user has the User:GetUserInfo permission for will be returned.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
Query parameters
querystringRequired

The search query. Any users whose name or email contains the query are returned.

user_idstring[]Optional

The IDs of the users.

Default: []
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
get/v1/{organization}/user/search/

Modify the variables of an user

post
/v1/{organization}/user/{requested_user_id}/variable

Upsert or delete the user's variables. These changes are only reflected in tool invocations that are not yet made.

Permissions

This endpoint requires the following permissions:

  • User:UpdateUserInfo for the user to modify variables for.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
requested_user_idstringRequired

The identifier of the user to update information for.

Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
204

Succeeded.

No content

post/v1/{organization}/user/{requested_user_id}/variable

No content

Last updated

Was this helpful?