Metric
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 metric to create a new version for.
^[a-f0-9]{24}$The version number of the new metric version. If specified, this endpoint throws an error if the next version of the metric 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 description of the metric. This tells the LLM what the metric is and how the metric result should be generated.
Succeeded.
Numerical version ID for the version just created. For the first version of a metric, this field will be 1.
The metric value type cannot be changed between versions.
Invalid authorization credentials.
Missing required permissions.
Specified organization or metric is not found.
The next version of the metric in the database doesn't match the specified version.
Invalid request path parameter, request body, or request query parameter failed validation.
The user has exceeded the rate limit of 60 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/metric/{metric_id}/version/ 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: 85
{
"description": "text",
"metric_value": {
"type": "text",
"lower_bound": 1,
"upper_bound": 1
}
}{
"version": 1
}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 metric to retrieve versions for.
^[a-f0-9]{24}$The versions of the metric 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 metric versions to return.
10The continuation token from the previous request used to retrieve the next page of metric 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 metric versions that can be retrieved with further pagination.
The continuation token to be used to retrieve the next page of metric versions. This is only included if has_more is true.
Invalid authorization credentials.
Missing required permissions.
Specified organization or metric is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 60 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/metric/{metric_id}/version HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"metric_versions": [
{
"metric_id": "text",
"version": 1,
"description": "text",
"metric_value": {
"type": "text"
},
"creator": {
"org_id": "text",
"user_id": "text"
},
"created_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"continuation_token": 1
}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 metrics to retrieve.
[]The maximum number of metrics to return.
50The continuation token from the previous request used to retrieve the next page of metrics.
0The IDs of the services that the metric is applied to.
[]Whether the metric is deleted.
falseThe creators of the dynamic behavior sets.
[]The tags of the dynamic behavior sets. 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 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 metrics to retrieve.
The continuation token to use to retrieve the next set of metrics.
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 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/metric/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"metrics": [
{
"id": "text",
"org_id": "text",
"name": "text",
"applied_to_services": [
"text"
],
"additional_notes": "text",
"tags": [
{
"key": "text",
"value": "text"
}
],
"creator": {
"org_id": "text",
"user_id": "text"
},
"updated_by": {
"org_id": "text",
"user_id": "text"
},
"metric_value_type": "boolean",
"is_deleted": true,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"continuation_token": null,
"filter_values": {
"applied_to_services_ids": [
"text"
],
"creators": [
{
"org_id": "text",
"user_id": "text"
}
],
"tags": [
"text"
],
"types": [
"text"
]
}
}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 metric. Must be unique within the organization.
The services that the metric is applied to.
Additional notes about the metric.
Succeeded
The ID of the created metric.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
A metric 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.
POST /v1/{organization}/metric/ 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: 231
{
"name": "text",
"applied_to_services": [
"text"
],
"additional_notes": "text",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"initial_version_metric_value": {
"description": "text",
"metric_value": {
"type": "text",
"lower_bound": 1,
"upper_bound": 1
}
}
}{
"id": "text"
}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 metric 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 services that the metric is applied to. Only updated if set.
Additional notes about the metric. Only updated if set.
{}A specific type to indicate that a field is not set in the request.
Succeeded
Invalid authorization credentials.
Missing required permissions.
Specified organization or metric is not found.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/metric/{metric_id}/ 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: 100
{
"applied_to_services": [
"text"
],
"additional_notes": "text",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}No content
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 metric 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.
[]Succeeded.
Metric is used in a simulation unit test.
Invalid authorization credentials.
Missing required permissions.
Specified organization or metric is not found.
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.
DELETE /v1/{organization}/metric/{metric_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
No content
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 metrics containing the terms in its name would be returned.
The IDs of the services that the metric is applied to.
[]The creators of the metrics. Each value must be of the format org_id,user_id.
[]The tags of the metrics. Must be specified using the syntax key:value, which means to match all metrics 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 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/metric/search/?query=text HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"metrics": [
{
"_id": "text",
"org_id": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"name": "text",
"applied_to_services": [
"text"
],
"additional_notes": "text",
"tags": [
{
"key": "text",
"value": "text"
}
],
"creator": {
"org_id": "text",
"user_id": "text"
},
"updated_by": {
"org_id": "text",
"user_id": "text"
},
"metric_value_type": "boolean",
"is_deleted": true
}
]
}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 IDs of the metrics to evaluate.
The ID of the conversation to evaluate the metrics for.
^[a-f0-9]{24}$If specified, only messages up to (and including) this interaction will be evaluated.
^[a-f0-9]{24}$Succeeded.
The conversation has no interactions.
Invalid authorization credentials.
Missing required permissions.
Specified organization, conversation, or metric is not found.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/metric/evaluate 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: 84
{
"metric_ids": [
"text"
],
"conversation_id": "text",
"evaluate_to_interaction_id": "text"
}{
"metrics": [
{
"metric_id": "text",
"value": 1,
"references": [
"text"
],
"justification": "text"
}
]
}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 maximum number of metrics to return.
500The continuation token from the previous request used to retrieve the next page of metrics.
0An ISO8601 timestamp. Only results evaluated on or after this moment is returned.
An ISO8601 timestamp. Only results evaluated on or before this moment is returned.
The ID of the metric to retrieve.
[]The metric IDs and their versions to retrieve. Each value must be in the format of <metric_id>-<version>. If version is left empty, any versions of the metric would be retrieved.
[]For metric evaluation sources with type post-session or manual, this field filters the metric evaluation results to only include those that were computed from the given conversation IDs.
[]For metric evaluation sources with type simulation, this field filters the metric evaluation results to only include those that were computed from the given simulation unit test set run IDs.
[]The fields to sort the metrics by. Supported fields are created_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 metric evaluation results to retrieve.
The continuation token to use to retrieve the next set of metric evaluation results.
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 10 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/metric/metric_evaluation_result HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"metric_evaluation_results": [
{
"id": "text",
"org_id": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"metric_id": "text",
"metric_version": 1,
"result": 1,
"justification": "text",
"source": {
"type": "post-session",
"conversation_id": "text",
"references": [
"text"
]
}
}
],
"has_more": true,
"continuation_token": null,
"filter_values": {
"metric_ids": [
"text"
]
}
}Last updated
Was this helpful?

