# selectConnectionHabit

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| POST | https://cxi-api-prod-weu-interim-eraffmdbdmdmbdfz.a01.azurefd.net/v1/teams/{teamId}/runs/{runId}/dimensions/{dimension}/habits/{habitId}/selection |

| Field | Value |
|---|---|
| operationId | selectConnectionHabit |
| method | POST |
| server | https://cxi-api-prod-weu-interim-eraffmdbdmdmbdfz.a01.azurefd.net/v1 |
| path | /teams/{teamId}/runs/{runId}/dimensions/{dimension}/habits/{habitId}/selection |
| tags | `Check-ins & Runs` |
| summary | Select a suggested connection habit |
| badges | `{"name":"Owner"}`, `{"name":"Admin"}`, `{"name":"Viewer"}` |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| teamId | path | true | string |  |
| runId | path | true | string |  |
| dimension | path | true | string |  |
| habitId | path | true | string |  |

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/SelectConnectionHabitRequestDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 201 | The selection (existing selections return alreadySelected: true) | #/components/schemas/SelectConnectionHabitResponseDto |
| 400 | The request could not be accepted as sent. | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Insufficient role privileges (AUTH_INSUFFICIENT_ROLE) | #/components/schemas/ApiErrorResponseDto |
| 404 | Team not found or not readable by the caller | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example — CONNECTION_INVALID_DIMENSION

```json
{
  "statusCode": 400,
  "message": "Unknown dimension",
  "error": "CONNECTION_INVALID_DIMENSION"
}
```

### Response 400 example — CONNECTION_HABIT_NOT_SELECTABLE

```json
{
  "statusCode": 400,
  "message": "This row is not a selectable suggestion",
  "error": "CONNECTION_HABIT_NOT_SELECTABLE"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 403 example

```json
{
  "statusCode": 403,
  "message": "Insufficient role privileges",
  "error": "AUTH_INSUFFICIENT_ROLE"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Team not found",
  "error": "TEAM_NOT_FOUND"
}
```
