MCPBundler Docs
MCPBundler Docs
Back to marketplaceGetting StartedAuthenticationTutorial - Bundle to Connected Agent
API Reference
Agent A2A Tools
Agent Channels
Agent Configuration (Staging)
Agent Configuration (Versions)
Agent Tools
Agents
Auth
Billing
Bundler
Bundler Tool
Bundles
Call Campaigns
Catalog
Conversations
Credentials
Create CredentialDelete CredentialList Credential AssignmentsList CredentialsUpdate Credential
Deployments
Discover
Embedding
Fleet
Knowledge Bases
LLM
MCP Listings
Media
OAuth Clients
OAuth2
Observability
Organisations
Realtime
Reviews
Roadmap
SCIM
STT
Suppression
Triggers
TTS
Users
Utils
Voices
Webhooks
Workflows
API ReferenceCredentials

Create Credential

POST
/v1/credentials

Store a new secret for an organisation.

The organisation is resolved - and its membership checked - before anything is written: credential_provider.create commits, so a rejection discovered afterwards would strand a row holding live secret material that nothing ever collects.

Accepts the secret in the engine's own payload shape or as a credential form document, converted here through the same read_document every other credential write path uses. A document says more than its secret: its header names where the secret is sent and, for a keyvault credential, its secret_auth_type names the method the upstream sees, so reading the payload alone would make one document mean different things depending on which surface received it.

A document this API cannot read - one naming a method outside AuthType, one disagreeing with the request's own auth_type, one yielding no secret material - is a 400. Letting any of them through leaves either an unhandled exception carrying the decrypted document in its frame locals, or a stored credential no materializer can read.

Authorization

OAuth2AuthorizationCodeBearer
AuthorizationBearer <token>

In: header

Query Parameters

verify_locally?Verify Locally
Defaulttrue

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A new secret, given either as an engine payload or as a form document.

payload is already in the shape the engine's materializers read. document is the shape a credential form submits - camelCase keys plus a type discriminator - and is converted here, by the same conversion every other credential write path uses. Offering only payload would leave that conversion to be reimplemented by each client, and a client whose copy drifts stores a blob no materializer can read: the engine then answers "no credential" and the resource silently disappears from a resolved bundle rather than failing at the write.

Exactly one of the two is required. Accepting both would leave the question of which wins to be answered differently on every surface.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/credentials" \  -H "Content-Type: application/json" \  -d '{    "auth_type": "api_key"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "creator_id": "9cceffdd-8381-4074-8256-eafae24ebee6",  "auth_type": "api_key",  "source": "inline",  "label": "string",  "vendor": "string",  "oauth_email": "string",  "oauth_expires_at": "2019-08-24T14:15:22Z",  "config_json": "string",  "is_provisional": false,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "usage_count": 0}
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string"    }  ]}

Credentials

Endpoints in the Credentials group.

Delete Credential

Next Page

auth_type*AuthType

The credential method the upstream sees. Every member must have a materializer in app.core.auth.materializers - asserted by a unit test, so a value nothing can resolve cannot exist.

Value in

  • "api_key"
  • "bearer"
  • "basic"
  • "oauth2_pkce"
  • "oauth2_cc"
payload?|

Secret material in the engine's own shape

document?|

A credential form document. Its secret material becomes the payload, its header reaches config_json, and for a keyvault credential its secret_auth_type sets the auth type

org_id?|null
source?CredentialSource

Where the secret material lives - orthogonal to AuthType. A remote source holds a locator in credential_encrypted and is fetched at resolve time; INLINE holds the material itself.

Default"inline"

Value in

  • "inline"
  • "azure_keyvault"
label?|null
vendor?|null
oauth_email?|null
oauth_expires_at?|null
config_json?string|null