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 to have a Gatsby account with valid credentials. You'll need both your login credentials and an organization slug to make API requests.
Authentication
Before making your first API request, you need to authenticate with the Gatsby API to get an access token. This token, along with your organization slug, will be used for all subsequent requests.
# Authenticate with the Gatsby API
curl https://rest.gatsby.events/login \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"your-password"}'
Making your first API request
After obtaining your access token and organization slug, 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 "Authorization: Bearer {accessToken}" \
-H "organizationSlug: {organizationSlug}" \
-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": "[email protected]",
"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: