Use Pinned Events API integration examples for CMS approved content, CRM records, partner forms, spreadsheets, nightly imports, Node.js fetch, and Python requests.
CMS approved content to create event
- 1Content editor approves an event entry.
- 2CMS webhook sends the entry to your backend.
- 3Backend maps CMS fields to the Pinned Events payload.
- 4Backend creates a draft or published event in the target channel.
CRM or back-office record to create event
- 1Operations marks a venue, host, artist, class, or schedule record as approved.
- 2A backend job maps the internal record into the Public API create-event payload.
- 3The job creates a draft or published event in the selected channel.
- 4Future update jobs can keep source data and Pinned Events aligned.
Partner forms and spreadsheets
- 1A partner submits event details through a form, Airtable base, Google Sheet, or admin form.
- 2Your team validates the submission in your own workflow.
- 3Approved rows are sent to the API with stable source IDs and idempotency keys.
- 4Events are created as drafts when editorial review is still needed.
Nightly import and high-volume jobs
For nightly imports, use stable source IDs, batch logs, idempotency keys, and retry queues. Do not resend duplicate rows without a stable Idempotency-Key strategy.
Retry-safe webhook handler
Webhook providers often retry after timeouts. Build the Idempotency-Key from the source provider event ID and action so every retry of the same source event uses the same key.
Node.js fetch example
const response = await fetch('https://pinned.events/api/public/v1/events', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PINNED_EVENTS_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'cms-post-123-create',
},
body: JSON.stringify({
channelId: 42,
title: 'Rooftop Jazz Night',
startAt: '2026-06-12T20:00:00-04:00',
timezone: 'America/New_York',
classifications: ['music'],
approxLocation: {
city: {
placeId: 'place-new-york',
name: 'New York',
countryCode: 'US',
},
},
}),
});Python requests example
import os
import requests
response = requests.post(
'https://pinned.events/api/public/v1/events',
headers={
'Authorization': f"Bearer {os.environ['PINNED_EVENTS_API_KEY']}",
'Content-Type': 'application/json',
'Idempotency-Key': 'cms-post-123-create',
},
json={
'channelId': 42,
'title': 'Rooftop Jazz Night',
'startAt': '2026-06-12T20:00:00-04:00',
'timezone': 'America/New_York',
'classifications': ['music'],
'approxLocation': {
'city': {
'placeId': 'place-new-york',
'name': 'New York',
'countryCode': 'US',
},
},
},
)
response.raise_for_status()Related pages
Getting startedCreate an API key, find a channelId, publish your first event, and retry safely.Create eventsCreate draft or published events with required fields first, then add location, media, ticketing, and publishing options.IdempotencyUse stable Idempotency-Key headers so webhook retries and import jobs do not create duplicate event listings.SecurityStore keys server-side, use least privilege, rotate and revoke keys, and keep secrets out of logs.