---
title: "POST /api/v3/users/{user_id}/credentials/"
method: POST
path: "/api/v3/users/{user_id}/credentials/"
tags: ["Users"]
---

# POST /api/v3/users/{user_id}/credentials/

`POST /api/v3/users/{user_id}/credentials/`

## Request

- Base URL: `https://cloud.getdbt.com`
- URL: `https://cloud.getdbt.com/api/v3/users/{user_id}/credentials/`
- Auth: HTTP bearer

Associate a set of development credentials with a given user. Authentication: Requires a personal access token (PAT) for the user specified by `user_id`. The authenticated user must match `user_id`. Service tokens are not supported, including Account Admin service tokens. An admin cannot use their PAT to manage another user's credentials.

## Path parameters

- `user_id` integer, required

## Request body

- UserCredentialsRequest
  - `account_id` integer, required: The account the user credentials are associated with
  - `user_id` integer, required: The user the user credentials are associated with
  - `project_id` integer, required: The project the user credentials are associated with
  - `credentials_id` integer, required: The credentials the user is associated with
  - `state` integer, required: A value of 1 means this entity is active and a value of 2 means this entity is deleted

## Response `200`

- UserCredentialsEnveloped
  - `data` UserCredentialsResponse, required
    - `id` integer, required
    - `account_id` integer: The account the user credentials are associated with
    - `user_id` integer: The user the user credentials are associated with
    - `project_id` integer: The project the user credentials are associated with
    - `credentials_id` integer: The credentials the user is associated with
    - `state` integer: A value of 1 means this entity is active and a value of 2 means this entity is deleted
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `credentials` PostgresCredentials, required
      - `account_id` integer, required
      - `project_id` integer
      - `type` 'postgres' | 'redshift' | 'snowflake' | 'bigquery' | 'adapter', required: * `postgres` - postgres * `redshift` - redshift * `snowflake` - snowflake * `bigquery` - bigquery * `adapter` - adapter
      - `state` integer, required: A value of 1 means this entity is active and a value of 2 means this entity is deleted
      - `threads` integer, required
      - `username` string, required
      - `default_schema` string, required
      - `target_name` string, required
      - `adapter_version` 'apache_spark_v0' | 'databricks_spark_v0' | 'databricks_v0' | 'trino_v0' | 'snowflake_v0' | 'bigquery_v0' | 'bigquery_v1' | 'postgres_v0' | 'redshift_v0' | 'salesforce_v0' | 'synapse_v0' | 'fabric_v0' | 'athena_v0' | 'teradata_v0' | 'clickhouse_v0': * `apache_spark_v0` - apache_spark_v0 * `databricks_spark_v0` - databricks_spark_v0 * `databricks_v0` - databricks_v0 * `trino_v0` - trino_v0 * `snowflake_v0` - snowflake_v0 * `bigquery_v0` - bigquery_v0 * `bigquery_v1` - bigquery_v1 * `postgres_v0` - postgres_v0 * `redshift_v0` - redshift_v0 * `salesforce_v0` - salesforce_v0 * `synapse_v0` - synapse_v0 * `fabric_v0` - fabric_v0 * `athena_v0` - athena_v0 * `teradata_v0` - teradata_v0 * `clickhouse_v0` - clickhouse_v0
    - `project` Project, required
      - `name` string, required: The name of the project
      - `account_id` integer, required: The account the project is associated with
      - `description` string: The description of the project
      - `connection_id` integer: The active connection
      - `repository_id` integer: The active repository
      - `semantic_layer_config_id` integer: The active semantic layer configuration
      - `state` integer, required: A value of 1 means this entity is active and a value of 2 means this entity is deleted
      - `dbt_project_subdirectory` string: The path in the associated repository where a dbt project can be found
      - `docs_job_id` integer: The job used for docs generation
      - `freshness_job_id` integer: The job used for source freshness generation
      - `type` 0 | 1, required: * `0` - DEFAULT * `1` - HYBRID
  - `status` ResponseStatus, required
    - `code` integer: HTTP status code
    - `is_success` boolean, required: Whether the request was successful or not
    - `user_message` string, required: End-user friendly success or error message
    - `developer_message` string, required: Developer friendly success or error message

## Changes

- **2026-10-06** (v3) `7d5c1b4c8d8a`: 1 breaking
  - for the `path` request parameter `user_id`, the format changed from no format to `int64`
- **2026-09-29** (v3) `6b5199f1f0c8`: 1 warning
  - added the new `clickhouse_v0` enum value to the `data/credentials/allOf[#/components/schemas/PostgresCredentials]/adapter_version/allOf[#/components/schemas/AdapterVersionEnum]/` response property for the response status `200`
- **2026-04-22** (v3) `ed46da9332ad`: 12 breaking
  - the `account_id` request property format changed from no format to `int64` (media type: application/json)
  - the `account_id` request property format changed from no format to `int64` (media type: application/x-www-form-urlencoded)
  - the `account_id` request property format changed from no format to `int64` (media type: multipart/form-data)
  - the `credentials_id` request property format changed from no format to `int64` (media type: application/json)
  - …8 more

[Operation history](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2/changes/api/v3/users/:user_id/credentials/post.md)

---

[API](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2.md) - [All operations](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2/revisions/2448b375ac2f?raw)
