The API reference moved here from eksis.io/developers.
AI Agents

Change an agent

PATCH
/v1/ai-agents/{agentId}

Changes only what you send. An active agent picks up the change on the next message. Needs the admin role. Needs AI Agent on the workspace's account; without it the endpoint answers 404 feature.unavailable.

Authorization

headerAuthorizationBearer <token>

Send your key as Authorization: Bearer eksis_sk_....

Path Parameters

agentId*string

Request Body

application/json
  1. body

Send only what changes. Objects merge into what is saved, so { "persona": { "greeting": "bestie" } } changes the greeting and nothing else. Lists, such as channels or dmPolicy.keywords, are replaced whole.

name?string
Length1 <= length <= 60
channels?array<>

The channels the agent answers DMs on.

Itemsitems <= 50
personalityId?|

A saved personality from GET /v1/ai-agents/library/personalities. While set, it replaces persona; null uses the default style.

knowledgeBaseIds?array<string>

Knowledge from GET /v1/ai-agents/library/knowledge the agent reads before it answers. Its website sources are the only links the agent may send. Replaced whole.

Itemsitems <= 5
persona?

How the agent sounds.

instructions?

What the agent is for and the rules it follows.

dmPolicy?

Which DMs the agent answers.

sendMode?string

full_ai sends every answer. guarded (the default) sends answers it is sure of and holds the rest in Needs attention: confidence below 0.75 and hand-offs. approval holds every answer for a person to send.

Value in"full_ai""guarded""approval"
spamPolicy?

What the agent treats as spam. A DM judged spam gets no answer.

trigger?

Response Body

The agent after the change.

application/json
  1. response
data?
curl -X PATCH 'https://api.eksis.io/v1/ai-agents/string' \  -H 'Authorization: Bearer eksis_sk_...' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "id": "string",    "status": "draft",    "template": "sales",    "name": "string",    "channels": [      {        "channelId": "string",        "dm": true,        "story": true      }    ],    "personalityId": "string",    "knowledgeBaseIds": [      "string"    ],    "persona": {      "greeting": "string",      "language": "match",      "styles": [        "friendly"      ],      "vary": true,      "variation": "low",      "noRepeat": true,      "varyDm": true,      "disclose": true    },    "instructions": {      "role": "string",      "goals": [        "support"      ],      "extraGoal": "string",      "dms": {        "maxSentences": 1,        "answerThenLink": true,        "stopWhenNotInterested": true,        "extra": "string"      },      "never": {        "discounts": true,        "refunds": true,        "unreleased": true,        "competitors": true,        "politicsReligion": true,        "extra": "string"      },      "handoff": {        "complaint": true,        "refundPayment": true,        "technical": true,        "askHuman": true,        "unsure": true,        "extra": "string"      },      "handoffReply": "string",      "custom": [        {          "title": "string",          "body": "string"        }      ]    },    "dmPolicy": {      "mode": "auto",      "keywords": [        "string"      ],      "followersOnly": true    },    "sendMode": "full_ai",    "spamPolicy": {      "enabled": true,      "rules": {        "scam": true,        "promo": true,        "links": true,        "abusive": true,        "repeated": true,        "aiJudge": true      },      "repeatLimit": 2,      "alwaysSpam": [        "string"      ],      "neverSpam": [        "string"      ],      "blockTag": true    },    "trigger": {      "filters": {        "emojiOnly": true,        "ignoreTags": [          "string"        ]      },      "rhythm": {        "delay": "random_30_90",        "maxPerHour": 1,        "overLimit": "queue",        "hours": "always",        "days": [          1        ],        "from": "08:00",        "to": "08:00",        "outside": "defer"      }    },    "accounts": [      {        "channelId": "string",        "platform": "instagram",        "username": "string",        "replies": {          "dm": true,          "story": true        },        "usedByAgent": "string",        "answeredFirstBy": [          {            "automationId": "string",            "name": "string",            "trigger": "dm_received"          }        ]      }    ],    "links": [      {        "id": "string",        "name": "string",        "url": "string",        "status": "pending",        "error": "needs_login",        "readAt": "2019-08-24T14:15:22Z"      }    ],    "knowledge": [      {        "id": "string",        "kind": "note",        "title": "string",        "fileName": "string",        "status": "ok",        "error": "string"      }    ],    "library": {      "personalities": [        {          "id": "string",          "name": "string",          "description": "string"        }      ],      "knowledgeBases": [        {          "id": "string",          "name": "string",          "description": "string",          "sources": 0,          "chars": 0        }      ]    },    "canSwitchOn": true,    "blocker": "string",    "enabledAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}