call_api
Send authenticated requests to any Prisme.ai REST API endpoint. Use for operations not available through dedicated tools, such as listing organizations or retrieving IAM context.
Instructions
Call any Prisme.ai REST API endpoint, authenticated server-side with the configured environment token (the token is NEVER exposed to the model). Use for endpoints not covered by a dedicated tool — e.g. list organizations ('/orgs'), the current IAM context ('/me'), org members, API keys, etc. path is relative to the environment apiUrl base, which already includes '/v2' (so pass '/orgs', not '/v2/orgs').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Optional JSON request body for POST/PATCH/PUT. | |
| path | Yes | Endpoint path relative to the environment apiUrl base (which already ends in /v2). Examples: '/orgs', '/me', '/workspaces/<id>'. A leading slash is optional. | |
| pick | No | Optional field projection to keep responses small. Each named top-level key is kept; for list responses the projection is applied to every entry of `results`/`items` (or of a top-level array). E.g. ['slug','name'] on '/orgs'. | |
| query | No | Optional query-string parameters, e.g. { limit: 200 }. | |
| apiKey | No | Authenticate with this key as `x-prismeai-api-key` (by default NO Bearer). For an `iak_<org>_…` org key the gateway resolves the org from the key with NO membership check — use this to create/publish an agent in an org you are not a member of (e.g. POST /workspaces/slug:agent-factory/webhooks/v1/agents). | |
| method | No | HTTP method (GET, POST, PATCH, PUT, DELETE). Default: GET. | |
| asSession | No | Send the token as the `access-token` cookie (browser-session auth) instead of a Bearer access token. Required for session-only endpoints like `PUT /user/active-org`; the active org set this way persists for subsequent asSession calls reusing the same token. | |
| environment | No | Environment name (from PRISME_ENVIRONMENTS), e.g. 'sandbox' or 'prod'. Defaults to the default environment. | |
| withUserBearer | No | Only with `apiKey`: ALSO send the configured user Bearer alongside the api key. Combines a real user identity (e.g. superadmin) with the org key's org context, so the gateway can take the admin/owner path while the key selects the org. Use to manage (read/update) an existing agent in another org. |