---
title: "Access one content object"
url: https://hexelstudio.com/docs/api/titan-agent/agent/content-access
---

# Access one content object

**POST** `/titan/agent/sessions/{id}/content-access`

The caller is a leg of a durable session, with durable sessions on for its agent deployment; it reads every durable session of its organization, agent deployment and runtime principal acting for the same person as it (delegated_user, or no one for both; any other id is NOT_FOUND) and writes only its own (FORBIDDEN). Short-lived access (5 minutes) to one object of the session's content by SHA-256; the bytes go directly between the client and the store, never through Titan. Metadata only (the default data mode): store customer and a signed titan-content-grant+jwt (core/pkg/contentgrant, audience urn:titan:content-store:<td>) that the customer's store verifies with the deployment's verifier keys. Full capture: store titan and a presigned request to Titan's content store; on S3 an upload signs x-amz-checksum-sha256, so the store refuses other bytes. An upload is at most the configured store's own single-upload limit (5 GiB on S3, 5000 MiB on Azure Blob); a larger content_size_bytes is INVALID_REQUEST before anything is signed. With content accounting on, a write of an object the session already holds (found in the store with its declared size and SHA-256) signs nothing and answers already_stored true; one whose upload was found not to be the declared object is RATE_LIMITED until its reservation lapses (24 hours). SERVICE_UNAVAILABLE also when full capture is on and no content store is configured. Body at most 8 KiB; there is no field for content.

## Path parameters

- `id: string`

  The durable session (dss_).

## Headers

- `Authorization: string`

  `Bearer <token>`. Runtime identity token from the identity exchange. Through the public edge, device-bound callers (titand) and workloads of the deployment's attached customer Kubernetes clusters are served. A device-bound caller's requests also carry a Titan-Device-Proof over the path below /v1 (or below the cell prefix), i.e. the /titan/agent/... path; an attached cluster's carry none.

- `Content-Type: string`

  Exact media type with exactly one version parameter.

  One of: `"application/vnd.titan.session-store+json;version=1"`

- `Accept: string`

  Exact media type: type and subtype case-insensitive, exactly one version parameter.

  One of: `"application/vnd.titan.session-store+json;version=1"`

- `Titan-Device-Proof: optional string`

  Per-request EdDSA device proof over method, received path, body digest, and token jti; required for a titan_device_key binding and rejected for a Kubernetes binding.

## Body parameters

- `access: string`

  One of: `"read"`, `"write"`

- `content_sha256: string`

- `content_size_bytes: optional integer`

  Required for write (its exact size), absent for read.

## Returns

`200` The grant or presigned request. (`AgentSessionContentAccessResult`)

- `access: string`

  One of: `"read"`, `"write"`

- `already_stored: optional boolean`

  store titan, write, with content accounting on: true when Titan's store already holds this object for the session, checked as declared; request is null (nothing to upload) and content_location is the location to record. Absent otherwise.

- `content_location: string`

  store titan: the location to record in the event.

- `content_sha256: string`

- `durable_session_id: string`

- `expires_at: string`

- `grant: string`

  store customer: the signed content grant.

- `request: object`

  store titan: send exactly this request with the body.

  - `headers: map[string]`

  - `method: string`

    One of: `"GET"`, `"PUT"`

  - `url: string`

- `store: string`

  One of: `"customer"`, `"titan"`

## Errors

- `400` INVALID_REQUEST: a header outside the allowlist, a duplicate singleton or control character, framing, or a body/argument that fails strict JSON or the closed contract.
- `401` UNAUTHENTICATED: a missing or invalid runtime token, device proof, or mTLS peer, an ineligible session, or assurance below A2.
- `403` FORBIDDEN: a policy deny, a latched kill, or a restricted session; on the Session Store, a caller that is not a leg of a durable session, a write to another durable session, or summaries the session profile turns off; on swarm routes, a mission at its task or board key cap; no object detail.
- `404` NOT_FOUND: an unknown, hidden, or inaccessible capability or object, a query string, or a malformed id; on the Session Store also durable sessions off for the caller's agent deployment; on swarm routes also swarm coordination off for it, or another mission's task, key or session.
- `406` NOT_ACCEPTABLE: an Accept other than the exact media type(s).
- `409` CONTENT_QUOTA_EXCEEDED: under full capture with a content quota, the write would take the organization's recorded content past it (an object the session already wrote counts once).
- `413` PAYLOAD_TOO_LARGE: more than 32 counted headers, a header value over 4 KiB (Authorization 12 KiB), 24 KiB of headers, or an oversized body.
- `415` UNSUPPORTED_MEDIA_TYPE: a Content-Type other than the exact media type.
- `429` RATE_LIMITED: the per-runtime-principal rate or concurrency bound.
- `503` SERVICE_UNAVAILABLE: required local state, the store, the signer, audit capacity, or the executor path is unavailable before safe acceptance (on content access also: no Titan content store configured under full capture).

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/agent/sessions/{id}/content-access' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: CONTENT_TYPE' \
  --header 'Accept: ACCEPT' \
  --header 'Content-Type: application/json' \
  --data '{
  "access": "read",
  "content_sha256": "string",
  "content_size_bytes": 0
}'
```

### Response (200)

```json
{
  "access": "read",
  "already_stored": true,
  "content_location": "string",
  "content_sha256": "string",
  "durable_session_id": "string",
  "expires_at": "2026-01-01T00:00:00Z",
  "grant": "string",
  "request": {
    "headers": {
      "key": "string"
    },
    "method": "GET",
    "url": "string"
  },
  "store": "customer"
}
```

### Response (400)

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (401)

```json
{
  "error": {
    "code": "UNAUTHENTICATED",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (403)

```json
{
  "error": {
    "code": "FORBIDDEN",
    "message": "string",
    "reason": "tool_permissions_organization",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (404)

```json
{
  "error": {
    "code": "NOT_FOUND",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (406)

```json
{
  "error": {
    "code": "NOT_ACCEPTABLE",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (409)

```json
{
  "error": {
    "code": "CONTENT_QUOTA_EXCEEDED",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (413)

```json
{
  "error": {
    "code": "PAYLOAD_TOO_LARGE",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (415)

```json
{
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE",
    "message": "string",
    "request_id": "string",
    "retryable": false
  }
}
```

### Response (429)

```json
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "string",
    "request_id": "string",
    "retryable": true
  }
}
```

### Response (503)

```json
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "string",
    "request_id": "string",
    "retryable": true
  }
}
```
