Quickstart

This guide will get you all set up and ready to use the HazelBase API. We'll cover how to get started with an API Key and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of our powerful GraphQL API.

Choose your client

To make the documentation as helpful as possible, we have included examples for both cURL and JavaScript. Select the tab that corresponds to the client you want to use, and the code snippets throughout the documentation will update to show the correct example.

# cURL is most likely already installed on your machine
curl --version

Making your first API request

Our first API request will be getting the first and last names of people associated with the phone number "212-555-1234". We will use the searchV2 query, and set the phone parameter to "2125551234". We will name our query "MyFirstQuery", but it can be named anything.

POST
/graphql
# We are posting JSON in the format {"query": "MY_GRAPHQL_QUERY_HERE"} to the API.
# This is GraphQL query that will be the string for the "query" key:
# query MyFirstQuery {
#   searchV2(phone: "2125551234") {
#     name {
#       first
#       last
#     }
#   }
# }

curl --url https://api.hazelbase.com/graphql \
    --request POST \
    --header 'content-type: application/json' \
    --header 'Authorization: ApiKey YOUR-API-KEY-HERE' \
    --data '{"query":"query MyFirstQuery { searchV2(phone: \"2125551234\") { name { first last } }}"}'

What's next?

Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the HazelBase API:

Was this page helpful?