V1/dynamic_behavior_set

Get dynamic behavior sets

get

Retrieve dynamic behavior sets that match the given filters.

Permissions

This endpoint may be impacted by the following permissions:

  • Only dynamic behavior sets that the authenticated user has DynamicBehaviorInstruction:GetDynamicBehaviorInstruction permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The ID of the dynamic behavior set to retrieve.

Default: []
limitinteger · max: 50Optional

The maximum number of dynamic behavior sets to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of dynamic behavior sets.

Default: 0
is_activeany ofOptional

Whether the dynamic behavior set is active.

booleanOptional
or
nullOptional
applied_to_servicestring[]Optional

The IDs of the services that the dynamic behavior set is applied to.

Default: []
creatorstring[]Optional

The creators of the dynamic behavior sets. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

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.

Default: []
sort_bystring[]Optional

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.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
get
GET /v1/{organization}/dynamic_behavior_set/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "dynamic_behavior_sets": [
    {
      "id": "text",
      "name": "text",
      "is_active": true,
      "applied_to_services": [
        "text"
      ],
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "created_at": "2025-06-24T20:30:20.474Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-06-24T20:30:20.474Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1,
  "filter_values": {
    "applied_to_services_ids": [
      "text"
    ],
    "creators": [
      {
        "org_id": "text",
        "user_id": "text"
      }
    ],
    "tags": [
      "text"
    ]
  }
}

Create a dynamic behavior set

post

Create a new dynamic behavior set as well as its initial version.

Permissions

This endpoint requires the following permissions:

  • DynamicBehaviorInstruction:CreateDynamicBehaviorInstruction on the set to create.

  • DynamicBehaviorInstruction:UpdateDynamicBehaviorInstruction on the set to create.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Body
namestring · min: 1Required

The name of the dynamic behavior set.

applied_to_servicesstring[]Required

The services that the dynamic behavior set should be applied to.

Responses
201
Succeeded.
application/json
post
POST /v1/{organization}/dynamic_behavior_set/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 234

{
  "name": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "applied_to_services": [
    "text"
  ],
  "initial_version": {
    "is_active": true,
    "conversation_triggers": [
      "text"
    ],
    "action": {
      "type": "text",
      "instruction": "text",
      "overrides_instructions": true
    }
  }
}
{
  "dynamic_behavior_set_id": "text"
}

Update a dynamic behavior set

post

Update a dynamic behavior set.

Permissions

This endpoint requires the following permissions:

  • DynamicBehaviorInstruction:UpdateDynamicBehaviorInstruction on the dynamic behavior set to update.

Authorizations
Path parameters
organizationstringRequired
dynamic_behavior_set_idstringRequired

The ID of the dynamic behavior set to delete.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Body
nameany ofOptional

The name of the dynamic behavior set.

string · min: 1Optional
or
nullOptional
tagsany ofOptional

The tags of the dynamic behavior set. Both the key and the value can only contain alphanumeric characters, underscores, or spaces.

or
nullOptional
applied_to_servicesany ofOptional

The services that the dynamic behavior set should be applied to.

string[]Optional
or
nullOptional
is_activeany ofOptional

Whether the dynamic behavior set is active.

booleanOptional
or
nullOptional
Responses
204
Succeeded.
post
POST /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "name": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "applied_to_services": [
    "text"
  ],
  "is_active": true
}

No content

Delete a dynamic behavior instruction

delete

Delete a dynamic behavior set.

Permissions

This endpoint requires the following permissions:

  • DynamicBehaviorInstruction:DeleteDynamicBehaviorInstruction on the dynamic behavior set to delete.

Authorizations
Path parameters
organizationstringRequired
dynamic_behavior_set_idstringRequired

The ID of the dynamic behavior set to delete.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
Responseany
delete
DELETE /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Get dynamic behavior set versions

get

Get the versions of a dynamic behavior set.

Permissions

This endpoint requires the following permissions:

  • DynamicBehaviorInstruction:GetDynamicBehaviorInstruction for the dynamic behavior set to retrieve.

Authorizations
Path parameters
organizationstringRequired
dynamic_behavior_set_idstringRequired

