---
title: "[Beta] Create a login role for CLI with temporary password"
method: POST
path: "/v1/projects/{ref}/cli/login-role"
tags: ["Database"]
---

# [Beta] Create a login role for CLI with temporary password

`POST /v1/projects/{ref}/cli/login-role`

## Path parameters

- `ref` string, required

## Request body

- CreateRoleBody
  - `read_only` boolean, required

## Response `201`

- CreateRoleResponse
  - `role` string, required
  - `password` string, required
  - `ttl_seconds` integer, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `429` — Rate limit exceeded
- `500` — Failed to create login role

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
