> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Delete an authentication flow

`DELETE /api/web/v2/authenticationflows/{id}`

Delete the specified authentication flow. Caller requires the CONTEXTRULES:REMOVE permission.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| id | path | Yes | string | The UUID of the authentication flow to be removed. |

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "required": [
    "deleted"
  ],
  "type": "object",
  "properties": {
    "deleted": {
      "type": "boolean",
      "description": "Indicates if the authentication flow was deleted.",
      "example": true
    },
    "error": {
      "type": "object",
      "properties": {
        "errorCode": {
          "type": "string",
          "description": "Error Codes specific to cause of failure.",
          "example": "invalid_user_response"
        },
        "errorMessage": {
          "type": "string",
          "description": "Additional Error Message describing the error.",
          "example": "Application id cannot be null"
        },
        "parameters": {
          "type": "array",
          "description": "Optional additional error information.",
          "items": {
            "type": "object",
            "description": "Optional additional error information."
          }
        }
      },
      "description": "Object containing information about errors reported by services.",
      "title": "ErrorInfo"
    },
    "resourceRules": {
      "type": "array",
      "description": "List of resource rules using the authentication flow if the delete fails because the authentication flow is in use. It will be null in any other case.",
      "items": {
        "type": "string",
        "description": "List of resource rules using the authentication flow if the delete fails because the authentication flow is in use. It will be null in any other case."
      }
    }
  },
  "description": "The DeleteAuthenticationFlowResult contains the outcome of an authentication flow delete operation. It will indicate if the operation succeeded and, if it failed, it will include error information describing why the operation failed.",
  "title": "DeleteAuthenticationFlowResult"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "CONTEXTRULES:REMOVE"
    ]
  }
]
```
