---
title: "Update insurance policy"
url: "https://developer-staging.agentsync.io/apis/identity/versions/1ed33a2c-924a-434c-9643-fbc531dea1b8/operations/updateInsurancePolicyV2"
---

> Full API specification: https://developer-staging.agentsync.io/apis/identity/versions/1ed33a2c-924a-434c-9643-fbc531dea1b8.md

# Update insurance policy

`PUT` `/v2/insurance-policies/{policyId}`

Operation ID: `updateInsurancePolicyV2`

Updates an existing E&O insurance policy by ID. The policy must be owned by the authenticated customer; unknown or cross-customer IDs return 404.

## Path parameters

- `policyId` (string, uuid, required) - The unique identifier for the insurance policy.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Insurance policy updated successfully.
- `400` - One or more request fields failed validation
- `401` - No valid bearer token was presented
- `403` - The token does not carry the required scope
- `404` - The requested resource does not exist or is not visible to the caller
- `429` - Rate limit exceeded. The caller has exceeded the maximum number of requests allowed per rate-limit window for the authenticated credential. NOTE: The response body for this status deviates from the standard V2 error shape ({message, details, code}). The body contains only a top-level "message" string. Clients should treat the Retry-After header as the authoritative retry signal and must not parse the message string.
- `500` - An unexpected server error occurred

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Identity API
  version: v1.275.8
servers:
  - url: https://api.sandbox.agentsync.io/id
    description: Sandbox server
  - url: https://api.agentsync.io/id
    description: Production server
paths:
  /v2/insurance-policies/{policyId}:
    put:
      summary: Update insurance policy
      description: Updates an existing E&O insurance policy by ID. The policy must be
        owned by the authenticated customer; unknown or cross-customer IDs
        return 404.
      operationId: updateInsurancePolicyV2
      tags:
        - Insurance Policies
      security:
        - oauth2:
            - identity.profiles.write
      parameters:
        - $ref: "#/components/parameters/InsurancePolicyIdParam"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateInsurancePolicyRequest"
      responses:
        "200":
          description: Insurance policy updated successfully.
          headers:
            ratelimit-limit:
              $ref: "#/components/headers/ratelimit-limit"
            ratelimit-remaining:
              $ref: "#/components/headers/ratelimit-remaining"
            ratelimit-reset:
              $ref: "#/components/headers/ratelimit-reset"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InsurancePolicyV2"
        "400":
          $ref: "#/components/responses/V2BadRequest"
        "401":
          $ref: "#/components/responses/V2Unauthorized"
        "403":
          $ref: "#/components/responses/V2Forbidden"
        "404":
          $ref: "#/components/responses/V2NotFound"
        "429":
          $ref: "#/components/responses/V2TooManyRequests"
        "500":
          $ref: "#/components/responses/V2InternalServerError"
security:
  - oauth2:
      - identity.profiles.write
