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

# Xóa chính sách

> Xóa chính sách khỏi agent.

### Tham số đường dẫn

<ParamField path="id" type="string" required>
  ID chính sách cần xóa (ví dụ: `pol_abc123`).
</ParamField>

<Warning>
  Xóa chính sách sẽ loại bỏ ràng buộc ngay lập tức. Hãy đảm bảo bạn có các chính sách khác để duy trì bảo mật.
</Warning>

### Ví dụ

```bash theme={null}
curl -X DELETE https://api.agentwallex.com/api/v1/policies/pol_abc123 \
  -H "X-API-Key: awx_your_api_key"
```


## OpenAPI

````yaml DELETE /api/v1/policies/{id}
openapi: 3.1.0
info:
  title: AgentWallex API
  description: >-
    REST API for managing AI agent wallets, on-chain transactions, spending
    policies, webhooks, and x402 micropayments.
  version: 1.0.0
  contact:
    name: AgentWallex Support
    url: https://agentwallex.com
servers:
  - url: https://api.agentwallex.com
    description: Production
  - url: https://api-sandbox.agentwallex.com
    description: Sandbox
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Agents
    description: Create and manage AI agent wallets.
  - name: Transactions
    description: Send payments and query transaction history.
  - name: Policies
    description: Configure spending limits and access controls.
  - name: Webhooks
    description: Register and manage webhook endpoints.
  - name: x402
    description: x402 micropayment negotiation and session management.
paths:
  /api/v1/policies/{id}:
    delete:
      tags:
        - Policies
      summary: Delete Policy
      description: >-
        Remove a policy from an agent. Deleting a policy removes the constraint
        immediately.
      operationId: deletePolicy
      parameters:
        - name: id
          in: path
          required: true
          description: The policy ID to delete (e.g., `pol_abc123`).
          schema:
            type: string
      responses:
        '200':
          description: Policy deleted successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The deleted policy ID.
                  deleted:
                    type: boolean
                    description: Confirmation of deletion.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    Unauthorized:
      description: Missing or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: authentication_failed
            type: authentication_error
            message: The provided API key is invalid or expired.
    Forbidden:
      description: Insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: insufficient_permissions
            type: authorization_error
            message: You do not have permission to perform this action.
    NotFound:
      description: Resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: resource_not_found
            type: not_found_error
            message: The requested resource was not found.
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: rate_limit_exceeded
            type: rate_limit_error
            message: Too many requests. Please retry after a short delay.
    InternalError:
      description: Server-side error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: server_error
            type: internal_error
            message: An unexpected error occurred. Please try again later.
  schemas:
    ErrorResponse:
      type: object
      description: Standard error response.
      required:
        - code
        - type
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - authorization_error
            - not_found_error
            - rate_limit_error
            - internal_error
          description: Error type category.
        message:
          type: string
          description: Human-readable error description.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key authentication. Keys are prefixed with `awx_`.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT bearer token authentication.

````