Skip to content

Edit a Signals agent

POST
/signals/update-agent
curl -X POST https://api.xholic.ai/v1/signals/update-agent \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"agentId":"<agentId>","changes":{},"dryRun":true}'

Change a Signals agent’s audience, sources, rubric or schedule. Call it only when the user asked for this in the conversation; never on your own initiative.

Media typeapplication/json
object
agentId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
changes
required
object
name
string
>= 1 characters <= 80 characters
productId
string
nullable >= 1 characters <= 160 characters
audienceDescription
string
>= 20 characters <= 3000 characters
exclusions
string
nullable <= 1500 characters
rubric
object
who
required
string
>= 1 characters <= 600 characters
needs
Array<string>
default: <= 8 items
disqualifiers
Array<string>
default: <= 8 items
exampleMatch
string
nullable <= 600 characters
exampleNonMatch
string
nullable <= 600 characters
strictness
string
Allowed values: HIGH_PRECISION DISCOVERY
dmPolicy
string
Allowed values: ANYONE OPEN_DMS_ONLY
baselineMode
string
Allowed values: FUTURE_ONLY RECENT
intervalHours
integer
>= 4 <= 24
sources

The agent’s full list of sources after the change, kept ones included.

Array
>= 1 items <= 15 items
One of:
object
id
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
label
string
>= 1 characters <= 120 characters
type
required
string
Allowed values: KEYWORD
query
required
string
>= 2 characters <= 500 characters
destinationListId
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
newListName

A name for a new contact list to save leads to.

string
>= 1 characters <= 80 characters
account

X account to act on, as @handle. Leave it out to use the connection’s default account.

string
>= 1 characters <= 64 characters
dryRun

Return exactly what would happen without doing it.

boolean
idempotencyKey

A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice.

string
>= 8 characters <= 200 characters

Example

{
"agentId": "<agentId>",
"changes": {},
"dryRun": true
}

Success

Media typeapplication/json
object
ok
required
boolean
summary
required

One or two readable sentences about the result.

string
data
required

The result. Its shape depends on the action.

ids
object
key
additional properties
any
next
Array<string>
creditsCharged
number
dryRun
boolean

Example

{
"ok": true
}

Error

Media typeapplication/json
object
ok
required
boolean
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED INVALID_CREDENTIAL SCOPE_MISSING ROLE_NOT_PERMITTED ACCOUNT_NOT_FOUND SUBSCRIPTION_REQUIRED FEATURE_NOT_INCLUDED APP_ONLY INVALID_INPUT NOT_FOUND CONFLICT CREDITS_CONFIRMATION_REQUIRED INSUFFICIENT_CREDITS RATE_LIMITED IDEMPOTENCY_KEY_REUSED IDEMPOTENCY_IN_PROGRESS X_DATA_LIMIT_REACHED UPSTREAM_UNAVAILABLE INTERNAL_ERROR
message
required
string
scope
required
string
Allowed values: account platform
retryAfterSeconds
integer
details

Example

{
"ok": false,
"error": {
"code": "UNAUTHENTICATED",
"scope": "account"
}
}