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

Add folders to user

This API associates one or more folders with a specified user, granting them access to manage those folders.

Behavior:

  • Supports assigning multiple folders to a single user.
  • Updates the user's permissions based on assigned folders.
Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Body

NameTypeRequiredDescription
inputobjectoptional
input.userIdstringrequiredBase64 encoded user ID
input.folderIdsarray of stringrequiredArray of folder UUIDs to associate with the user
input.defaultFolderIdstringrequired

Request

Request
curl -X POST 'https://api.synup.com/api/v4/users/folders/add' \
  -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"
    ],
    "defaultFolderId": "c1d92c09-8ddd-469e-af96-0eb64a48d647"
  }
}'

Responses

StatusDescription
200Successfully added folders to user
Example response (generated from the schema)
{
  "data": {
    "addFoldersForUser": {
      "status": [
        {
          "errors": [
            "string"
          ],
          "folderId": "00000000-0000-0000-0000-000000000000",
          "success": true
        }
      ]
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.addFoldersForUserobjectoptional
data.addFoldersForUser.statusarray of objectoptional
data.addFoldersForUser.status[].errorsarray of stringoptional
data.addFoldersForUser.status[].folderIdstringoptional
data.addFoldersForUser.status[].successbooleanoptional