components:
  parameters:
    InsurancePolicyIdParam:
      name: policyId
      in: path
      description: The unique identifier for the insurance policy.
      required: true
      schema:
        type: string
        format: uuid
        example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    UpdateInsurancePolicyRequest:
      type: object
      required:
        - type
        - carrier
        - effectiveOn
        - policyNumber
        - certificateNumber
      properties:
        type:
          $ref: "#/components/schemas/PolicyType"
        carrier:
          type: string
          description: Name of the insurance carrier.
          example: Acme Insurance Co.
        totalLimit:
          type: number
          format: double
          description: Maximum coverage limit for the policy.
          minimum: 1
          maximum: 10000000
          example: 1000000
        effectiveOn:
          type: string
          format: date
          description: Date the insurance policy becomes effective (YYYY-MM-DD).
          example: 2024-01-01
        expiresOn:
          type: string
          format: date
          description: Date the insurance policy expires (YYYY-MM-DD).
          example: 2025-01-01
        policyNumber:
          type: string
          description: Policy number assigned by the carrier.
          example: POL-001
        certificateNumber:
          type: string
          description: Certificate number for the policy.
          example: CERT-001
    InsurancePolicyV2:
      type: object
      required:
        - id
        - type
        - carrier
        - effectiveOn
        - policyNumber
        - certificateNumber
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the insurance policy.
          readOnly: true
        type:
          $ref: "#/components/schemas/PolicyType"
        carrier:
          type: string
          description: Name of the insurance carrier.
        totalLimit:
          type: number
          format: double
          description: Maximum coverage limit for the policy.
        effectiveOn:
          type: string
          format: date
          description: Date the insurance policy became effective (YYYY-MM-DD).
        expiresOn:
          type: string
          format: date
          description: Date the insurance policy expires (YYYY-MM-DD).
        policyNumber:
          type: string
          description: Policy number assigned by the carrier.
        certificateNumber:
          type: string
          description: Certificate number for the policy.
        hasFile:
          type: boolean
          description: Whether a certificate file has been uploaded for this policy.
          readOnly: true
        certificateUrl:
          type: string
          format: uri
          description: Presigned download URL for the certificate file. Present only when
            hasFile is true. Expires 10 minutes after the response is generated.
          readOnly: true
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: RFC3339 UTC timestamp when the record was created.
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          description: RFC3339 UTC timestamp when the record was last updated.
          readOnly: true
    PolicyType:
      title: PolicyType
      type: string
      description: The type of insurance policy
      enum:
        - CORPORATION
        - INDIVIDUAL
        - JOINT
      example: INDIVIDUAL
    V2Error:
      type: object
      required:
        - message
        - details
        - code
      properties:
        message:
          type: string
          description: Human-readable error summary. Do not parse — use "code" for
            branching.
          example: Validation failed
        details:
          type: array
          description: Per-field validation errors. Empty for all non-400 responses.
          items:
            $ref: "#/components/schemas/V2FieldError"
        code:
          type: string
          description: Stable machine-readable error code.
          enum:
            - validation_failed
            - unauthorized
            - unauthorized_scope
            - resource_not_found
            - conflict
            - unprocessable
            - unsupported_media_type
            - rate_limited
            - internal
          example: validation_failed
    V2FieldError:
      type: object
      required:
        - param
        - message
      properties:
        param:
          type: string
          description: The request field that failed validation
          example: email
        message:
          type: string
          description: Human-readable description of the failure
          example: must not be blank
  headers:
    ratelimit-limit:
      description: >
        Maximum number of requests allowed per rate-limit window for the
        authenticated credential. The value returned in this header is
        authoritative; do not cache it.
      schema:
        type: integer
    ratelimit-remaining:
      description: Number of requests remaining in the current rate-limit window.
      schema:
        type: integer
    ratelimit-reset:
      description: >
        Unix timestamp (seconds) after which at least one additional request
        slot becomes available. In a sliding window this is a hint, not a hard
        reset point — retrying exactly at this instant may still return 429
        under sustained load.
      schema:
        type: integer
    Retry-After:
      description: >
        Minimum seconds to wait before retrying. Use this value directly as your
        retry delay; it already accounts for any server-side backoff.
      schema:
        type: integer
  responses:
    V2BadRequest:
      description: One or more request fields failed validation
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/V2Error"
          example:
            message: Validation failed
            code: validation_failed
            details:
              - param: email
                message: must not be blank
    V2Unauthorized:
      description: No valid bearer token was presented
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/V2Error"
          example:
            message: Authentication required
            code: unauthorized
            details: []
    V2Forbidden:
      description: The token does not carry the required scope
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/V2Error"
          example:
            message: Insufficient scope
            code: unauthorized_scope
            details: []
    V2NotFound:
      description: The requested resource does not exist or is not visible to the caller
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/V2Error"
          example:
            message: Resource not found
            code: resource_not_found
            details: []
    V2TooManyRequests:
      description: >
        Rate limit exceeded. The caller has exceeded the maximum number of
        requests allowed per rate-limit window for the authenticated credential.

        NOTE: The response body for this status deviates from the standard V2
        error shape ({message, details, code}). The body contains only a
        top-level "message" string. Clients should treat the Retry-After header
        as the authoritative retry signal and must not parse the message string.
      headers:
        ratelimit-limit:
          $ref: "#/components/headers/ratelimit-limit"
        ratelimit-remaining:
          $ref: "#/components/headers/ratelimit-remaining"
        ratelimit-reset:
          $ref: "#/components/headers/ratelimit-reset"
        Retry-After:
          $ref: "#/components/headers/Retry-After"
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
          example:
            message: API rate limit exceeded
    V2InternalServerError:
      description: An unexpected server error occurred
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/V2Error"
          example:
            message: An unexpected error occurred
            code: internal
            details: []
  securitySchemes:
    oauth2:
      type: oauth2
      description: >
        OAuth2 client credentials. The `tokenUrl` below is the SANDBOX token
        endpoint; for production use `https://auth.agentsync.io/oauth2/token`.
        OpenAPI 3.0 permits only one token URL per flow, so both cannot be
        expressed here — see the Authentication section for the full environment
        table.
      flows:
        clientCredentials:
          tokenUrl: https://auth.sandbox.agentsync.io/oauth2/token
          scopes:
            identity.profiles.read: Read access to producer profile resources (V2 customer-facing)
            identity.profiles.write: Write access to producer profile resources (V2 customer-facing)
```
