Skip to the page

Keep chat

Keeps a chat for the signed-in person: a new one, or with an id the whole of an earlier one again. The fifty latest are kept.

View as
POST/v1/ask/chats
Needs the scopeworkspace:read
Signed-in person only

This method answers a person who is signed in to the dashboard. A request with an API key is refused with 403, so it cannot be tried from this page.

Body parameters

  • idstring

    The id of the chat to save over. Without it a new chat is made. Up to 64 characters.

  • entriesobject[]Required

    The whole conversation, oldest first. Up to 80 items.

  • entries[].idstringRequired

    An id for the entry, unique in the chat. Up to 64 characters.

  • entries[].rolestringRequired

    Who said it: user or assistant.

    One ofuserassistant

  • entries[].textstring

    What was said. Up to 4,000 characters.

  • entries[].stepsobject[]

    The methods that were run for this answer. Up to 20 items.

  • entries[].steps[].callstringRequired

    The method that was run. Up to 80 characters.

  • entries[].steps[].titlestringRequired

    The method in a few words. Up to 500 characters.

  • entries[].steps[].okbooleanRequired

    Whether it worked.

  • entries[].changeobject

    The change that was proposed with this answer.

  • entries[].change.callstringRequired

    The method the assistant proposed. Up to 80 characters.

  • entries[].change.titlestringRequired

    The method in a few words. Up to 500 characters.

  • entries[].change.descriptionstringRequired

    What running it does. Up to 4,000 characters.

  • entries[].change.effectstringRequired

    What it does to your data: write, send or destroy.

    One ofreadwritesenddestroy

  • entries[].change.inputRecord<string, unknown>Required

    The input it is run with.

  • entries[].change.statestringRequired

    Where the proposal stands: waiting, busy, done, dismissed or failed.

    One ofwaitingbusydonedismissedfailed

  • entries[].change.faultstring

    Why it failed, when it did. Up to 500 characters.

  • entries[].faultstring

    Why the answer failed, when it did. Up to 500 characters.

  • entries[].offboolean

    Whether the assistant was not connected when this was asked.

Returns

  • object"chat"

    Always chat.

  • idstring

    The id of the chat.

  • titlestring

    The first question, shortened.

  • updatedAtstring

    When the chat was last saved.

  • createdAtstring

    When the chat was started.