---
title: "POST /v1/buyers/{buyersId}/userLists/{userListsId}:close"
method: POST
path: "/v1/buyers/{buyersId}/userLists/{userListsId}:close"
tags: ["buyers"]
---

# POST /v1/buyers/{buyersId}/userLists/{userListsId}:close

`POST /v1/buyers/{buyersId}/userLists/{userListsId}:close`

## Request

- Base URL: `https://realtimebidding.googleapis.com`
- URL: `https://realtimebidding.googleapis.com/v1/buyers/{buyersId}/userLists/{userListsId}:close`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/realtime-bidding`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/realtime-bidding`
- TypeScript: <https://skmtc.dev/google/apis/realtimebidding/docs/v1/buyers/:buyersId/userLists/:userListsId:close/post.ts> (a function with typed inputs; its response is checked against the schema)

Changes the status of a user list to CLOSED. This prevents new users from being added to the user list.

## Path parameters

- `buyersId` string, required
- `userListsId` string, required

## Request body

- CloseUserListRequest: A request to close a specified user list.

## Response `200`

Successful response

- UserList: Represents an Authorized Buyers user list. Authorized Buyers can create/update/list user lists. Once a user list is created in the system, Authorized Buyers can add users to the user list using the bulk uploader API. Alternatively, users can be added by hosting a tag on the advertiser's page.
  - `description` string: The description for the user list.
  - `displayName` string: Required. Display name of the user list. This must be unique across all user lists for a given account.
  - `membershipDurationDays` string, int64: Required. The number of days a user's cookie stays on the user list. The field must be between 0 and 540 inclusive.
  - `name` string: Output only. Name of the user list that must follow the pattern `buyers/{buyer}/userLists/{user_list}`, where `{buyer}` represents the account ID of the buyer who owns the user list. For a bidder accessing user lists on behalf of a child seat buyer, `{buyer}` represents the account ID of the child seat buyer. `{user_list}` is an int64 identifier assigned by Google to uniquely identify a user list.
  - `status` 'STATUS_UNSPECIFIED' | 'OPEN' | 'CLOSED': Output only. The status of the user list. A new user list starts out as open.
  - `urlRestriction` UrlRestriction: Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Represents the URL restriction (for the URL captured by the pixel callback) for a user list.
    - `endDate` Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
      - `day` integer: Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
      - `month` integer: Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
      - `year` integer: Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
    - `restrictionType` 'RESTRICTION_TYPE_UNSPECIFIED' | 'CONTAINS' | 'EQUALS' | 'STARTS_WITH' | 'ENDS_WITH' | 'DOES_NOT_EQUAL' | 'DOES_NOT_CONTAIN' | 'DOES_NOT_START_WITH' | 'DOES_NOT_END_WITH': The restriction type for the specified URL.
    - `startDate` Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
      - `day` integer: Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
      - `month` integer: Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
      - `year` integer: Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
    - `url` string: Required. The URL to use for applying the restriction on the user list.

---

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