See Stacksync in action with a solution architect. Book a demo ↗
Connections

Connections

Reauthorize a connection

POST
/v1/workspaces/{workspace_id}/connections/{connection_id}/reauthorize

Replace the credentials of a connection after testing them on the app of a sync that uses it. The test covers that sync only, not the other syncs or API proxies of the connection. Answers the connection without its secrets.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace the resources belong to

connection_id*string

The connection to reauthorize

Formatuuid

Query Parameters

region*string

Data region of the resources

Value in"besg""usnv"

Request Body

The new credentials and the sync app to test them on

application/json
  1. body

The new credentials of a connection, tested against the app of a sync that uses it

base_id*string

The sync whose app uses the connection

Formatuuid
app_id*string

The app of the sync that uses the connection (its app_id in the sync)

credentials*

The new credentials, in the shape the connection's app type takes (see the create connection body). connection_id, when sent, must be the connection of the path.

Response Body

The reauthorized connection

application/json
  1. response

The connection written

data*

A connection as the connection routes answer it

Reauthorize a connection
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08/reauthorize?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "base_id": "3f6c1d2e-8a4b-4c7d-9e21-5b6f7a8c9d01",  "app_id": "3f9a1c2e",  "credentials": {    "code": "aPrxk9...",    "account_type": "standard"  }}'
{  "data": {    "connection_id": "c7d8e9f0-2a3b-4c5d-9e6f-7a8b9c0d1e2f",    "connection_name": "Salesforce production",    "app_type": "salesforce",    "is_shared_with_workspace": true,    "created_time": "2026-10-01 09:12:44",    "last_modified_time": "2026-10-01 09:12:44",    "credentials_options": {      "instance_url": "https://acme.my.salesforce.com",      "organization_id": "00D5g000004abcdEAA"    }  }}