Method: platforms.accounts.events.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 an account event using an HTTP POST request to the specified URL.\u003c/p\u003e\n"],["\u003cp\u003eRequires path parameters to identify the target platform and account.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain an \u003ccode\u003eEvent\u003c/code\u003e object, and a successful response returns the created \u003ccode\u003eEvent\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/adsense\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This content outlines how to create an account event via an API. A `POST` HTTP request is sent to a specific URL that includes a `parent` path parameter, representing the target account. The request body, structured as an `Event` instance, is sent. Upon success, the API returns a newly created `Event` instance in the response body. This action requires the `https://www.googleapis.com/auth/adsense` OAuth scope for authorization. There is a \"Try it!\" option for the user.\n"],null,["# Method: platforms.accounts.events.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 an account event.\n\n### HTTP request\n\n`POST https://adsenseplatform.googleapis.com/v1alpha/{parent=platforms/*/accounts/*}/events`\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 log events about. Format: platforms/{platform}/accounts/{account} |\n\n### Request body\n\nThe request body contains an instance of [Event](/adsense/platforms/reference/rest/v1alpha/platforms.accounts.events#Event).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Event](/adsense/platforms/reference/rest/v1alpha/platforms.accounts.events#Event).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/adsense`"]]