> ## Documentation Index
> Fetch the complete documentation index at: https://etherspot.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# deletePolicy/{id}

> Deletes a policy by its ID.

Example values you can use to demo the API:

```json theme={null}
{
  "headers": {
    "apikey": "your_api_key_here"
  },
  "pathVariables": {
    "id": "policy_id_here"
  }
}
```

Example response:

```json theme={null}
{
  "message": "Policy deleted successfully."
}
```


## OpenAPI

````yaml arka delete /deletePolicy/{id}
openapi: 3.0.3
info:
  title: Etherspot Arka Paymaster API
  version: 3.1.3
servers:
  - url: https://rpc.etherspot.io/paymaster
security: []
tags:
  - name: Arka
    externalDocs:
      description: Find out more about Arka
      url: https://etherspot.fyi/arka
externalDocs:
  description: Find out more about Arka
  url: https://etherspot.fyi/arka
paths:
  /deletePolicy/{id}:
    delete:
      summary: deletePolicy/{id}
      description: Deletes a policy by its ID.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
          description: The ID of the policy to delete
        - in: header
          name: apikey
          required: true
          schema:
            type: string
          description: API key for authentication
      responses:
        '200':
          description: Successfully deleted policy
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Successfully deleted policy with id 123
        '400':
          description: >-
            Bad Request - Invalid ID or API key does not exist for the wallet
            address
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid sponsorship policy ID
        '401':
          description: Unauthorized - Wallet address does not match for the API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Wallet address does not match for the API key
        '404':
          description: Not Found - Sponsorship policy not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Sponsorship policy not found
        '500':
          description: Internal Server Error - Failed to delete sponsorship policy
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to delete sponsorship policy

````