Authentication
Before you get setup
Endear's Admin API, today, is primarily built to sync external data into Endear. As a result, each unique data source that you wish to sync should use it's own Integration & API key within Endear. THIS IS VERY IMPORTANT. If you send two different records with the same ID to the same integration, it will overrwite the previous record. Therefore, it is best to silo your data sources by integration.
How to create an integration & API key
Please contact support at support@endearhq.com to gain access to the API. As this is a newly-developed API, we would like to connect 1-to-1 so that we can better learn about your use case, and support you along the way.
You can visit this link to create an integration & API key, but we highly recommend you speak to our team before doing so.
How to access & authenticate the API
Once you've generated an API key, you can access the API via a POST
request to https://api.endearhq.com/graphql
. You'll need to include the header: X-Endear-Api-Key
with the value of your generated API key to authenticate. It's important to understand that each API keys is scoped to a specific brand. Therefore, you'll need to acquire a separate API key for each brand.
curl https://api.endearhq.com/graphql \
-X POST \
-H "Content-Type: application/json" \
-H "X-Endear-Api-Key: {{API_KEY}}" \
-d '{"query":"query { currentIntegration{ id } }"}'