The ID of the dynamic behavior set.

Pattern: ^[a-f0-9]{24}$
Query parameters
versionany ofOptional

The versions of the dynamic behavior set 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.

Example: 1
stringOptional
or
nullOptional
limitinteger · min: 1 · max: 10Optional

The maximum number of dynamic behavior set versions to return.

Default: 10
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of dynamic behavior set versions.

Default: 0
sort_bystring[]Optional

The 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.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
get
GET /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "dynamic_behavior_set_versions": [
    {
      "_id": "text",
      "org_id": "text",
      "dynamic_behavior_set_id": "text",
      "version": 1,
      "conversation_triggers": [
        "text"
      ],
      "action": {
        "type": "text",
        "instruction": "text",
        "overrides_instructions": true
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1
}

Create a new version of a dynamic behavior set.

post

Create a new version of the given dynamic behavior set.

Permissions

This endpoint requires the following permissions:

  • DynamicBehaviorInstruction:UpdateDynamicBehaviorInstruction on the dynamic behavior set to create a new version for.

Authorizations
Path parameters
organizationstringRequired
dynamic_behavior_set_idstringRequired

The ID of the dynamic behavior set to delete.

Pattern: ^[a-f0-9]{24}$
Query parameters
versionany ofOptional

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.

integerOptional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Body
conversation_triggersstring[] · min: 1 · max: 50Required

The conversation triggers for the dynamic behavior set version.

Responses
201
Succeeded.
application/json
post
POST /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "conversation_triggers": [
    "text"
  ],
  "action": {
    "type": "text",
    "instruction": "text",
    "overrides_instructions": true
  }
}
{
  "new_version_number": 1
}
get

Search for dynamic behavior sets that match the given filters and contain the given query in its name and the triggers 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 dynamic behavior sets that the authenticated user has DynamicBehaviorInstruction:GetDynamicBehaviorInstruction permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
querystring · min: 1Required

The query to search for. Any sets containing the terms in its name and the triggers of its latest version would be returned.

is_activeany ofOptional

Whether the dynamic behavior set is active.

booleanOptional
or
nullOptional
applied_to_serviceany ofOptional

The IDs of the services that the dynamic behavior set is applied to.

string[]Optional
or
nullOptional
creatorany ofOptional

The creators of the dynamic behavior sets. Each value must be of the format org_id,user_id.

string[]Optional
or
nullOptional
tagany ofOptional

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.

string[]Optional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
get
GET /v1/{organization}/dynamic_behavior_set/search HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "dynamic_behavior_sets": [
    {
      "id": "text",
      "name": "text",
      "is_active": true,
      "applied_to_services": [
        "text"
      ],
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "created_at": "2025-06-24T20:30:20.474Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-06-24T20:30:20.474Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ]
}

Get dynamic behavior invocations

get

Retrieve the dynamic behavior invocations for a dynamic behavior set.

Permissions

This endpoint requires the following permissions:

  • DynamicBehaviorInstruction:GetDynamicBehaviorInstruction for the dynamic behavior set.

This endpoint is impacted by the following permissions:

  • Only invocations from messages that the authenticated user has the Conversation:GetMessage permission for are returned.

Authorizations
Path parameters
organizationstringRequired
dynamic_behavior_set_idstringRequired

The ID of the dynamic behavior set.

Pattern: ^[a-f0-9]{24}$
Query parameters
limitinteger · min: 1 · max: 30Optional

The maximum number of dynamic behavior invocations to return.

Default: 30
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of dynamic behavior invocations.

Default: 0
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are invoked_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-nameany ofOptional

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.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
get
GET /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/invocation/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "dynamic_behavior_invocations": [
    {
      "_id": "text",
      "org_id": "text",
      "conversation_id": "text",
      "service_id": "text",
      "user_id": "text",
      "user_message_id": "text",
      "agent_message_id": "text",
      "agent_inner_thoughts_ids": [
        "text"
      ],
      "dynamic_behavior_set_version_info": [],
      "invoked_at": "2025-06-24T20:30:20.474Z"
    }
  ],
  "has_more": true,
  "continuation_token": 1
}

Was this helpful?