# Confirm integration connection

Source: https://docs.orbiqhq.com/docs/api/v1/integrations/auth/patch

### PATCH /api/v1/integrations/auth

**Confirm integration connection**

Saves a connection right after the integration connect UI reports it, without waiting for the provider webhook. The connection must belong to the authenticated user and tenant. It takes over the tenant's existing record for the integration, keeping its stored settings such as allowed files, and replaces older connections. Slack is not supported; Slack connections are saved once Slack reports the workspace.

**Authentication:** Bearer token (`Authorization: Bearer <token>`)

**Request body** (`application/json`) - required:

- `integration_id` (string, required)
- `connection_id` (string, required)

**Responses:**

- `200` - Connection saved
  - `success` (enum: true, required)
  - `data` (object, required)
    - `integration_id` (string, required)
    - `connection_id` (string, required)
- `400` - Invalid request payload, or a Slack connection
  - `error` (string, required)
  - `code` (string): Machine-readable error code. Known values: invalid_input, invalid_id, unauthenticated, forbidden, not_found, method_not_allowed, conflict, unsupported_media_type, unprocessable, rate_limited, service_unavailable, internal_error. The set is open: treat any code you don't recognise as a generic error.
  - `param` (string): Request parameter the error refers to, when there is one.
- `401` - Unauthorized
- `403` - Admin role required, or the connection belongs to another user or tenant
  - `error` (string, required)
  - `code` (string): Machine-readable error code. Known values: invalid_input, invalid_id, unauthenticated, forbidden, not_found, method_not_allowed, conflict, unsupported_media_type, unprocessable, rate_limited, service_unavailable, internal_error. The set is open: treat any code you don't recognise as a generic error.
  - `param` (string): Request parameter the error refers to, when there is one.
- `404` - Connection not found
  - `error` (string, required)
  - `code` (string): Machine-readable error code. Known values: invalid_input, invalid_id, unauthenticated, forbidden, not_found, method_not_allowed, conflict, unsupported_media_type, unprocessable, rate_limited, service_unavailable, internal_error. The set is open: treat any code you don't recognise as a generic error.
  - `param` (string): Request parameter the error refers to, when there is one.
- `500` - Internal server error
- `502` - The connection could not be verified with the integration provider
  - `error` (string, required)
  - `code` (string): Machine-readable error code. Known values: invalid_input, invalid_id, unauthenticated, forbidden, not_found, method_not_allowed, conflict, unsupported_media_type, unprocessable, rate_limited, service_unavailable, internal_error. The set is open: treat any code you don't recognise as a generic error.
  - `param` (string): Request parameter the error refers to, when there is one.
