POSTapi.synup.com/api/v4/folders/delete
Delete a folder
This API deletes a specified folder from the account. This action is irreversible.
Behavior:
- Any locations within the folder will be unassigned but not archived.
- Once deleted, the folder cannot be restored.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
input | object | required | |
input.name | string | required | The name of the folder to delete |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/folders/delete' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"name": "Acme New"
}
}'const res = await fetch('https://api.synup.com/api/v4/folders/delete', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"name": "Acme New"
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/folders/delete",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"name": "Acme New"
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/folders/delete", 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 | Folder successfully deleted |
400 | Bad request - folder name is invalid or missing |
403 | Unauthorized - insufficient permissions to delete folder |
404 | Folder not found |
Example response
{
"data": {
"deleteFolder": {
"errors": null,
"success": true
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.deleteFolder | object | optional | |
data.deleteFolder.errors | object | optional | Array of errors if any occurred during deletion |
data.deleteFolder.success | boolean | optional | Indicates if the deletion was successful |