Saltar al contenido principal
POST
/
v1
/
agent-template
/
{template_id}
/
apply
Apply agent template
import requests

url = "https://api.diga.io/v1/agent-template/{template_id}/apply"

payload = {
    "agent_name": "<string>",
    "variables": {},
    "is_draft": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_name": "<string>"
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

template_id
string<uuid>
requerido

Cuerpo

application/json

Request to create an agent from a template.

agent_name
string | null

Custom name for the created agent. Defaults to template name.

variables
Variables · object

Values to replace <> placeholders in the template.

is_draft
boolean
predeterminado:true

If true, create the agent as a draft only.

Respuesta

Successful Response

Response after applying a template to create an agent.

agent_id
string<uuid>
requerido
version_id
string<uuid>
requerido
agent_name
string | null