All pages

API reference

Add a tool credential

POST /v1/vault/secrets

View as Markdown

Seal a credential into the vault for the projects named, whose tools and MCP servers may then send it. Its value is never sent back. Needs vault:write and a live key.

Body

Sent as JSON. A field this operation does not take is refused, so a typo fails loudly.

Field Type Required Description
name string Yes
project_ids array of string (uuid) No The projects whose tools may send it.
provider string No
secret string Yes The value. Never sent back.

Answer

201 with VaultSecretObject.

Errors

Every error is a problem document with a stable code.

Status When
401 The key is missing, mistyped, unknown, revoked or expired.
403 The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something.
404 A project named is not this organization's.
409 The organization already has a credential by that name.
422 Validation Error
429 Too many requests for this key or its organization; see Retry-After.
500 Something went wrong on our side. Quote the request_id to support.

Examples

Add a tool credential
#!/bin/sh
# Add a tool credential. Read the value from your own secret store. Only an owner can make this key.
curl -sS --fail-with-body -X POST "https://api.aigently.ai/v1/vault/secrets" \
  -H "Authorization: Bearer $AIGENTLY_API_KEY" \
  --json '{
  "name": "Orders API",
  "provider": "Aigently Orders",
  "secret": "your-orders-api-token",
  "project_ids": [
    "0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
  ]
}'

Try it

Sends this request to the API from your browser, with a test key. Nothing it does rings a phone.