---
title: "Share a document or a secret with an agent"
method: POST
path: "/agents/{agentId}/shared"
tags: ["Agent Shared Items"]
---

# Share a document or a secret with an agent

`POST /agents/{agentId}/shared`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/agents/{agentId}/shared`
- Auth: HTTP bearer

## Path parameters

- `agentId` string, uuid, required

## Request body

- object
  - `type` 'document' | 'secret', required
  - `name` string, required
  - `value` string, required
  - `mimeType` string
  - `fileSize` integer

## Response `201`

- AgentSharedItem: A document or secret shared with an agent. `value` is only returned by the detail and create endpoints.
  - `id` string, uuid, required
  - `agentId` string, uuid, required
  - `uploadedBy` string, uuid
  - `type` 'document' | 'secret', required
  - `name` string, required
  - `mimeType` string, nullable
  - `fileSize` integer, nullable
  - `value` string
  - `createdAt` string, date-time, required

## Other responses

- `400`: type, name, value required / invalid type
- `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)
