Customer API overview
Base URLs, versioning, authentication and the customer creation endpoints of the Segmentify Customer API.
| Item | Value |
|---|---|
| API title | Segmentify Customer API |
| API version | 1.0 |
| Protocol | HTTPS / REST, JSON payloads |
| Auth scheme | OAuth2 Bearer token (Authorization: Bearer ) |
Base URL
Section titled “Base URL”The service is deployed per environment.
Türkiye -> https://api-eq.segmentify.comGlobal -> https://api-gcp.segmentify.comAPI version header
Section titled “API version header”Every endpoint is versioned. Send the API version as a request header:
X-Api-Version: 1.0Content type
Section titled “Content type”All request and response bodies are JSON:
Content-Type: application/jsonAccept: application/jsonAuthentication model
Section titled “Authentication model”-
The authentication endpoints under
/authare public — they do not require a Bearer token (they are how you obtain one). -
All customer endpoints under
/customerrequire a valid Bearer access token.
Authentication flow
Section titled “Authentication flow”Obtain an access token with your credentials, then send it as a Bearer token on every customer request. Access tokens are short-lived; use the refresh endpoint to get a new pair without re-sending credentials.
POST /auth/token
Exchanges a username and password for an access token and a refresh token.
Request
{ "username": "acme-integration", "password": "s3cr3t-p@ssw0rd"}Response (200)
{ "accessToken": "ACCESS_TOKEN", "refreshToken": "REFRESH_TOKEN", "accessExpiresInTime": 900, "refreshExpiresInTime": 2592000}Refresh Token
Section titled “Refresh Token”POST /auth/token/refresh
Exchanges a valid refresh token for a new access/refresh token pair. Call this before the access token expires (or after receiving a 401) to avoid re-sending credentials.
Request
{ "refreshToken": "REFRESH_TOKEN"}Response (200)
{ "accessToken": "ACCESS_TOKEN", "refreshToken": "REFRESH_TOKEN", "accessExpiresInTime": 900, "refreshExpiresInTime": 2592000}Single Customer
Section titled “Single Customer”POST /customer/
Creates (or resolves and updates) a single customer and returns the resulting customer profile.
Request
{ "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@example.com", "phone": "+905055554433", "gender": "FEMALE", "birthDate": "1990-05-14", "maritalStatus": "SINGLE", "country": "Turkey", "city": "Istanbul", "district": "Kadikoy", "postalCode": "34000", "language": "tr", "currency": "TRY", "region": "TR-34", "timeZone": "Europe/Istanbul", "creationSource": "API", "membershipDate": "2026-01-15T10:30:00+03:00", "loginMethods": [ "email", "google" ], "custom": { "loyaltyId": "LYT-99123", "segment": "vip" }, "channelConsents": { "EMAIL": { "marketing": { "state": "SUBSCRIBED" }, "transactional": { "state": "SUBSCRIBED" } } }}Response (200)
{ "id": "9b2e6c1a-3f4d-4a2b-8c7e-1f2a3b4c5d6e", "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@example.com", "customAttributes": {}, "customIdentifiers": {}, "createdAt": 1767181800000, "changeType": "CREATED"}Batch Customers
Section titled “Batch Customers”POST /customer/batch
Creates customers in bulk. Supports partial success: the request is validated per record, then valid records are processed and reported as succeeded/failed. Invalid records are reported separately and never processed.
Request
[ { "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@example.com", "phone": "+905055554433", "gender": "FEMALE", "birthDate": "1990-05-14", "maritalStatus": "SINGLE", "country": "Turkey", "city": "Istanbul", "district": "Kadikoy", "postalCode": "34000", "language": "tr", "currency": "TRY", "region": "TR-34", "timeZone": "Europe/Istanbul", "creationSource": "API", "membershipDate": "2026-01-15T10:30:00+03:00", "loginMethods": [ "email", "google" ], "custom": { "loyaltyId": "LYT-99123", "segment": "vip" }, "channelConsents": { "EMAIL": { "marketing": { "state": "SUBSCRIBED" }, "transactional": { "state": "SUBSCRIBED" } } } }]Response (200)
{ "validCount": 2, "invalids": [], "successCount": 1, "fails": [ { "phone": "+905055554433", "firstName": "John" } ]}API reference
Section titled “API reference”Send these requests from the Customer API reference.