Skip to Content
Docs

Create an API tool that lets agents work in this account with the token

POST
/api/user/tokens/{token_id}/tool

The body carries the token's plaintext token, which only the caller holds (it was just shown to them), and base_url, where the API is reached. The tool gets an action for each endpoint the token may call (see docsgpt.api.pat.agent_tool), with the token sealed as their Authorization header. Deletes, and asking another agent, start switched off; the response names them in inactive.

Not available to personal access tokens; call it from a signed-in session.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Path Parameters

token_id*string

Response Body

Success

Example Request
curl -X POST 'http://localhost:7091/api/user/tokens/string/tool'
Example Response200
Empty