POSTapi.synup.com/api/v4/users/folders/remove
Remove Folders 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
| Name | Type | Required | Description |
|---|---|---|---|
input | object | required | |
input.userId | string | required | Base64 encoded user ID |
input.folderIds | array of string | required | Array of folder UUIDs to remove for the user |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/users/folders/remove' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"userId": "VXNlcjoxMDAyOA==",
"folderIds": [
"c1d92c09-8ddd-469e-af96-0eb64a48d647",
"a5af4f5d-41b6-4a8a-b24f-98741b021b7b"
]
}
}'const res = await fetch('https://api.synup.com/api/v4/users/folders/remove', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"userId": "VXNlcjoxMDAyOA==",
"folderIds": [
"c1d92c09-8ddd-469e-af96-0eb64a48d647",
"a5af4f5d-41b6-4a8a-b24f-98741b021b7b"
]
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/users/folders/remove",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"userId": "VXNlcjoxMDAyOA==",
"folderIds": [
"c1d92c09-8ddd-469e-af96-0eb64a48d647",
"a5af4f5d-41b6-4a8a-b24f-98741b021b7b"
]
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/users/folders/remove", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successfully removed folders for user |
Example response (generated from the schema)
{
"data": {
"removeFoldersForUser": {
"status": [
{
"errors": [
"string"
],
"folderId": "00000000-0000-0000-0000-000000000000",
"success": true
}
]
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.removeFoldersForUser | object | optional | |
data.removeFoldersForUser.status | array of object | optional | |
data.removeFoldersForUser.status[].errors | array of string | optional | Array of error messages if any |
data.removeFoldersForUser.status[].folderId | string | optional | UUID of the folder being removed |
data.removeFoldersForUser.status[].success | boolean | optional | Whether the folder was successfully removed |