---
title: "Test what a chat's credential card typed, before saving (owner only)"
method: POST
path: "/agents/sessions/{session_id}/credential-test"
tags: ["AI", "Agents"]
---

# Test what a chat's credential card typed, before saving (owner only)

`POST /agents/sessions/{session_id}/credential-test`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/agents/sessions/{session_id}/credential-test`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Runs one cheap read with the values on an open credential card: the connector's own validation, or the custom connector's declared test. Answers with the outcome only (connected, rejected, insufficient, unreachable, untested) and who the key belongs to when the provider says. The values are not stored or logged.

## Path parameters

- `session_id` string, required

## Request body

- CredentialTestRequest
  - `widget_id` string, required
  - `credentials` object, required

## Response `200`

Request fulfilled, document follows

- CredentialTestResponse
  - `outcome` string, required
  - `identity` string
  - `org` string
  - `sees` object[]
  - `reads` string

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/5dfd1c296ded?raw)
