Skip to content

Customer API overview

Base URLs, versioning, authentication and the customer creation endpoints of the Segmentify Customer API.

View as Markdown llms.txt
Item Value
API title Segmentify Customer API
API version 1.0
Protocol HTTPS / REST, JSON payloads
Auth scheme OAuth2 Bearer token (Authorization: Bearer )

The service is deployed per environment.

Türkiye -> https://api-eq.segmentify.com
Global -> https://api-gcp.segmentify.com

Every endpoint is versioned. Send the API version as a request header:

X-Api-Version: 1.0

All request and response bodies are JSON:

Content-Type: application/json
Accept: application/json
  • The authentication endpoints under /auth are public — they do not require a Bearer token (they are how you obtain one).

  • All customer endpoints under /customer require a valid Bearer access token.

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
}

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
}

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"
}

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"
}
]
}

Send these requests from the Customer API reference.