create_api_test_credential
Store a reusable auth credential that API tests can use to reach a protected endpoint. Pick a type and fill the matching fields: BASIC (username+password), BEARER (token), API_KEY (apiKeyHeaders for header-placed keys and/or apiKeyQueryParams for query-string keys — at least one entry across the two), or OAUTH2_CLIENT_CREDENTIALS (tokenUrl+clientId+ clientSecret, optional scope/audience). The secret is write-only: the response returns only id, name and type — reference the returned id from an API test's httpCredentialId or mcpCredentialId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for the credential, e.g. 'prod API key' | |
| type | Yes | Credential type: BASIC, BEARER, API_KEY or OAUTH2_CLIENT_CREDENTIALS | |
| scope | No | OAUTH2_CLIENT_CREDENTIALS only: requested scope | |
| token | No | BEARER only: the bearer token (secret, never returned) | |
| audience | No | OAUTH2_CLIENT_CREDENTIALS only: requested audience | |
| clientId | No | OAUTH2_CLIENT_CREDENTIALS only: client id | |
| password | No | BASIC only: password (secret, never returned) | |
| tokenUrl | No | OAUTH2_CLIENT_CREDENTIALS only: token endpoint URL | |
| username | No | BASIC only: username | |
| clientSecret | No | OAUTH2_CLIENT_CREDENTIALS only: client secret (secret, never returned) | |
| apiKeyHeaders | No | API_KEY only: keys sent as request HEADERS, as a map of header name -> value (values are secret, never returned). Combine with apiKeyQueryParams when some keys belong in the query string instead | |
| apiKeyQueryParams | No | API_KEY only: keys sent as URL QUERY parameters, as a map of parameter name -> value (values are secret, never returned). Combine with apiKeyHeaders when some keys belong in headers instead |