V1/user
Was this helpful?
Was this helpful?
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.
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.
Retrieve all users in an organization.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
This endpoint is impacted by the following permissions:
Only users that the authenticated user has the User:GetUserInfo
permission for are returned.
Whether the user is verified.
The ID of the user.
The email of the user,
The maximum number of users to retrieve.
600
The token from the previous request to return the next page of users.
0
The fields to sort the users by. Supported fields are first_name
, last_name
, email
, user_stats.num_conversations
, and user_stats.num_messages
. 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.
Delete an user. This endpoint deletes the user from the Amigo system, and also deletes all the user's information as much as possible.
If the user has created an API key, the user's data in Amigo's database are deleted,
except for the User
object, which is marked deleted
. The Google user is deleted as well.
Otherwise the user is completely deleted. Their associated Google user is also deleted.
Permissions
This endpoint requires the following permissions:
User.GetUserInfo
on the authenticated user.
User.DeleteUser
on the user to delete.
The identifier of the user to delete.
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.
Retrieve the external events for the specified user.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
on the authenticated user.
This endpoint may be impacted by the following permissions:
Only external events that the authenticated user has the User:GetExternalEvent
permission on will be returned.
The ID of the user to retrieve external events for.
The IDs of the external events to retrieve.
The maximum number of external events to retrieve.
20
The continuation token returned from the previous response to retrieve the next set of external events.
0
The field to sort the external events by. Supported fields are type
, starts_at
, and ends_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.
Delete an external event.
Permissions
This endpoint requires the following permissions:
User.GetUserInfo
for the authenticated user.
User.DeleteExternalEvent
for this event.
The identifier of the user to create this event for.
The identifier of the external event 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.
No content
Retrieve memories for the specified users.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
on the authenticated user.
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.
The ID of the user to retrieve memories for.
The IDs of the memories to retrieve.
The IDs of the conversations to retrieve memories from.
The maximum number of memories to retrieve.
50
The continuation token returned from the previous response to retrieve the next set of memories.
0
The field to sort the memories by. Supported fields are conversation_id
and timestamp
. 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.
Search users in the organization using their names or emails.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
This endpoint may be impacted by the following permissions:
Only users that the authenticated user has the User:GetUserInfo
permission for will be returned.
The search query. Any users whose name or email contains the query are returned.
Whether the user is verified.
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.
Retrieve the user models for an user.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
User:GetUserModel
for the user to retrieve the user models for.
The ID of the user whose user models to retrieve.
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.
Update information about an user. Only fields that are specified in the request are updated.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
User:UpdateUserInfo
for the user to update.
The identifier of the user to update information for.
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 first name of the user to update. If null
, the first name is not modified.
The last name of the user to update. If null
, the last name is not modified.
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.
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-1 alpha-2 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
).
{}
^\w{2}$
A specific type to indicate that a field is not set in the request.
Whether conversations are visible to the admins. If null
, the preference is not modified.
Whether the user's user model is visible to the admins. If null
, the preference is not modified.
A list of additional context to update. If null
, the context is not modified.
No content
Send a magic link to the user's email to sign in.
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.
An Amigo platform link that the user gets redirected to after clicking the login link.
Email of the user. This must correspond to an existing, verified user in the Amigo platform.
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.GetUserInfo
for the authenticated user.
User.InviteUser
on the user to invite.
The authenticated user must have greater privileges than the role assigned to the new user.
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 first name of the user.
The last name of the user.
The email of the user. This email uniquely identifies the user in the organization.
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.
The role to assign to the user. Only roles that are returned from the Get roles endpoint are allowed.
If specified, the user's preferences will be set to this value instead of the organization default.
Mark the user as verified. It's not permitted to use the Amigo platform with an unverified user account.
Permissions:
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
This endpoint may require the following permissions:
User.UpdateUserInfo
for the requested user if any field in Request
is not None
.
The identifier of the user to verify.
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 first name of the user, if the user has a different preference than what's already indicated during invitation. Only updated if specified.
The last name of the user, if the user has a different preference than what's already indicated during invitation. Only updated if specified.
The preferences of the user, if the user has a different preference than what's already indicated during invitation. Only updated if specified.
No content
Create an external event.
Permissions
This endpoint requires the following permissions:
User.GetUserInfo
for the authenticated user.
User.CreateExternalEvent
for this event.
The identifier of the user to create this event for.
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 type of this event.
The time when this event started in UTC.
The time whent this event ended in UTC.
A description of this event.
The transcript of this event.