---
title: "create team role"
method: POST
path: "/api/v0/team/roles/"
tags: ["Team"]
---

# create team role

`POST /api/v0/team/roles/`

Creates a new role within a team. Only team owners or managers with the appropriate permissions can perform this operation.

CLI Usage: `vastai create team role --name <role_name> --permissions <permissions_json>`

## Request body

- object
  - `name` string, required — Name for the new role
  - `permissions` object, required — JSON object containing permission definitions
    - `api` object — API permissions
      - `user_read` object — Permission to read user info
      - `instance_write` object — Permission to write instances

## Response `200`

Role created successfully

- object
  - `msg` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - User lacks permission

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/revisions/4ed14f79f796/schema)
