Skip to main content
POST
/
template
Create a new Template
curl --request POST \
  --url https://api.trugen.ai/v1/template \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "template_name": "HR Assistant",
  "template_system_prompt": "You are a helpful HR AI Assistant.",
  "config": {
    "maxCallDuration": 5,
    "conversationalContext": ""
  },
  "record": true
}
'
{
  "id": "d65a4f92-44b1-4fe6-b2ac-a1cb66366ddc",
  "message": "Template created successfully"
}

Authorizations

x-api-key
string
header
required

Body

application/json
template_name
string

Name of the template

Example:

"HR Assistant"

template_system_prompt
string

System prompt text used by the template

Example:

"You are a helpful HR AI Assistant."

config
object

Settings and configuration for the template

record
boolean

Whether the call should be recorded

Example:

true

Response

Template created successfully

id
string<uuid>

Unique ID of the newly created template.

Example:

"d65a4f92-44b1-4fe6-b2ac-a1cb66366ddc"

message
string
Example:

"Template created successfully"