Add a credential
The payload is sealed on the way in and is never returned by any route. An mcp credential targets its server’s URL and is oauth or static_bearer; an http one is sent to one or more origins (https://host[:port], nothing past it) and is header here, a list of headers sent with every request to them. An oauth http credential is connected through the OAuth route instead.
POST
/v1/vaults/{vault_id}/credentialsAuthorization
AuthorizationBearer token · headerrequiredPath parameters
vault_idstring<uuid>requiredVault id
Header parameters
Idempotency-KeystringRetry the same operation with this key to return its saved receipt. Scoped by the operation's authenticated caller or resource. A different input under the same key returns 409. Receipts are retained for at least 7 days after completion, then removed by an hourly sweep. After removal the key can execute again. Fresh-only secrets are never included in a replay.
min length 1 · max length 255
Request body
requiredapplication/jsonOne of:
object
display_namestringrequiredmax length 200
payloadMcpPayloadBodyrequiredHow an `mcp` credential authenticates: an OAuth grant this vault
refreshes, or a bearer token supplied once.
Show propertiesHide properties
One of:
object
access_tokenstringrequiredauth_schemestringrequiredAllowed:
oauthexpires_atstring | nullrefreshany | RefreshBlockBodyShow propertiesHide properties
One of:
any
anyRefreshBlockBody
client_idstringrequiredrefresh_tokenstringrequiredscopestring | nulltoken_endpointstringrequiredtoken_endpoint_authobjectrequiredHow the client authenticates to the token endpoint. Opaque: the fields
depend on the method and on the provider, so no shape is promised.
object
auth_schemestringrequiredAllowed:
static_bearertokenstringrequiredprotocolstringrequiredAllowed:
mcptargetstringrequiredThe MCP server's exact URL.
min length 1 · max length 2048
object
display_namestringrequiredmax length 200
originsHttpOriginBody[]requiredEach at most once, and none another credential in the vault is
already sent to.
min items 1 · max items 16
payloadHttpPayloadBodyrequiredHow an `http` credential authenticates: headers sent with every request
to its origin.
Show propertiesHide properties
One of:
object
auth_schemestringrequiredAllowed:
headerheadersCredentialHeaderBody[]requiredEach name at most once.
min items 1 · max items 16
Show propertiesHide properties
Array of
CredentialHeaderBodynamestringrequiredAn HTTP token, compared without regard to case and stored in
lowercase. A header the client or a proxy owns (`host`,
`content-length`, `transfer-encoding`, `connection`, `keep-alive`,
`te`, `trailer`, `upgrade`, `proxy-*`) is refused.
min length 1 · max length 256
valuestringrequiredVisible characters, with spaces or tabs only between them; at most
8192 bytes.
min length 1 · max length 8192
protocolstringrequiredAllowed:
httpResponses
201Created.
idstring<uuid>required400Malformed body, including an auth scheme the protocol does not take; a header or an origin named twice; or an `http` origin that is not one, or one the deployment's network policy does not reach.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired401Missing, malformed, or invalid bearer token.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired403Caller lacks credential.manage.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired404No such vault, or the caller cannot see it.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired409Idempotency-Key was already used for a different request. Duplicate credential target, or an origin another credential in the vault is already sent to.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired