---
title: "Record a finished authorization [write]"
method: POST
path: "/connectors/connections/complete"
tags: ["connectors"]
---

# Record a finished authorization \[write\]

`POST /connectors/connections/complete`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/connectors/connections/complete`
- Auth: HTTP bearer

Call this when the browser arrives at `success_url`. The account is checked against the caller's own accounts at the app's provider, so an account somebody else authorized is refused; without `account_id` the caller's newest account for the app is used. Preserve the optional `account_source` returned in the callback to select the same provider when an account id is absent; every account remains bound to the authenticated caller and app. Every task of the caller that was waiting on the app continues. Answers 404 when the caller has no such account and 502 `connect_error` when the provider cannot be read.

## Request body

- object
  - `app` string, required
  - `account_id` string
  - `account_source` 'google_native' | 'pipedream'

## Response `200`

OK

- object
  - `connection` object, required
    - `app` string, required
    - `app_name` string, required
    - `label` string, required
    - `credit_grant` object, nullable, required: Credit given for this connection, when connecting apps earns credit. `status` is granted, already_granted, cap_reached or ineligible.
      - `status` string, required
      - `amount_usd` number
      - `earned_usd` number
      - `cap_usd` number

## Other responses

- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/connectors/connections/complete/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
