> ## Documentation index
> Fetch the complete documentation index at: https://developer.rhombus.com/llms.txt
> Use it to discover all available pages before exploring further.

# Delete a robot patrol

> Delete a patrol by its patrolUuid; cascades its owned rules.

```http
POST https://api2.rhombussystems.com/api/robot/deletePatrol
```

EU organizations send the same request to `https://api2.eu.rhombussystems.com`.

## Authentication and parameters

- `x-auth-apikey` (header, required): Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
- `x-auth-scheme` (header, string, required, default: `api-token`): Authentication scheme identifier. Use `api-token` for standard API key authentication, `partner-api-token` for partner API key authentication. Must be paired with the `x-auth-apikey` header containing your API key. One of: `api-token`, `api`, `partner-api-token`, `partner-api`.

## Request body

Content type: `application/json`. Delete a patrol by its patrolUuid. Authorization is derived from the patrol's own device/location — no device input is accepted.

- `patrolUuid` (string<RUUID> | null, required): base 64 (url-safe) uuid string

## Response 200

OK. Content type: `application/json`

- `error` (boolean | null)
- `errorMsg` (string | null)
- `patrol` (object): The patrol (device, route reference, deploy rule, waypoint rules)
- `warningMsg` (string | null)

## OpenAPI

````yaml
openapi: 3.0.1
info:
  title: Rhombus API
  version: "1.0"
servers:
  - description: Production Server
    url: https://api2.rhombussystems.com
security:
  - ApiKeyAuth: []
paths:
  /api/robot/deletePatrol:
    post:
      description: Delete a patrol by its patrolUuid; cascades its owned rules.
      operationId: deletePatrol
      parameters:
        - description: Authentication scheme identifier. Use `api-token` for standard API key authentication, `partner-api-token` for partner API key authentication. Must be paired with the `x-auth-apikey` header containing your API key.
          example: api-token
          in: header
          name: x-auth-scheme
          required: true
          schema:
            default: api-token
            enum:
              - api-token
              - api
              - partner-api-token
              - partner-api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Robot_DeletePatrolWSRequest"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Robot_DeletePatrolWSResponse"
          description: OK
      summary: Delete a robot patrol
      tags:
        - Robot Webservice
components:
  schemas:
    Robot_DeletePatrolWSRequest:
      description: Delete a patrol by its patrolUuid. Authorization is derived from the patrol's own device/location — no device input is accepted.
      properties:
        patrolUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
      required:
        - patrolUuid
      type: object
    Robot_DeletePatrolWSResponse:
      description: The deleted patrol, or null if none existed.
      properties:
        error:
          nullable: true
          type: boolean
        errorMsg:
          nullable: true
          type: string
        patrol:
          $ref: "#/components/schemas/RobotPatrol"
        warningMsg:
          nullable: true
          type: string
      type: object
    RobotPatrol:
      description: The patrol (device, route reference, deploy rule, waypoint rules)
      properties:
        createdAtMs:
          format: int64
          nullable: true
          type: integer
        deviceUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        enabled:
          nullable: true
          type: boolean
        mapUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        name:
          nullable: true
          type: string
        orgUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        routeUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        triggerRuleUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        updatedAtMs:
          format: int64
          nullable: true
          type: integer
        uuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        waypointRules:
          additionalProperties:
            items:
              description: base 64 (url-safe) uuid string
              example: AAAAAAAAAAAAAAAAAAAAAA
              format: RUUID
              nullable: true
              type: string
            nullable: true
            type: array
          nullable: true
          type: object
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
      in: header
      name: x-auth-apikey
      type: apiKey
    oauth2:
      description: 'OAuth 2.0 authorization code flow with PKCE (`S256`). Send the access token as `Authorization: Bearer <token>`. Each operation lists the scopes it requires; a token without them is refused 403 with `WWW-Authenticate: Bearer error="insufficient_scope"`.'
      flows:
        authorizationCode:
          authorizationUrl: https://console.rhombus.com/oauth/authorize
          refreshUrl: https://auth-web.rhombussystems.com/oauth/token
          scopes:
            physical: Unlock doors and elevators, lockdown, alarms, speakers and robots
            read: View cameras, footage and settings
            write: Change settings and data
          tokenUrl: https://auth-web.rhombussystems.com/oauth/token
      type: oauth2
````
