curl --request POST \
--url https://app.sphinxhq.com/api/customers/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "cust-123",
"full_name": "John Smith",
"customer_type": "INDIVIDUAL",
"input_details": {
"aliases": [
"Johnny",
"Jonno"
],
"dob": "1990-01-01",
"email": "john@example.com",
"address": {
"street": "123 Main St",
"city": "New York",
"country": "USA"
}
}
}
'{
"external_id": "cust-123",
"full_name": "John Smith",
"customer_type": "INDIVIDUAL",
"input_details": {
"aliases": [
"Johnny",
"Jonno"
],
"dob": "1990-01-01",
"email": "john@example.com",
"address": {
"street": "123 Main St",
"city": "New York",
"country": "USA"
}
}
}Create Customer
Create a new customer with flexible data structure
curl --request POST \
--url https://app.sphinxhq.com/api/customers/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "cust-123",
"full_name": "John Smith",
"customer_type": "INDIVIDUAL",
"input_details": {
"aliases": [
"Johnny",
"Jonno"
],
"dob": "1990-01-01",
"email": "john@example.com",
"address": {
"street": "123 Main St",
"city": "New York",
"country": "USA"
}
}
}
'{
"external_id": "cust-123",
"full_name": "John Smith",
"customer_type": "INDIVIDUAL",
"input_details": {
"aliases": [
"Johnny",
"Jonno"
],
"dob": "1990-01-01",
"email": "john@example.com",
"address": {
"street": "123 Main St",
"city": "New York",
"country": "USA"
}
}
}Authorizations
OAuth2 access token obtained from POST /api/oauth/token/ using client credentials.
Body
Write serializer for Customer creation with flexible JSON details.
255ID from the source system, for lookups.
255INDIVIDUAL- IndividualCOMPANY- Company
INDIVIDUAL, COMPANY, , null Flexible JSON for inputting customer fields. Any format accepted.
External platform references for outbound sync. List of dicts, e.g. [{"domain": "bofa--dev.sandbox.my.salesforce.com", "id": "500WA..."}]
Number of days until deletion. Use 0 for immediate deletion, or -1 for indefinite retention (never delete). Defaults to -1.
Response
Read-only serializer for Customer with computed fields.
ID from the source system, for lookups.
INDIVIDUAL- IndividualCOMPANY- Company
INDIVIDUAL, COMPANY, null Flexible JSON for inputting customer fields such as first_name, address, etc. Any format accepted.
External platform references. List of dicts, e.g. [{"domain": "bofi--dev.sandbox.my.salesforce.com", "id": "500WA..."}]
Days until deletion. -1 means never delete.
Was this page helpful?

