---
title: "Delete a custom role."
method: DELETE
path: "/api/v1/teams/roles/{roleId}"
tags: ["Team Roles"]
---

# Delete a custom role.

`DELETE /api/v1/teams/roles/{roleId}`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/teams/roles/{roleId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/teams/roles/:roleId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Deletes a custom role belonging to this team. Reserved system roles cannot be deleted, and a role cannot be deleted while it still has members assigned, has pending invitations, or is set as an organization's default SSO role.

## Path parameters

- `roleId` integer, required

## Response `200`

Custom role deleted successfully. It will no longer appear in GET /teams/roles results.

- object
  - `status` 'error' | 'success': The status of the response
  - `data` object
    - `deleted` boolean: Always true when the request succeeds.

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/teams/roles/:roleId/delete.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
