For AI agents: the complete documentation index is available at https://docs.snaptrade.com/llms.txt, and the full documentation text is available at https://docs.snaptrade.com/llms-full.txt. Markdown versions of documentation pages are available by appending .md to the URL path.
View as Markdown
Connections

Force disable connection

post
https://api.snaptrade.com/authorizations/{authorizationId}/disable

Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a CONNECTION_BROKEN webhook for the connection.

This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.

Execute an API Request

Authentication Method

Use commercial authentication when acting on behalf of your application and passing end-user credentials with requests that require them.

Credentials
Path
authorizationIdstring (format: uuid)required

Unique identifier for the connection (brokerage_authorization_id). This is the UUID used to reference the connection in SnapTrade.

Request
Installation
$
npm install snaptrade-typescript-sdk
1
import {
2
Snaptrade,
3
SnaptradeAuth,
4
} from "snaptrade-typescript-sdk";
5
6
const snaptrade = new Snaptrade({
7
auth: SnaptradeAuth.commercialApiKey({
8
consumerKey: "CONSUMER_KEY",
9
clientId: "CLIENT_ID",
10
}),
11
});
12
13
const response =
14
await snaptrade.connections.disableBrokerageAuthorization(
15
{
16
authorizationId:
17
"87b24961-b51e-4db8-9226-f198f6518a89",
18
userId: "USER_ID",
19
userSecret: "USER_SECRET",
20
},
21
);
22
console.log(response.data);

Response fields

object

Confirmation that the connection has been disabled.

detailstring

Connection disabled confirmation

1
{
2
"detail": "Connection 0b3ebefb-ed47-43df-cd8f-729a4420b5cf has been disabled"
3
}