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

# PATCH /v4/customBiddingAlgorithms/{customBiddingAlgorithmsId}

`PATCH /v4/customBiddingAlgorithms/{customBiddingAlgorithmsId}`

## Request

- Base URL: `https://displayvideo.googleapis.com`
- URL: `https://displayvideo.googleapis.com/v4/customBiddingAlgorithms/{customBiddingAlgorithmsId}`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/display-video`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/display-video`

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

- `customBiddingAlgorithmsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `updateMask` string, google-fieldmask

## Request body

- CustomBiddingAlgorithm: A single custom bidding algorithm.
  - `advertiserId` string, int64: Immutable. The unique ID of the advertiser that owns the custom bidding algorithm.
  - `customBiddingAlgorithmId` string, int64: Output only. The unique ID of the custom bidding algorithm. Assigned by the system.
  - `customBiddingAlgorithmType` 'CUSTOM_BIDDING_ALGORITHM_TYPE_UNSPECIFIED' | 'SCRIPT_BASED' | 'RULE_BASED': Required. Immutable. The type of custom bidding algorithm.
  - `displayName` string: Required. The display name of the custom bidding algorithm. Must be UTF-8 encoded with a maximum size of 240 bytes.
  - `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`
  - `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.
  - `name` string: Output only. The resource name of the custom bidding algorithm.
  - `partnerId` string, int64: Immutable. The unique ID of the partner that owns the custom bidding algorithm.
  - `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).
  - `thirdPartyOptimizationPartner` 'UNKNOWN' | 'SCIBIDS' | 'ADELAIDE': Optional. Immutable. Designates the third party optimization partner that manages this algorithm.

## Response `200`

Successful response

- CustomBiddingAlgorithm: A single custom bidding algorithm.
  - `advertiserId` string, int64: Immutable. The unique ID of the advertiser that owns the custom bidding algorithm.
  - `customBiddingAlgorithmId` string, int64: Output only. The unique ID of the custom bidding algorithm. Assigned by the system.
  - `customBiddingAlgorithmType` 'CUSTOM_BIDDING_ALGORITHM_TYPE_UNSPECIFIED' | 'SCRIPT_BASED' | 'RULE_BASED': Required. Immutable. The type of custom bidding algorithm.
  - `displayName` string: Required. The display name of the custom bidding algorithm. Must be UTF-8 encoded with a maximum size of 240 bytes.
  - `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`
  - `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.
  - `name` string: Output only. The resource name of the custom bidding algorithm.
  - `partnerId` string, int64: Immutable. The unique ID of the partner that owns the custom bidding algorithm.
  - `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).
  - `thirdPartyOptimizationPartner` 'UNKNOWN' | 'SCIBIDS' | 'ADELAIDE': Optional. Immutable. Designates the third party optimization partner that manages this algorithm.

---

[API](https://skmtc.dev/google/apis/displayvideo.md) - [All operations](https://skmtc.dev/google/apis/displayvideo/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/displayvideo/revisions/c4f5eaed2791?raw)
