> ## Documentation Index
> Fetch the complete documentation index at: https://syteca.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Folder

> Syteca ACB REST API endpoint to delete a folder. Requires the folder to be empty (no child folders or secrets).

Deletes a folder. The folder must be **empty** — contain no child folders and no secrets — before deletion.

<Note>
  For ACB deployments updated from a version prior to 1.2, switch to the `https://{hostname}/EkranACB` server in the Playground.
</Note>

### Permissions required

The user owning the Access Token must have **Owner** role on the folder.

### Errors

See [Status codes](/docs/api/acb/api-reference#status-codes). Common errors:

* **403 Forbidden** — user lacks Owner role.
* **404 Not Found** — folder doesn't exist.
* **409 Conflict** — folder is not empty. Remove its contents first.

## Related

<CardGroup cols={2}>
  <Card title="Get folder" icon="folder-open" href="/docs/api/acb/endpoints/get-folder">Verify folder existence before deletion.</Card>
  <Card title="Delete secret" icon="trash" href="/docs/api/acb/endpoints/delete-secret">Remove secrets from the folder first.</Card>
  <Card title="Update folder" icon="folder-pen" href="/docs/api/acb/endpoints/update-folder">Move (don't delete) a folder by changing its parent.</Card>
  <Card title="API reference" icon="square-code" href="/docs/api/acb/api-reference">Status codes.</Card>
</CardGroup>


## OpenAPI

````yaml DELETE /api/folders/{id}
openapi: 3.0.3
info:
  title: Application Credentials Broker API
  description: >-
    API for managing secrets and folders in the Application Credentials Broker
    system
  version: 1.4.0
  contact:
    name: API Support
    email: support@example.com
servers:
  - url: https://your-syteca-host/SytecaACB
    description: On-premises Syteca ACB service (v1.2 or later)
    variables:
      hostname:
        default: your-syteca-host.example.com
        description: Your Syteca Application Server hostname
  - url: https://your-syteca-host/EkranACB
    description: Legacy URL prefix for ACB deployments updated from pre-v1.2
    variables:
      hostname:
        default: your-syteca-host.example.com
        description: Your Syteca Application Server hostname
security:
  - AccessTokenAuth: []
paths:
  /api/folders/{id}:
    delete:
      tags:
        - Folders
      summary: Delete folder
      description: Deletes a folder by its ID
      operationId: deleteFolder
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the folder to delete
          schema:
            type: integer
            format: int32
            minimum: 1
      responses:
        '204':
          description: Folder deleted successfully
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Folder not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
      required:
        - status
        - message
  securitySchemes:
    AccessTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Access token for authentication

````