Report what happened with the card: shown, set aside or declined.
const url = 'https://api.emite.cr/v1/feedback/prompt/events';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"shown","page":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/feedback/prompt/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "shown", "page": "example" }'The app reports each step of the floating card: shown when it appears, dismissed when it is set aside («Ahora no», or closed) and never for «No volver a preguntar», which stops the card for that person for good. A comment sent from the card is recorded with the comment itself (origin: prompt), not here. These events feed the rules of GET /v1/feedback/prompt. 400 FEEDBACK_NOT_AVAILABLE_IN_DEMO in the demo; 403 FEEDBACK_PERSON_REQUIRED for an API key; 429 FEEDBACK_RATE_LIMITED past 20 events in 10 minutes by the same person — a budget of its own, separate from the comments'.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
shown; dismissed («Ahora no», or closed); never («No volver a preguntar»). A comment sent from the card is recorded with the comment (origin: prompt).
The page it happened on.