Skip to content
Docs
/
API

Plunk API

Authentication

All requests to the Plunk API require a public or private key to be provided. This key should be provided as a bearer token in the Authorization header.

Endpoints

/v1

The original endpoint used to send events to Plunk.

Request body

The request body should be a JSON object and should contain the following properties:

PropertyTypeDescription
eventstringThe name of the event
emailstringThe email of the user
dataobjectOptional data associated with the event

Example request

const res = await fetch('https://api.useplunk.com', {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Authorization": "Bearer API_KEY",
    },
    body: JSON.stringify({
        "event": "new-project",
        "email": "hello@useplunk.com",
        "data": {
            "company": "Plunk"
        }
    }),
});
Last updated on August 27, 2022