latestOpenAPI 3.1.02026-08-221163801019.2 KB

f0f28319e448

Service

Create a service

Create a new service. Depending on whether an active service with the same name already exists, the endpoint behaves differently:

  • If is_active is False, creates an inactive new service.
  • If is_active is True and no active service with the given name exists, creates a new active service.
  • If is_active is True and an active service with the given name exists, this endpoint throws an error.

The new service will automatically contain an edge version set that uses the latest Agent and ServiceHierarchicalStateMachine versions with no LLM model preference. It will also create a release version set, that will equal to what's specified in the request if the release_version_set is specified, or equal to edge if not.

Permissions

This endpoint requires the following permissions:

  • Service:CreateService for the service to create.
  • Service:CreateVersionSet for the edge and release version sets.
post/v1/{organization}/service/

Path parameters

organizationstring required

Headers

x-mongo-cluster-namestring nullable

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 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[]

Request body

service_hierarchical_state_machine_idstring required

The ID of the state machine that this service uses.

agent_idstring required

The ID of the agent that this service uses.

namestring required
descriptionstring required
is_activeboolean required

Whether the newly-created service is active. Only active services are visible to users on the dashboard. You can later adjust the activeness of this service.

keytermsStrippedNonemptyStringAZAZ02[] required

A list of keyterms that are easy to get wrong during audio transcriptions that tend to occur commonly in audio sessions using this service.

tagsobject required

The tags of this service.

Response

Succeeded.

idstring required

The ID of the newly created service.