> For the complete documentation index, see [llms.txt](https://apidocs.zerionsoftware.com/doc/iformbuilder-v81/llms.txt)

# Delete Folder Icons

> DELETE /profiles/{profile_id}/icons/{folder}
> 
> Deletes icons from an icon folder of the profile. Today the only folder is `drawing_custom_icons`, the custom icon set of the Drawing element.
> 
> ### Request body
> 
> A single `{ "url": ... }` object or a JSON array of them, using the urls returned by `GET` or `POST` on this path.
> 
> ### Scope
> 
> Only the file name (the part after the last `/`) of each url is used. The object deleted is always `{servername}/{profile_id}/{folder}/{file name}`, so a url cannot reach another folder or another profile. A file name that does not exist in the folder is not reported as an error.
> 
> ### Storage failures
> 
> Each icon whose file storage fails to remove is reported, and its file is still served at its url. A single `{ "url": ... }` object answers `502`. An array answers per item: `207` when some icons were removed, `400` when none were.
> 
> ### Authorization
> 
> Restricted to internal client apps, the same as `DELETE /profiles/{profile_id}/icons`.



## Servers
- https://api.iformbuilder.com/exzact/api/v81/[servername]: https://api.iformbuilder.com/exzact/api/v81/[servername]


## Authentication methods
- Oauth2


## Parameters
### Headers

- **Authorization** (string)
  e.g. Bearer {access_token}


### Path parameters

- **profile_id** (string)
  id of the profile

- **folder** (string)
  name of the icon folder



### Body: application/json (object)

- **url** (string)



## Responses
### 200
OK - the icons were deleted. One url in the request returns a single `IconOutcome`; more than one returns an array, in request order.

#### Body: application/json (object)
- **url** (string)
  the icon's url; on POST, the url of the stored icon, on DELETE, the url exactly as submitted. Absent when the item failed.

- **error_message** (string)
  present only when the item failed


### 207
Multi-Status - an array request where storage removed some icons and failed to remove others. The body has the same shape as `200`; failed items carry `error_message` instead of `url`, and their files are still in storage.

#### Body: application/json (array[object])
- **url** (string)
  the icon's url; on POST, the url of the stored icon, on DELETE, the url exactly as submitted. Absent when the item failed.

- **error_message** (string)
  present only when the item failed


### 400
Bad Request - an item has no `url`, an empty `url`, or a `url` with no plain file name; nothing is deleted. Or an array request where storage failed to remove every icon; the body then has the same shape as `200`, with an `error_message` on each item.

#### Body: application/json (object)
- **url** (string)
  the icon's url; on POST, the url of the stored icon, on DELETE, the url exactly as submitted. Absent when the item failed.

- **error_message** (string)
  present only when the item failed


### 401
Unauthorized - missing or invalid bearer token.

### 403
Forbidden - the token is not from an internal client app, or `profile_id` is not the caller's own profile.

### 404
Not Found - `folder` is not an allowed icon folder, or `profile_id` does not exist.

### 502
Bad Gateway - a single-object request whose icon file storage failed to remove. The file is still in storage, and the body carries `error_message`.

#### Body: application/json (object)
- **url** (string)
  the icon's url; on POST, the url of the stored icon, on DELETE, the url exactly as submitted. Absent when the item failed.

- **error_message** (string)
  present only when the item failed



[Powered by Bump.sh](https://bump.sh)
