---
# @generated by sylphx-gen. Do not edit.
title: "Write part on a transfer"
description: "`agents.transfers.write_part` (POST /v1/{name}:writePart): Stores at most 256 KiB of exact bytes under its declared part digest."
type: reference
product: agents
summary: "Stores at most 256 KiB of exact bytes under its declared part digest."
updated: 2026-09-28
nav: false
---

Stores at most 256 KiB of exact bytes under its declared part digest. An acknowledgement loss can repeat the identical part without mutation.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/transfers/transfer:writePart`
- **Scope** `agents:sessions`
- **Effect** `write` — a successful call changes state.
- **Collection** [transfers](/docs/api/transfers)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Exact transfer name. Required. |
| `index` | `int64` | Zero-based declared part index. Required. |
| `data` | `bytes` | Base64 on the JSON wire; exact binary bytes, at most 256 KiB decoded. Required. Never returned again. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `index` | `int64` | Zero-based index in the immutable manifest. |
| `bytes` | `int64` | Exact stored byte count. |
| `sha256` | `string` | SHA-256 of the exact binary body. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.
- [`RESOURCE_ALREADY_EXISTS`](/docs/api/errors/RESOURCE_ALREADY_EXISTS) — A Resource with this name exists.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/transfers/transfer:writePart" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":"…","index":1}'
```

**TypeScript**

```ts
const response = await sylphx.agents.transfers.writePart({ data: '…', index: 1, name: 'orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/transfers/transfer' })
```

**Rust**

```rust
let mut req = sylphx::agents::WriteAgentSessionTransferPartRequest::default();
req.data = "…".to_string();
req.index = 1;
req.name = "orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/transfers/transfer".to_string();
let response = sx.agents().transfers().write_part(req).await?;
```

**CLI**

```bash
sylphx agents transfers write-part orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/transfers/transfer
```

**MCP**

```json
{ "method_id": "agents.transfers.write_part", "args": {"data":"…","index":1,"name":"orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/transfers/transfer"} }
```
