Method: platforms.accounts.sites.create
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 2024-08-21 UTC.
[null,null,["Last updated 2024-08-21 UTC."],[[["\u003cp\u003eCreates a new AdSense site under a specified account using an HTTP POST request.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the parent platform and account ID as path parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body needs to contain the site details as defined in the \u003ccode\u003eSite\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will return the newly created \u003ccode\u003eSite\u003c/code\u003e object in the response.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/adsense\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["A site is created for a given account using a POST request to the specified URL: `https://adsenseplatform.googleapis.com/v1alpha/{parent=platforms/*/accounts/*}/sites`. The `parent` parameter, indicating the account, is required in the URL path. The request body, which should be a `Site` object, defines the details of the site. A successful operation will return a `Site` object in the response body. Authorization with the OAuth scope `https://www.googleapis.com/auth/adsense` is required.\n"],null,["# Method: platforms.accounts.sites.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a site for a specified account.\n\n### HTTP request\n\n`POST https://adsenseplatform.googleapis.com/v1alpha/{parent=platforms/*/accounts/*}/sites`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Account to create site. Format: platforms/{platform}/accounts/{account_id} |\n\n### Request body\n\nThe request body contains an instance of [Site](/adsense/platforms/reference/rest/v1alpha/platforms.accounts.sites#Site).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Site](/adsense/platforms/reference/rest/v1alpha/platforms.accounts.sites#Site).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/adsense`"]]