Palbase ai · API
/ai/chats/{chat_id}/goalRead the chat's goal
The chat's goal: its status, why it stopped, what its next turn is (phase), its limits and what it has used so far. The project's server's.
Called by a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.
Path
chat_idstring · requiredThe chat's id.Query
asstring · optionalThe member the server acts as: a member of the chat (403 not_a_member), the one the goal was set as (403 not_your_turn). Left out, the server acts as itself.curl -X GET "https://<your-ref>.palbase.studio/ai/chats/<chat_id>/goal" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
200The goal
400The request is malformed, or names what this module does not offer (the error names which)
401No valid credential
403A publishable key or a user's session: everything here is the project's server's, called with the secret key
404No such response, job or provider in this project
503The model service or the database did not answer; retry shortly
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation GetChatGoal of ai's contract.