Ask the assistant
Answers a question about the workspace by looking it up with the methods of this API. A change is never carried out by asking: the answer holds the change it proposes, and sending that back as run carries it out.
/v1/askBody parameters
messagesobject[]RequiredThe conversation so far, oldest first. The last message is the question. Up to 40 items.
messages[].rolestringRequiredWho said it:
userorassistant.One of
userassistantmessages[].textstringRequiredWhat was said. Up to 4,000 characters.
pagestringThe screen the person is on, so the answer can be about it. Up to 200 characters.
runobjectA change the assistant proposed and the person confirmed. With it the change is made and no model is asked.
run.callstringRequiredThe name of the method to run, such as
domains.create. Up to 80 characters.run.inputRecord<string, unknown>RequiredThe input for that method.
Returns
object"ask_answer"Always
ask_answer.textstringThe answer, as plain text.
stepsobject[]The methods that were run to find the answer.
steps[].callstringThe method that was run.
steps[].titlestringThe method in a few words.
steps[].okbooleanWhether it worked.
proposalobject | nullA change the assistant wants to make and is waiting for a yes on, or
null.proposal.callstringThe method the assistant wants to run.
proposal.titlestringThe method in a few words.
proposal.descriptionstringWhat running it would do.
proposal.effectstringWhat it does to your data:
write,sendordestroy.One of
readwritesenddestroyproposal.inputRecord<string, unknown>The input it would be run with.
resultRecord<string, unknown> | nullWhat a confirmed change returned, or
null.