Quickstart
This guide will get you all set up and ready to use the Gatsby API. We'll cover how to authenticate with the API and make your first request to list persons. We'll also look at where to go next to find all the information you need to take full advantage of our powerful REST API.
To use the Gatsby API, you need a Gatsby account and an API token. API tokens must be enabled for your organization — email help@gatsby.events to have them enabled, then a Super Admin or Admin can create one from Team Settings → Linked Services → API Keys.
Authentication
The recommended way to authenticate is with an API token, which you send in the x-api-key header on every request. Because the token is tied to a single organization, that is the only auth header you need.
If you prefer, you can also use the legacy email and password login flow to obtain an access token — see Authentication for details. New integrations should use an API token.
Making your first API request
Once you have an API token, you're ready to make your first call to the Gatsby API. Below, you can see how to send a GET request to the Persons endpoint to get a list of all persons in your organization.
curl https://rest.gatsby.events/person \
-H "x-api-key: {your-api-token}" \
-d limit=10 \
-d skip=0
Understanding the response
The response from the Persons endpoint will be a JSON object containing an array of person objects:
{
"persons": [
{
"personId": "52907745-7672-470e-a",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"profilePicture": "https://assets.gatsby.events/avatars/johndoe.jpg",
"customFields": {
"title": "Software Engineer",
"company": "Acme Inc"
}
},
{
"personId": "8293b8f2-3019-42a8-b",
// ... another person
}
]
}
What's next?
Great, you're now authenticated and have made your first request to the Gatsby API. Here are a few links that might be handy as you venture further: