---
title: "[BETA] Request generation of key/secret that allow caller to assume target role"
method: POST
path: "/iam-role/{id}/assume"
tags: ["role"]
---

# \[BETA\] Request generation of key/secret that allow caller to assume target role

`POST /iam-role/{id}/assume`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/iam-role/{id}/assume`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/iam-role/:id/assume/post.ts> (a function with typed inputs; its response is checked against the schema)

[BETA] Request generation of key/secret that allow caller to assume target role

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `ttl` integer, required: TTL in seconds for the generated access key (cannot exceed the max TTL defined in the targeted assume role)

## Response `200`

200

- object
  - `key` string
  - `name` string
  - `org-id` string
  - `role-id` string
  - `secret` string
  - `expires-at` string

## Changes

- **2026-11-06** `63da6f74c845`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/iam-role/:id/assume/post.md)

---

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