Skip to content

Create several Engage feeds

POST
/engage/create-feeds
curl -X POST https://api.xholic.ai/v1/engage/create-feeds \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"feeds":[{"name":"Example","type":"TOPIC"}],"dryRun":true}'

Save up to 8 Engage feeds in one call. Call it only when the user asked for this in the conversation; never on your own initiative.

Media typeapplication/json
object
feeds
required
Array<object>
>= 1 items <= 8 items
object
name
required
string
>= 1 characters <= 80 characters
type
required

TOPIC (query holds 1-5 keywords), CONTACT_LIST (contactListId), X_LIST (xListId), USER (query holds a handle; TIMELINE placement only).

string
Allowed values: TOPIC FOLLOWING CONTACT_LIST X_LIST USER
placement

FEEDS (default) or TIMELINE. It can’t change later.

string
Allowed values: FEEDS TIMELINE
query
string
nullable <= 500 characters
contactListId
string format: uuid
nullable /^([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)$/
xListId
string
nullable /^\d{1,25}$/
excludedHandles
Array<string>
<= 50 items
excludedTerms
Array<string>
<= 50 items
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

{
"feeds": [
{
"name": "Example",
"type": "TOPIC"
}
],
"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"
}
}