Skip to content

Let a consumer answer through the assistant

POST
/api/v1/channels/consumers/{realmName}/{consumerName}/assistant/grant
curl --request POST \
--url http://localhost:11044/api/v1/channels/consumers/example/example/assistant/grant \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

JSON fields: installationId, expectedRevision. Only a consumer declared with assistant: true.

realmName
required
string

Name of the captured realm installed in the signed-in owner’s world; non-blank, at most 256 UTF-8 bytes, no control characters and not all * (400 otherwise). 409 when its live installation is not the one named by the body’s installationId and expectedRevision

consumerName
required
string

Name of a consumer the realm declares; same text rules as the realm name, declared with assistant: true (400 otherwise). 404 when undeclared, 409 when it already has the assistant grant

OK

Media type*/*

Whether a captured realm consumer may answer through the owner’s assistant, and which sender threads it answers; returned by the /channels/consumers/{realmName}/{consumerName}/assistant routes

object
consumerName
required

Name of the consumer, as the realm declares it

string
declared
required

Whether the realm declared the consumer with assistant: true; only such a consumer can be granted

boolean
granted
required

Whether the owner has granted the consumer leave to answer through the assistant

boolean
installationId
required

The live installation of that realm this was read from; send it back as installationId on a change

string
paired
required

The sender threads paired with the consumer, which it answers, sorted; empty when none, or when not granted

Array<string>
realmName
required

Name of the realm the consumer belongs to

string
revision
required

That installation’s revision; send it back as expectedRevision on a change. Pairing and unpairing do not move it

integer format: int64