Skip to main content
POST
/
v1
/
events
const options = {
  method: 'POST',
  headers: {
    Authorization: '<api-key>',
    'Auth-Type': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    event: {
      event: 'user_signup',
      user_id: 'user123',
      properties: {
        source: 'website',
        plan: 'premium',
        utm_source: 'google_ads',
        utm_campaign: 'summer2024'
      }
    }
  })
};

fetch('https://api.flywheel.cx/v1/events', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "message": "Event tracked successfully"
}

Authorizations

Authorization
string
header
required

Enter your API key obtained from the Flywheel dashboard (without 'Bearer ' prefix)

Auth-Type
string
header
default:api
required

Authentication type header. Must be set to 'api' for all API requests.

Body

application/json
event
object
required

Response

Event tracked successfully

success
boolean

Whether the event was tracked successfully

Example:

true

message
string

Success message

Example:

"Event tracked successfully"