---
title: "POST /vault/credentials/{id}/use"
method: POST
path: "/vault/credentials/{id}/use"
---

# POST /vault/credentials/{id}/use

`POST /vault/credentials/{id}/use`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/vault/credentials/{id}/use`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `id` string, required: Credential ID to broker the call with

## Request body

- object: Make an outbound HTTP call with the credential attached server-side. The plaintext secret is never returned — the agent only sees the upstream response.
  - `agentId` string: Agent ID (optional when using an agent API key)
  - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD', required: HTTP method for the outbound call
  - `url` string, uri, required: Absolute https:// URL. Its host MUST be on the credential's allowlist.
  - `headers` object: Extra request headers. Any Authorization / auth header is ignored and replaced by the credential.
  - `body` string: Raw request body (encode JSON yourself).

## Response `200`

OK

- object: The upstream response, scrubbed of the injected credential.
  - `status` integer, required: Upstream HTTP status code
  - `headers` object, required: Upstream response headers
  - `body` string, required: Upstream response body (UTF-8, size-capped)
  - `truncated` boolean, required: True if the response body exceeded the size cap and was cut off

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
