---
title: "Complete a connect flow"
method: POST
path: "/v1/integrations/callback/{provider}"
tags: ["integrations"]
---

# Complete a connect flow

`POST /v1/integrations/callback/{provider}`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/integrations/callback/{provider}`
- Auth: HTTP bearer

Records the connected account (bound to the verified tenant) and enqueues a tool sync.

## Path parameters

- `provider` string, required

## Headers

- `X-Tenant-Id` string, nullable

## Request body

- CompleteConnectBody: Connect-callback body. ``extra="allow"`` keeps provider-specific fields without baking them into the contract; the required two are what a poll-flow provider (Composio) must return to bind the exact account it minted. A redirect-flow provider records the account SERVER-SIDE after consent (webhook / pull-poll) and the dashboard confirms by watching its accounts list, so it never posts here.
  - `app_slug` string, required
  - `connected_account_id` string, required
  - `app_name` string, nullable
  - `visibility` 'team' | 'personal': Who, within a tenant, may use a connected account's tools. ``TEAM``: any actor in the tenant. ``PERSONAL``: only the actor who connected it. Designed to extend to a ``GROUP`` scope later (the Groups model is already on main).

## Response `202`

Successful Response

- ConnectedAccountResponse
  - `id` string, uuid, required
  - `provider` string, required
  - `app_slug` string, nullable
  - `status_code` string, required
  - `visibility_code` 'team' | 'personal': Who, within a tenant, may use a connected account's tools. ``TEAM``: any actor in the tenant. ``PERSONAL``: only the actor who connected it. Designed to extend to a ``GROUP`` scope later (the Groups model is already on main).
  - `sync_enqueued` boolean, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
