REST Resource: platforms.accounts
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-04 UTC.
[null,null,["Last updated 2025-07-04 UTC."],[[["\u003cp\u003eRepresents an Account resource with properties like name, display name, state, time zone, creation time, region code, and creation request ID.\u003c/p\u003e\n"],["\u003cp\u003eAccounts have states including UNCHECKED, APPROVED, and DISAPPROVED, reflecting their approval status for serving ads.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to manage accounts: create, get, list, close, and lookup.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003etimeZone\u003c/code\u003e field is crucial for reporting and \u003ccode\u003ecreationRequestId\u003c/code\u003e ensures unique account creation per user.\u003c/p\u003e\n"]]],["An Account resource represents an AdSense account, defined by fields such as `name`, `displayName`, `state`, `timeZone`, `createTime`, `regionCode`, and `creationRequestId`. The `state` enum reflects the account's approval status: `UNCHECKED`, `APPROVED`, or `DISAPPROVED`. Key actions for managing sub-accounts include `create`, `get`, `list`, `lookup`, and `close`. `creationRequestId` uniquely identifies accounts. The `regionCode` and `timeZone` must be set.\n"],null,["# REST Resource: platforms.accounts\n\n- [Resource: Account](#Account)\n - [JSON representation](#Account.SCHEMA_REPRESENTATION)\n- [State](#State)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Account\n-----------------\n\nRepresentation of an Account.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"displayName\": string, \"state\": enum (/adsense/platforms/reference/rest/v1alpha/platforms.accounts#State), \"timeZone\": { object (/adsense/platforms/reference/rest/Shared.Types/TimeZone) }, \"createTime\": string, \"regionCode\": string, \"creationRequestId\": string } ``` |\n\n| Fields ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name of the account. Format: platforms/pub-\\[0-9\\]+/accounts/pub-\\[0-9\\]+ |\n| `displayName` | `string` Display name of this account. |\n| `state` | `enum (`[State](/adsense/platforms/reference/rest/v1alpha/platforms.accounts#State)`)` Output only. Approval state of the account. |\n| `timeZone` | `object (`[TimeZone](/adsense/platforms/reference/rest/Shared.Types/TimeZone)`)` Required. The IANA TZ timezone code of this account. For more information, see \u003chttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones\u003e. This field is used for reporting. It is recommended to set it to the same value for all child accounts. |\n| `createTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Output only. Creation time of the account. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| `regionCode` | `string` Required. Input only. CLDR region code of the country/region of the address. Set this to country code of the child account if known, otherwise to your own country code. |\n| `creationRequestId` | `string` Required. An opaque token that uniquely identifies the account among all the platform's accounts. This string may contain at most 64 non-whitespace ASCII characters, but otherwise has no predefined structure. However, it is expected to be a platform-specific identifier for the user creating the account, so that only a single account can be created for any given user. This field must not contain any information that is recognizable as personally identifiable information. e.g. it should not be an email address or login name. Once an account has been created, a second attempt to create an account using the same creationRequestId will result in an ALREADY_EXISTS error. |\n\nState\n-----\n\nApproval state of the account.\n\n| Enums ||\n|---------------------|------------------------------------------------|\n| `STATE_UNSPECIFIED` | Unspecified. |\n| `UNCHECKED` | Unchecked. |\n| `APPROVED` | The account is ready to serve ads. |\n| `DISAPPROVED` | The account has been blocked from serving ads. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------|\n| ### [close](/adsense/platforms/reference/rest/v1alpha/platforms.accounts/close) | Closes a sub-account. |\n| ### [create](/adsense/platforms/reference/rest/v1alpha/platforms.accounts/create) | Creates a sub-account. |\n| ### [get](/adsense/platforms/reference/rest/v1alpha/platforms.accounts/get) | Gets information about the selected sub-account. |\n| ### [list](/adsense/platforms/reference/rest/v1alpha/platforms.accounts/list) | Lists a partial view of sub-accounts for a specific parent account. |\n| ### [lookup](/adsense/platforms/reference/rest/v1alpha/platforms.accounts/lookup) | Looks up information about a sub-account for a specified creation_request_id. |"]]