---
agentTools:
  projectIndex: https://percolate.dev/llms.txt
---

# /api/v5/role/{role_id}

Delete a role.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Percolate V5 OpenAPI Specification",
    "description": "The Percolate API is RESTful in nature. Our APIs use HTTP resource-oriented URLs. HTTP methods are used to issue requests. HTTP response codes are used to indicate API successes or failures. All API requests and responses are in JSON representation. This document describes the HTTP resources and methods that form the Percolate API.\n",
    "version": "1.0.0",
    "contact": {
      "name": "Percolate Engineering"
    }
  },
  "servers": [
    {
      "url": "https://percolate.com"
    },
    {
      "url": "https://devolate.com"
    }
  ],
  "tags": [
    {
      "name": "Role"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "description": "Percolate supports OAuth 2.0 for authenticating all API requests.\n",
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://percolate.com/api/v5/authorize",
            "tokenUrl": "https://percolate.com/api/v5/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/api/v5/role/{role_id}": {
      "parameters": [
        {
          "name": "role_id",
          "in": "path",
          "required": true,
          "schema": {
            "pattern": "^role:[a-zA-Z0-9_-]+$",
            "type": "string"
          }
        }
      ],
      "delete": {
        "description": "Delete a role.",
        "operationId": "deleteRole",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "oauth2": [
              "role:delete"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was deleted successfully."
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid authorization or resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 93,
      "1": 205,
      "2": 195,
      "3": 215,
      "4": 75,
      "5": 71,
      "6": 148,
      "7": 0,
      "8": 18,
      "9": 126,
      "10": 128,
      "11": 225
    }
  }
}
```