---
title: "Associate Credential To Connector"
method: PUT
path: "/manage/connector/{connector_id}/credential/{credential_id}"
tags: ["public"]
---

# Associate Credential To Connector

`PUT /manage/connector/{connector_id}/credential/{credential_id}`

## Request

- Base URL: `https://cloud.onyx.app/api`
- URL: `https://cloud.onyx.app/api/manage/connector/{connector_id}/credential/{credential_id}`
- Auth: HTTP bearer

NOTE(rkuo): internally discussed and the consensus is this endpoint
and create_connector_with_mock_credential should be combined.

The intent of this endpoint is to handle connectors that actually need credentials.

## Path parameters

- `connector_id` integer, required
- `credential_id` integer, required

## Request body

- ConnectorCredentialPairMetadata
  - `name` string, nullable
  - `access_type` 'public' | 'private' | 'sync', required
  - `auto_sync_options` object, nullable
  - `groups` integer[]

## Response `200`

Successful Response

- StatusResponseInt
  - `success` boolean, required
  - `message` string, nullable
  - `data` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/onyx-dot-app/apis/agents-api.md) - [All operations](https://skmtc.dev/onyx-dot-app/apis/agents-api/llms.txt) - [OpenAPI document](https://skmtc.dev/onyx-dot-app/apis/agents-api/revisions/ea131344b29e?raw)
