---
title: "Create (or return) the agent's dedicated agent-writable folder"
method: POST
path: "/agents/{agentId}/file-grants/dedicated-folder"
tags: ["Files"]
---

# Create (or return) the agent's dedicated agent-writable folder

`POST /agents/{agentId}/file-grants/dedicated-folder`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/agents/{agentId}/file-grants/dedicated-folder`
- Auth: HTTP bearer

## Path parameters

- `agentId` string, required

## Response `200`

The dedicated folder already existed.

- DedicatedFolderResult
  - `folder` FileNode, required
    - `id` string, uuid, required
    - `clientId` string, uuid, required
    - `parentId` string, uuid, nullable
    - `type` 'folder' | 'file', required
    - `name` string, required
    - `storagePath` string, nullable
    - `mimeType` string, nullable
    - `fileSize` integer, nullable
    - `agentTag` string, uuid, nullable
    - `uploadSource` 'client' | 'agent', nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time
  - `grant` FileGrant: A client file/folder granted to an agent (GET/POST /agents/{agentId}/file-grants).
    - `id` string, uuid, required
    - `agentId` string, uuid, required
    - `nodeId` string, uuid, required
    - `grantedBy` string, uuid
    - `createdAt` string, date-time, required
    - `node` object: Only present on the list endpoint (joined).
      - `id` string, uuid
      - `name` string
      - `type` 'folder' | 'file'
      - `storagePath` string, nullable
      - `mimeType` string, nullable
      - `fileSize` integer, nullable
      - `parentId` string, uuid, nullable
      - `agentTag` string, uuid, nullable
      - `uploadSource` 'client' | 'agent', nullable
  - `existing` boolean, required

## Other responses

- `201`: The dedicated folder was just created.
- `401`: Missing, malformed, or invalid bearer token / API key, or revoked session (SESSION_REVOKED).
- `404`: Not found, or the caller is not authorized to access this resource.

---

[API](https://skmtc.dev/atako/apis/atako-api.md) · [All operations](https://skmtc.dev/atako/apis/atako-api/llms.txt) · [OpenAPI document](https://skmtc.dev/atako/apis/atako-api/revisions/aa555c56fbd7?raw)
