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

# Update a policy



## OpenAPI

````yaml /api-reference/openapi.json put /v1/policies/{id}
openapi: 3.0.3
info:
  title: XentFi API
  version: 1.0.0
  description: >-
    API documentation for XentFi.The XentFi API gives you access to pretty much
    all the features you can use on our dashboard and lets you extend them for
    use in your application. It strives to be RESTful and is organized around
    the main resources you would be interacting with - with a few notable
    exceptions.
servers:
  - url: https://api.xentfi.com
    description: Production server
security: []
tags: []
paths:
  /v1/policies/{id}:
    put:
      tags:
        - Policies
      summary: Update a policy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agentId:
                  type: string
                  nullable: true
                name:
                  type: string
                isActive:
                  type: boolean
                priority:
                  type: integer
                perTransactionLimitUsd:
                  type: number
                  nullable: true
                dailyLimitUsd:
                  type: number
                  nullable: true
                weeklyLimitUsd:
                  type: number
                  nullable: true
                monthlyLimitUsd:
                  type: number
                  nullable: true
                allowedRecipients:
                  type: array
                  items:
                    type: string
                allowedAssetIds:
                  type: array
                  items:
                    type: string
                allowedBlockchainIds:
                  type: array
                  items:
                    type: string
                allowedDaysOfWeek:
                  type: array
                  items:
                    type: integer
                allowedHourStart:
                  type: integer
                  nullable: true
                allowedHourEnd:
                  type: integer
                  nullable: true
                timezone:
                  type: string
                  enum:
                    - UTC
                    - America_New_York
                    - America_Los_Angeles
                    - America_Chicago
                    - Europe_London
                    - Europe_Paris
                    - Europe_Berlin
                    - Asia_Dubai
                    - Asia_Singapore
                    - Asia_Tokyo
                    - Australia_Sydney
                    - Pacific_Auckland
      responses:
        '200':
          description: Policy updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      organizationId:
                        type: string
                        format: uuid
                      agentId:
                        type: string
                        format: uuid
                        nullable: true
                      name:
                        type: string
                      isActive:
                        type: boolean
                      priority:
                        type: integer
                      perTransactionLimitUsd:
                        type: string
                        nullable: true
                      dailyLimitUsd:
                        type: string
                        nullable: true
                      weeklyLimitUsd:
                        type: string
                        nullable: true
                      monthlyLimitUsd:
                        type: string
                        nullable: true
                      allowedRecipients:
                        type: array
                        items:
                          type: string
                      allowedAssetIds:
                        type: array
                        items:
                          type: string
                      allowedBlockchainIds:
                        type: array
                        items:
                          type: string
                      allowedDaysOfWeek:
                        type: array
                        items:
                          type: integer
                      allowedHourStart:
                        type: integer
                        nullable: true
                      allowedHourEnd:
                        type: integer
                        nullable: true
                      timezone:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Wallet not found
                      timestamp:
                        type: string
                        format: date-time
                      requestId:
                        type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Wallet not found
                      timestamp:
                        type: string
                        format: date-time
                      requestId:
                        type: string
        '404':
          description: Wallet or asset not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Wallet not found
                      timestamp:
                        type: string
                        format: date-time
                      requestId:
                        type: string
      security:
        - ApiKeyAuth: []
          OrgIdAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
    OrgIdAuth:
      type: apiKey
      in: header
      name: orgId

````