Organization
Create, modify, and delete organizations. Manage user dimensions and branding configuration.
Create an Organization
Set up a new organization in the Amigo system. Specifically, it
- creates a new organization within the Amigo Mongo database with the given details.
- Along with the new organization, 4 default roles are created:
DefaultUserRole.DefaultAdministratorRole.DefaultAmigoAdministratorRole.DefaultSuperAdministratorRole.
- A super user,
admin@amigo.ai, is created and granted theDefaultSuperAdministratorRole.
- Along with the new organization, 4 default roles are created:
- creates a new tenant in Google Identity Platform for users in this organization.
- creates a new Route53 record,
{org_id}.amigo.ai, that hosts the Amigo frontend for this organization. - creates a new domain,
{org_id}.amigo.ai, on Vercel.
The x-mongo-cluster-name header is mandatory for this endpoint.
Permissions
This endpoint requires the following permissions:
Organization:CreateOrganization. for the organization to create.
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.
[]A human friendly name of the organization.
A logo for the organization that will be displayed on the Amigo frontend for this organization, as well as all Amigo communications to users on behalf of the organization. Must be provided as base64 encoded bytes of a PNG image of aspect ratio 5:2 with minimum size 400 * 160 pixels.
A square logo of the organization. Must be provided as base64 encoded bytes of a square PNG image of size at least 40 * 40 pixels.
Favicon for the Amigo frontend for this organization. Must be provided as base64 encoded bytes of a square ICO image that's of size at least 40 * 40 pixels.
The name of the Azure DevOps team to create (if it doesn't exist) for this organization. All orgs with the same Azure DevOps team name will share access to the same Azure DevOps resources, namely the source code for tools.
^[a-z-]+$Succeeded.
ID of the newly created organization. This is used to identify the organization that a resource belongs to in all Amigo endpoints.
The specified organization ID is reserved.
Invalid authorization credentials.
Missing required permissions.
Conflicts with existing organization with the same org_id, or a related operation is in progress.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 5 requests per minute for this endpoint.
The service is going through temporary maintenance.
PUT /v1/{organization}/organization/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
x-mongo-cluster-name: text
Content-Type: application/json
Accept: */*
Content-Length: 386
{
"org_name": "text",
"user_dimensions": [
{
"description": "text",
"tags": [
"text"
]
}
],
"logo": "text",
"square_logo": "text",
"favicon": "text",
"default_user_preferences": {
"enable_response_recommendation": false,
"preferred_language": "aaa",
"conversations_visible_to_admins": true,
"user_model_visible_to_admins": true,
"timezone": "Africa/Abidjan",
"audio_keyterms": [
"text"
]
},
"azure_devops_team_name": "text"
}{
"org_id": "text"
}Get Organization Details
Get the details of an organization.
Permissions
This endpoint may be impacted by the following permissions:
- The
default_user_preferencesfield is only populated if the endpoint is called with user authentication credentials, and the authenticated user has theOrganization:GetOrganizationDetailspermission.
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.
Unique identifier of the organization.
A human friendly name of the organization.
The tenant ID of the organization. This field is only populated if the authenticated user has the Organization:GetOrganizationDetails permission.
The specified organization does not exist.
Invalid request path parameter failed validation.
The service is going through temporary maintenance.
GET /v1/{organization}/organization/ HTTP/1.1
Host: api.amigo.ai
Accept: */*
{
"org_id": "text",
"org_name": "text",
"default_user_preferences": {
"enable_response_recommendation": false,
"preferred_language": "text",
"conversations_visible_to_admins": true,
"user_model_visible_to_admins": true,
"timezone": "text",
"audio_keyterms": [
"text"
]
},
"tenant_id": "text"
}Modify an Organization
Modify elements of an organization.
Permissions
This endpoint requries the following permissions:
Organization:ModifyOrganizationto modify the organization.
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.
[]A logo for the organization that will be displayed on the Amigo frontend for this organization, as well as all Amigo communications to users on behalf of the organization. Must be provided as base64 encoded bytes of a PNG image of aspect ratio 5:2 with minimum size 400 * 160 pixels. Only updated if not null.
A square logo of the organization. Must be provided as base64 encoded bytes of a square PNG image of size at least 40 * 40 pixels. Only updated if not null.
Favicon for the Amigo frontend for this organization. Must be provided as base64 encoded bytes of a square ICO image that's of size at least 40 * 40 pixels. Only updated if not null.
Succeeded.
No content
Invalid authorization credentials.
Missing required permissions.
The specified organization does not exist.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 10 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/organization/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 336
{
"logo": "text",
"square_logo": "text",
"favicon": "text",
"user_dimensions": [
{
"description": "text",
"tags": [
"text"
]
}
],
"default_user_preferences": {
"enable_response_recommendation": false,
"preferred_language": "aaa",
"conversations_visible_to_admins": true,
"user_model_visible_to_admins": true,
"timezone": "Africa/Abidjan",
"audio_keyterms": [
"text"
]
}
}No content
Delete an Organization
Delete an organization. All of the organization's data are erased. Some analytical data will be asynchronously removed at a future date.
Unlike other endpoints, this endpoint is not transactional. If any operation fails during the execution, the endpoint does not revert the performed actions. The caller should re-call this endpoint until it succeeds.
Regardless of whether this endpoint succeeds or not, the first time this endpoint is called, the organization is considered deleted. Even if the endpoint fails and the organization isn't completely wiped, it's considered in an invalid state and any other operations on it may fail.
Permissions
This endpoint requires the following permissions:
Organization:DeleteOrganizationfor the organization 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 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.
No content
The current environment or organization does not support this endpoint.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
A related operation is in progress.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 5 requests per minute for this endpoint.
The service is going through temporary maintenance.
DELETE /v1/{organization}/organization/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
No content
Get User Dimensions
Get the list of user dimensions for the organization.
Permissions
This endpoint requires the following permissions:
Organization:GetOrganizationDetailsfor the current organization.
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.
[]Succeeded.
Invalid authorization credentials.
Missing required permissions.
The organization does not exist.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/organization/user_dimensions/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"user_dimensions": [
{
"description": "text",
"tags": [
"text"
]
}
]
}Related
Last updated
Was this helpful?

