---
title: "PATCH /v4/customBiddingAlgorithms/{+customBiddingAlgorithmId}"
method: PATCH
path: "/v4/customBiddingAlgorithms/{+customBiddingAlgorithmId}"
tags: ["customBiddingAlgorithms"]
---

# PATCH /v4/customBiddingAlgorithms/{+customBiddingAlgorithmId}

`PATCH /v4/customBiddingAlgorithms/{+customBiddingAlgorithmId}`

Updates an existing custom bidding algorithm. Returns the updated custom bidding algorithm if successful. Requests updating a custom bidding algorithm assigned to a line item will return an error.

## Path parameters

- `customBiddingAlgorithmId` string, required

## Query parameters

- `updateMask` string

## Request body

- CustomBiddingAlgorithm — A single custom bidding algorithm.
  - `customBiddingAlgorithmId` string, int64 — Output only. The unique ID of the custom bidding algorithm. Assigned by the system.
  - `displayName` string — Required. The display name of the custom bidding algorithm. Must be UTF-8 encoded with a maximum size of 240 bytes.
  - `modelDetails` CustomBiddingModelDetails[] — Output only. The details of custom bidding models for each advertiser who has access. This field may only include the details of the queried advertiser if the algorithm [`owner`](/display-video/api/reference/rest/v1/customBiddingAlgorithms#CustomBiddingAlgorithm.FIELDS.oneof_owner) is a partner and is being retrieved using an advertiser [`accessor`](/display-video/api/reference/rest/v1/customBiddingAlgorithms/list#body.QUERY_PARAMETERS.oneof_accessor).
    - `advertiserId` string, int64 — The unique ID of the relevant advertiser.
    - `readinessState` 'READINESS_STATE_UNSPECIFIED' | 'READINESS_STATE_ACTIVE' | 'READINESS_STATE_INSUFFICIENT_DATA' | 'READINESS_STATE_TRAINING' | 'READINESS_STATE_NO_VALID_SCRIPT' | 'READINESS_STATE_EVALUATION_FAILURE' — The readiness state of custom bidding model.
    - `suspensionState` 'SUSPENSION_STATE_UNSPECIFIED' | 'SUSPENSION_STATE_ENABLED' | 'SUSPENSION_STATE_DORMANT' | 'SUSPENSION_STATE_SUSPENDED' — Output only. The suspension state of custom bidding model.
  - `sharedAdvertiserIds` string[] — The IDs of the advertisers who have access to this algorithm. If advertiser_id is set, this field will only consist of that value. This field will not be set if the algorithm [`owner`](/display-video/api/reference/rest/v1/customBiddingAlgorithms#CustomBiddingAlgorithm.FIELDS.oneof_owner) is a partner and is being retrieved using an advertiser [`accessor`](/display-video/api/reference/rest/v1/customBiddingAlgorithms/list#body.QUERY_PARAMETERS.oneof_accessor).
  - `advertiserId` string, int64 — Immutable. The unique ID of the advertiser that owns the custom bidding algorithm.
  - `thirdPartyOptimizationPartner` 'UNKNOWN' | 'SCIBIDS' | 'ADELAIDE' — Optional. Immutable. Designates the third party optimization partner that manages this algorithm.
  - `partnerId` string, int64 — Immutable. The unique ID of the partner that owns the custom bidding algorithm.
  - `entityStatus` 'ENTITY_STATUS_UNSPECIFIED' | 'ENTITY_STATUS_ACTIVE' | 'ENTITY_STATUS_ARCHIVED' | 'ENTITY_STATUS_DRAFT' | 'ENTITY_STATUS_PAUSED' | 'ENTITY_STATUS_SCHEDULED_FOR_DELETION' — Controls whether or not the custom bidding algorithm can be used as a bidding strategy. Accepted values are: * `ENTITY_STATUS_ACTIVE` * `ENTITY_STATUS_ARCHIVED`
  - `customBiddingAlgorithmType` 'CUSTOM_BIDDING_ALGORITHM_TYPE_UNSPECIFIED' | 'SCRIPT_BASED' | 'RULE_BASED' — Required. Immutable. The type of custom bidding algorithm.
  - `name` string — Output only. The resource name of the custom bidding algorithm.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/displayvideo.md) · [All operations](https://skmtc.dev/google/apis/displayvideo/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/displayvideo/revisions/68b64e49eced/schema)
