---
updatedAt: 2025-08-11T18:18:17.000Z
agentTools:
  projectIndex: https://docs.keycafe.com/llms.txt
---

# Edit Permission

Edit a permission with a PUT request to the endpoint with the permission ID.

The post body should contain the data to be updated as a JSON object:

```json json
{
    "role": "ADMINISTRATOR"
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Keycafe API",
    "version": "0"
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-languages": [
    "shell",
    "python",
    "go"
  ],
  "servers": [
    {
      "url": "https://www.keycafe.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "paths": {
    "/v0/permission/{permission_id}": {
      "put": {
        "tags": [
          "Permission"
        ],
        "summary": "Edit Permission",
        "description": "Edit a permission with a PUT request to the endpoint with the permission ID.",
        "operationId": "edit-permission",
        "parameters": [
          {
            "name": "permission_id",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the permission. </br> Example:123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "description": "The permission role: RESERVATION_ACCESS, EXCHANGE_ONLY, ADMINISTRATOR, VIEW_ONLY (deprecated).",
                    "enum": [
                      "VIEW_ONLY",
                      "EXCHANGE_ONLY",
                      "ADMINISTRATOR",
                      "RESERVATION_ACCESS"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Permission updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Unique identifier of the permission.",
                      "example": 123456
                    },
                    "role": {
                      "type": "string",
                      "description": "Updated role assigned to the user (e.g., VIEW_ONLY, ADMINISTRATOR).",
                      "example": "VIEW_ONLY"
                    },
                    "user": {
                      "type": "object",
                      "description": "Updated user information for the permission.",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Unique identifier of the user.",
                          "example": 654321
                        },
                        "firstName": {
                          "type": "string",
                          "description": "First name of the user.",
                          "example": "Bob"
                        },
                        "lastName": {
                          "type": "string",
                          "description": "Last name of the user.",
                          "example": "Smith"
                        },
                        "type": {
                          "type": "string",
                          "description": "Type of the user (e.g., FULL, SMARTBOX).",
                          "example": "FULL"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "description": "Email address of the user.",
                          "example": "user@yourdomain.com"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": 123456,\n    \"role\": \"VIEW_ONLY\",\n    \"user\": {\n        \"id\": 654321,\n        \"firstName\": \"Bob\",\n        \"lastName\": \"Smith\",\n        \"type\": \"FULL\",            \n        \"email\": \"user@yourdomain.com\"\n    }\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```