---
title: "Open an audited session under a role"
method: POST
path: "/v1/project/{name}/role/{roleId}/assume"
tags: ["Role contracts"]
---

# Open an audited session under a role

`POST /v1/project/{name}/role/{roleId}/assume`

## Request

- Base URL: `https://api.chainmemory.ai`
- URL: `https://api.chainmemory.ai/v1/project/{name}/role/{roleId}/assume`
- Auth: API key in header `x-api-key`

Pins the contract version and hash plus the Brain state hash at that instant, and returns the owner's declared working environment. Fee: 0.001 AIC. Auto-releases after 60 minutes. One open session per role.

## Path parameters

- `name` string, required
- `roleId` string, required

## Request body

- object
  - `platform` string: Executor: claude, chatgpt, gemini

## Response `201`

Session open

## Other responses

- `402`: insufficient_aic
- `404`: role contract not found
- `409`: contract not active, or the role already has an open session

---

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