PulseMetrics

API Documentation

Build powerful integrations with the PulseMetrics Cloud REST API.

Quickstart

Get up and running with the PulseMetrics API in minutes. All requests are made to https://api.pulsemetrics.io.

bash
curl https://api.pulsemetrics.io/v1/campaigns \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Authentication

PulseMetrics uses API keys for authentication. Include your key in the Authorization header with the Bearer scheme.

javascript
# In your .env file
PULSEMETRICS_API_KEY=pm_live_xxxxxxxxxxxxxxxx

# In your application
const headers = {
  'Authorization': `Bearer ${process.env.PULSEMETRICS_API_KEY}`,
  'Content-Type': 'application/json'
};

Endpoints

GET/v1/campaigns
GET/v1/campaigns/:id
POST/v1/reports
GET/v1/reports/:id
POST/v1/webhooks
GET/v1/accounts

Webhooks

Subscribe to real-time events. PulseMetrics signs webhook payloads with HMAC-SHA256 so you can verify authenticity.

javascript
# Verify webhook signature
const crypto = require('crypto');

const secret = process.env.WEBHOOK_SECRET;
const signature = req.headers['x-pulsemetrics-signature'];

const expected = crypto
  .createHmac('sha256', secret)
  .update(JSON.stringify(req.body))
  .digest('hex');

if (signature !== expected) {
  throw new Error('Invalid signature');
}