Skip to main content
POST
/
api
/
agent-config
/
apply-template
Error
A valid request URL is required to generate request examples
{
  "_id": "<string>",
  "accountId": "<string>",
  "name": "<string>",
  "systemPrompt": "<string>",
  "goal": "<string>",
  "status": "active",
  "language": "English",
  "instructions": "<string>",
  "qualificationCriteria": "<string>",
  "handoffMessage": "I'll connect you with a specialist who can help further!",
  "stages": [
    {
      "id": "<string>",
      "name": "<string>",
      "order": 123,
      "prompt": "<string>",
      "transitionCriteria": "<string>",
      "maxMessages": 0,
      "nextStages": [
        {
          "id": "<string>",
          "condition": "<string>"
        }
      ],
      "nextStageIds": [
        "<string>"
      ],
      "position": {
        "x": 123,
        "y": 123
      }
    }
  ],
  "guardrails": {
    "maxTotalMessages": 40,
    "inactivityTimeoutMinutes": 1440,
    "forbiddenTopics": "",
    "escalationTriggers": ""
  },
  "knowledgeBaseIds": [
    "<string>"
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer token using an API key (format nl_live_* or nl_test_*)

Body

application/json
templateId
string
required

ID of the template to apply

Response

Template configuration (not persisted)

_id
string
required

MongoDB ObjectId

accountId
string
required

Account ObjectId this agent belongs to

name
string
required

Agent display name

systemPrompt
string
required

System prompt sent to the LLM for every conversation

goal
string
required

High-level goal for the agent

status
enum<string>
default:active
Available options:
active,
inactive,
draft
language
string
default:English

Conversation language

instructions
string

Additional instructions for the agent

qualificationCriteria
string

Criteria used to qualify leads

handoffMessage
string
default:I'll connect you with a specialist who can help further!

Message sent when the conversation is handed off to a human

stages
object[]

Ordered conversation stages

guardrails
object
knowledgeBaseIds
string[]

ObjectIds of attached knowledge bases

createdAt
string<date-time>
updatedAt
string<date-time>