Skip to content
SynupAPI
Get an API key
POSTapi.synup.com/api/v4/users/locations/remove

Remove Locations for User

This API removes specific locations associated with a user, revoking their access to those locations.

Behavior:

  • Supports removing one or multiple locations from a user.
  • Updates the user’s permissions and access scope accordingly.
Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Body

NameTypeRequiredDescription
inputobjectrequired
input.userIdstringrequiredBase64 encoded user ID
input.locationIdsarray of stringrequired

Request

Request
curl -X POST 'https://api.synup.com/api/v4/users/locations/remove' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "userId": "VXNlcjoxMDA1Mw==",
    "locationIds": [
      "TG9jYXRpb246NTE1MzA=",
      "TG9jYXRpb246NTE1MjY="
    ]
  }
}'

Responses

StatusDescription
200Successfully removed locations for user
Example response (generated from the schema)
{
  "data": {
    "removeLocationsForUser": {
      "status": [
        {
          "errors": [
            "string"
          ],
          "locationId": "string",
          "success": true
        }
      ]
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.removeLocationsForUserobjectoptional
data.removeLocationsForUser.statusarray of objectoptional
data.removeLocationsForUser.status[].errorsarray of stringoptionalArray of error messages if any
data.removeLocationsForUser.status[].locationIdstringoptionalBase64 encoded location ID that was removed
data.removeLocationsForUser.status[].successbooleanoptionalWhether the location was successfully removed