Create an In-Page Event
1 min
POST
https://api.optimizely.com/v2/pages/{page_id}/events
page_idinteger<int64><p>The Page ID of the Page you want to create an In-Page Event for</p>
acceptstringGenerated from available response content types
bodyobject<p>A string in JSON format that includes all the fields to create an In-Page Event</p>
201<p>Return the created In-Page event</p>
400Invalid Page ID or request body supplied
401Invalid credentials
403<p>You do not have permission to add an In-Page event</p>
defaultUnexpected error
curl --request POST \
--url https://api.optimizely.com/v2/pages/{page_id}/events \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"config": {
"selector": ".menu-options"
},
"event_type": "",
"name": "Add to Cart"
}'