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 for a given account.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the account information via the URL path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request should contain a \u003ccode\u003eSite\u003c/code\u003e object in its body to define the site details.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses will include the newly created \u003ccode\u003eSite\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThis operation needs 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. The `parent` path parameter, formatted as `platforms/{platform}/accounts/{account_id}`, is required. The request body must include a `Site` instance, and a successful response returns the newly created `Site`. This action requires the OAuth scope: `https://www.googleapis.com/auth/adsense`, and is built using gRPC Transcoding. There is a feature available called `Try it!`.\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/v1/{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/v1/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/v1/platforms.accounts.sites#Site).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/adsense`"]]