{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Stores an API key or OAuth client for a catalog provider that supports that\ncredential type. Secret material is write-only. Only you can see and use the\ncredential unless you share it with your team using `reusable_by_team`.\n\nTo use an API key, first create this credential, then create a connection for\nthe same provider with `credential.team_credential.credential_id` set to the\nreturned `credential.id`. That connection becomes active without OAuth consent.\nIts `user_id` must match the session's `actor_id`.\n\nCreating a credential does not replace existing credentials or connections.\nA duplicate display name for the same provider returns 409.","properties":{"body":{"$ref":"#/definitions/provider_credential_create","examples":[{"provider":"example-provider","display_name":"Production key","kind":"PROVIDER_CREDENTIAL_KIND_API_KEY","api_key":"<provider-api-key>"}]}},"required":["body"],"additionalProperties":false,"definitions":{"provider_credential_create":{"type":"object","description":"Register a credential for a provider that supports the selected kind. API keys require api_key; OAuth clients require client_id and client_secret. Fields for the other kind are rejected. Register custom MCP servers through the MCP server API rather than creating API-key credentials for them here.","required":["provider","kind","display_name"],"properties":{"provider":{"type":"string","minLength":1,"description":"Required provider slug from the provider catalog.","examples":["example-provider"]},"kind":{"type":"string","description":"Credential type. NONE is available only for eligible MCP providers when team-scoped provider credentials are enabled; it accepts no credential fields.","enum":["PROVIDER_CREDENTIAL_KIND_OAUTH_CLIENT","PROVIDER_CREDENTIAL_KIND_API_KEY","PROVIDER_CREDENTIAL_KIND_NONE"],"examples":["PROVIDER_CREDENTIAL_KIND_API_KEY"]},"display_name":{"type":"string","minLength":1,"maxLength":255,"description":"Required label, unique among the team's credentials for this provider, ignoring case. A duplicate returns 409.","examples":["Production key"]},"api_key":{"type":"string","minLength":1,"maxLength":4096,"description":"Required for API-key credentials. Rejected for other kinds. Never returned.","examples":["<provider-api-key>"]},"client_id":{"type":"string","minLength":1,"maxLength":255,"description":"Required for OAuth client credentials. Rejected for other kinds.","examples":["example-client-id"]},"client_secret":{"type":"string","minLength":1,"maxLength":1024,"description":"Required for OAuth client credentials. Rejected for other kinds. Never returned.","examples":["<provider-client-secret>"]},"base_url":{"type":"string","maxLength":255,"description":"Provider API HTTPS origin. Accepted only when the provider allows one, restricted to its allowed hosts, and required when the provider requires it. Do not send this alongside credential_parameters.","examples":["https://api.example.com"]},"credential_parameters":{"type":"object","additionalProperties":true,"description":"Non-secret configuration for API-key providers that declare credential parameters. Validated against the provider's parameter definitions and used to derive base_url. Rejected for other credential kinds.","examples":[{"subdomain":"example"}]},"reusable_by_team":{"type":"boolean","default":false,"description":"Share the credential with the team. Defaults to false, so only its creator can see and use it. Requires the team owner role when team-scoped provider credentials are enabled for the account.","examples":[false]},"redirect_url":{"type":"string","maxLength":1024,"description":"OAuth clients only. Optional absolute HTTPS redirect URI registered at the provider, with no user information or fragment. Requires custom OAuth redirects to be enabled for the account. Omit to use DigitalOcean's callback. Cannot be changed after registration.","examples":["https://app.example.com/oauth/callback"]}},"oneOf":[{"properties":{"kind":{"type":"string","enum":["PROVIDER_CREDENTIAL_KIND_API_KEY"]}},"required":["api_key"],"not":{"anyOf":[{"required":["client_id"]},{"required":["client_secret"]},{"required":["redirect_url"]}]}},{"properties":{"kind":{"type":"string","enum":["PROVIDER_CREDENTIAL_KIND_OAUTH_CLIENT"]}},"required":["client_id","client_secret"],"not":{"anyOf":[{"required":["api_key"]},{"required":["credential_parameters"]}]}},{"properties":{"kind":{"type":"string","enum":["PROVIDER_CREDENTIAL_KIND_NONE"]}},"not":{"anyOf":[{"required":["api_key"]},{"required":["client_id"]},{"required":["client_secret"]},{"required":["redirect_url"]},{"required":["base_url"]},{"required":["credential_parameters"]}]}}]}}},"name":"Create a Provider Credential","id":"digitalocean.providercredentials_create","example":{"body":{"provider":"example-provider","kind":"PROVIDER_CREDENTIAL_KIND_API_KEY","display_name":"Production key","api_key":"<provider-api-key>"}},"maxRequests":1,"summary":false}}