---
updatedAt: 2026-04-27T13:22:12.000Z
agentTools:
  projectIndex: https://developers.karte.io/llms.txt
---

# Create a role

#### Required Scope
APIの実行に必要なScopeです。
```
beta.project.role.create
```

#### Required Role
管理画面でScopeを追加する際に必要な権限です。
```
プロジェクト管理 > プロジェクト管理
```


# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.karte.io",
      "description": "Production server"
    },
    {
      "url": "https://api-jp.karte.io",
      "description": "Production JP server. リージョン固定オプションのプロジェクトはこちらのエンドポイントを利用してください."
    }
  ],
  "info": {
    "version": "2.0.0",
    "title": "Project"
  },
  "paths": {
    "/v2beta/project/role/create": {
      "post": {
        "tags": [
          "Role"
        ],
        "summary": "Create a role",
        "description": "#### Required Scope\nAPIの実行に必要なScopeです。\n```\nbeta.project.role.create\n```\n\n#### Required Role\n管理画面でScopeを追加する際に必要な権限です。\n```\nプロジェクト管理 > プロジェクト管理\n```\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_name": {
                    "type": "string",
                    "description": "権限グループの名前"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "指定する権限グループ\n※指定の仕方は [APIにおける権限グループの表示](https://developers.karte.io/reference/scope-of-role) をご参考ください\n"
                  },
                  "description": {
                    "type": "string",
                    "description": "権限グループの説明"
                  }
                },
                "required": [
                  "view_name",
                  "permissions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-karte-api",
            "schema": {
              "type": "string"
            },
            "description": "今後利用する可能性のある予約語です。現在は設定不要です。"
          },
          {
            "in": "header",
            "name": "authorization",
            "schema": {
              "type": "string"
            },
            "description": "認証情報を含むトークンです。\"Authorization\" ヘッダーに `Bearer <token>` の形式で設定してください。"
          },
          {
            "in": "header",
            "name": "content-type",
            "schema": {
              "type": "string"
            },
            "description": "リクエストのコンテンツタイプを指定します。通常は `application/json` を使用してください。"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Role": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "view_name": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-explorer-enabled": false
}
````