---
title: "Record credential picks for this chat"
method: PUT
path: "/api/chat/sessions/{session_id}/credential-selection"
tags: ["v2", "chat"]
---

# Record credential picks for this chat

`PUT /api/chat/sessions/{session_id}/credential-selection`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/docs/api/chat/sessions/:session_id/credential-selection/put.ts> (a function with typed inputs; its response is checked against the schema)

Keep the account the user chose on a connect card for the rest of the chat.

The card shows one account and the tools used to re-match on their own, so
with two accounts for a provider a run could land on the other one. The
tools now use exactly what is recorded here, and ask when several
credentials qualify and nothing was picked.

Every id is checked against the caller's own credentials and the provider
it is filed under; one bad entry rejects the request and records nothing.

## Path parameters

- `session_id` string, required

## Request body

- CredentialSelectionRequest: The credential the user picked for each provider on a connect card.
  - `selections` object, required: Provider slug to credential id.

## Response `200`

Successful Response

- object

## Other responses

- `401`: Authentication required
- `404`: Session or credential not found
- `422`: Validation Error

## Changes

> 376 revisions in range; 1 not diffed.

- **2026-11-04** `254ce9a3be8c`: 1 breaking, 1 warning
  - added 'propertyNames' constraint to the request property `selections`
  - the `selections/additionalProperties/` request property's maxLength was set to `100`
- **2026-09-18** `bce8b999afa9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/chat/sessions/:session_id/credential-selection/put.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) - [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) - [OpenAPI document](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/revisions/ab4c69cd5329?raw)
