/api/v4/locations/oauth-disconnectDisconnect one location from a publisher
Severs a single location's connection to a publisher, the counterpart to the per-location OAuth connect URL.
Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
| input | object | required | Wrapper object. The entire request body must be nested under `input`. |
| input.locationId | string | required | Base64-encoded Relay ID of the one location to disconnect. |
| input.site | string | optional | Publisher to disconnect from: `GOOGLE`, `FACEBOOK`, or `APPLE`. Required unless you send `providerId`. |
| input.providerId | string | optional | The publisher's own account identifier, as an alternative to `site`. Required unless you send `site`. |
Sample request
Ready-to-paste body. Replace placeholder IDs and values with yours.
{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "site": "GOOGLE" }}Responses
200Connection removed. Response key `disconnectConnectedAccountsLocations`.
{ "data": { "disconnectConnectedAccountsLocations": { "clientMutationId": null, "success": true, "errors": null } }}401Unauthenticated, missing or invalid API key.
403The key is valid but not permitted to disconnect this location (`SY90003`).
Removes a single location's connection to a publisher. It is the disconnect half of the per-location OAuth flow started by Create an OAuth connect URL for one location.
This route and Disconnect a listing from a location are the same operation behind two paths: both take the identical input body and both return their result under disconnectConnectedAccountsLocations, not under either path's name. Pick whichever path reads better in your integration; there is no behavioural difference.
The body must be wrapped in input and carry a single locationId, plus either site or providerId to say which connection to sever. Sending neither returns SY10056 ("Site is not valid for the location disconnection"); a location with no active connection for that site returns SY10057 rather than a silent success, so success: true really does mean a link was removed. It is not a bulk endpoint, so loop for several locations. To disconnect an entire account's worth of locations at once, use Bulk-disconnect Google accounts instead.
Use case: undoing a mis-targeted connect
When a user connects the wrong publisher listing to a store, disconnect it here with site set to that publisher, then send them back through the connect URL (or run trigger-matches and Connect a listing) to attach the correct one. Disconnecting leaves the location and its data intact; only the outbound sync to that publisher stops.
Use case: a client leaves and takes their Apple Business account
With site: "APPLE", the location stops being published through the owner's Apple Business account. It stays on Apple Maps: later updates are published through the ListingsAPI Apple Business Connect account, and Apple verifies the submission before it publishes. To publish through the owner's account again, send them a new link from Create an OAuth connect URL for one location.
This endpoint changes a live connection. The sample request and response above are examples.
curl -X POST 'https://listingsapi.com/api/v4/locations/oauth-disconnect' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "site": "GOOGLE" } }'