Introduction
Which Segmentify API to use, where each one is served, how each one authenticates and how to send requests from this site.
Segmentify has three REST APIs. Each has a guide section on this site and an interactive reference where you can send requests.
| API | Use it to | Base URL | Authentication |
|---|---|---|---|
| Events API | Send user interactions from a website, app or backend | https://{dataCenter}.segmentify.com |
apiKey query parameter, plus an Origin header that matches your account’s domain |
| Customer API | Create customers, one at a time or in bulk | https://api-eq.segmentify.com (Türkiye), https://api-gcp.segmentify.com (Global) |
Bearer access token from POST /auth/token |
| Contacts API | Import contacts and export consent data | https://trapi.segmentify.com |
Bearer access token from POST /oauth2/token |
Your API key and data center are under Settings > Integrations in the Segmentify panel.
If you integrate through an SDK, the SDK sends the Events API requests for you. See the SDK documentation linked in the sidebar.
Send a request from this site
Section titled “Send a request from this site”- Open a reference: Events, Customer or Contacts.
- Choose the server. For the Events API, type your data center into the server variable.
- Enter your credentials under Authentication: the API key for the Events API, or an access token for the Customer and Contacts APIs. To get a token, send the login request of that API first and copy
accessTokenfrom the response. - Open an operation and select Test Request. Where an operation has several examples, pick one in the request body to load its payload.
- Send the request. The response, its status and headers are shown next to it, and the reference also shows the same request as code (cURL and other languages) to copy into your integration.
Requests are sent through this site’s own proxy, which forwards only to https://*.segmentify.com. Credentials are kept in the page only and are cleared when you reload it.
The Origin header of the Events API
Section titled “The Origin header of the Events API”The Events API checks the Origin header against the domain of your account. A browser always sets Origin itself, so a value typed into the reference is ignored. Fill in the X-Forward-Origin header instead: the proxy sends its value as Origin. This header exists only for the reference on this site; do not send it from your integration.