---
title: "Stop sharing the accounts the owner left"
method: POST
path: "/api/v1/banking/ponto/connections/{id}/leave"
tags: ["Money"]
---

# Stop sharing the accounts the owner left

`POST /api/v1/banking/ponto/connections/{id}/leave`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/banking/ponto/connections/{id}/leave`
- Auth: API key in cookie `better-auth.session_token`

Accounts a connection shares that the owner did not pair are taken out of what Ponto reads for us, which also stops Ponto billing for them. An account already paired on this team is left alone. Where the connection reads nothing and the request names every account it still shares, the whole connection is ended at Ponto instead. Where the shared accounts cannot be listed, or one is not named, only the named ones stop and the connection stays. Sent again after a lost answer it answers the same and asks Ponto nothing twice. Owners only, and the person who started the connection, so what they shared can be left even once they are no longer an owner.

## Path parameters

- `id` string, required

## Request body

- object
  - `externalAccountIds` string[], required: Ponto’s own ids for the shared accounts the owner left, from `/ponto/callback`.

## Response `200`

What stopped.

- object
  - `ok` unknown, required
  - `data` object, required
    - `stopped` number, required: Accounts the bank was asked to stop sharing. One already paired on this team is left alone.
    - `ended` boolean, required: Whether the whole connection ended, because it read nothing and every account it shared was left.
    - `atPonto` boolean, required: Whether Ponto confirmed every stop, and the end where there was one.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The connection is not live, or the bank refused.
- `403`: Only an owner of the team may do this, and support may not do it for a customer. A member is refused with `details.reason` `owner_only`.
- `404`: No such connection on this team.
- `409`: Another check is reading the bank right now. Ask again in a moment.

---

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