> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcollate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Team Configs

> Manage team-level Query Runner credential overrides through the Collate REST API

# Team Configs

A team config layers a team's own credentials on top of a service's admin config, for the fields the admin config marked as user-configurable. Managing a team's config requires being that team's owner or a workspace admin.

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/queryRunner/team-configs` | Look up configs. See lookup modes below. |
| `POST` | `/v1/queryRunner/team-configs` | Create or update a team's config for a service. |
| `PUT` | `/v1/queryRunner/team-configs?service={name}&team={id}` | Update a team's config. Restores masked secrets before validating. |
| `DELETE` | `/v1/queryRunner/team-configs?service={name}&team={id}` | Delete a team's config for a service. |
| `POST` | `/v1/queryRunner/team-configs/test-connection` | Run a `SELECT 1` test connection using the team's stored credentials. |
| `POST` | `/v1/queryRunner/team-configs/update-connection-status` | Called after a test-connection workflow completes, to record its result. |

`GET` supports four lookup modes:

* `teamConfigId`: Look up one config by ID.
* `service` + `team`: Get one config for that service and team.
* `service` alone: Get every team config on that service.
* `team` alone: Get every config belonging to that team.

`POST`/`PUT` take `serviceName` and `teamId` (both required) plus `userAuthConfig`, shaped according to the service's auth type, the same way as the admin config.

## Example

The following request creates a team config.

<RequestExample>
  ```bash Create a team config theme={null}
  curl -X POST "{base_url}/api/v1/queryRunner/team-configs" \
    -H "Authorization: Bearer {access_token}" \
    -H "Content-Type: application/json" \
    -d '{
      "serviceName": "snowflake_production",
      "teamId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "userAuthConfig": {
        "authType": "Basic",
        "username": "team_reader",
        "password": "{team_password}",
        "role": "ANALYST_ROLE"
      }
    }'
  ```
</RequestExample>
