Customer Profiles
Customer profiles are essential for storing and managing detailed information about your customers. On this page, we’ll dive into the different customer profile endpoints you can use to manage customer profiles programmatically. We'll look at how to query, create, update, and delete customer profiles.
The customer profile model
The customer profile model contains all the information related to a customer, including personal details, contact information, and additional attributes.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the customer profile.
- Name
first_name- Type
- string
- Description
First name of the customer.
- Name
last_name- Type
- string
- Description
Last name of the customer.
- Name
email- Type
- string
- Description
Email address of the customer.
- Name
phone- Type
- string
- Description
Phone number of the customer.
- Name
address- Type
- string
- Description
Physical address of the customer.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the customer profile was created.
- Name
updated_at- Type
- timestamp
- Description
Timestamp of when the customer profile was last updated.
List all customer profiles
This endpoint allows you to retrieve a paginated list of all your customer profiles. By default, a maximum of ten profiles are shown per page.
Optional attributes
- Name
limit- Type
- integer
- Description
Limit the number of customer profiles returned.
- Name
email- Type
- string
- Description
Only show profiles with the specified email.
- Name
phone- Type
- string
- Description
Only show profiles with the specified phone number.
Request
curl -G https://api.finx.ai/v1/customer-profiles \
-H "Authorization: Bearer {token}" \
-d limit=10
Response
{
"has_more": false,
"data": [
{
"id": "xgQQXg3hrtjh7AvZ",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"address": "123 Main St, Springfield, USA",
"created_at": 705103200,
"updated_at": 705103200
},
{
"id": "hSIhXBhNe8X1d8Et"
// ...
}
]
}
Create a customer profile
This endpoint allows you to add a new customer profile. You need to provide the first name, last name, email, phone, and address to create a customer profile.
Required attributes
- Name
first_name- Type
- string
- Description
First name of the customer.
- Name
last_name- Type
- string
- Description
Last name of the customer.
- Name
email- Type
- string
- Description
Email address of the customer.
- Name
phone- Type
- string
- Description
Phone number of the customer.
- Name
address- Type
- string
- Description
Physical address of the customer.
Request
curl https://api.finx.ai/v1/customer-profiles \
-H "Authorization: Bearer {token}" \
-d 'first_name'="John" \
-d 'last_name'="Doe" \
-d 'email'="john.doe@example.com" \
-d 'phone'="+1234567890" \
-d 'address'="123 Main St, Springfield, USA"
Response
{
"id": "xgQQXg3hrtjh7AvZ",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"address": "123 Main St, Springfield, USA",
"created_at": 705103200,
"updated_at": 705103200
}
Retrieve a customer profile
This endpoint allows you to retrieve a customer profile by providing the profile id. Refer to the list at the top of this page to see which properties are included with customer profile objects.
Request
curl https://api.finx.ai/v1/customer-profiles/xgQQXg3hrtjh7AvZ \
-H "Authorization: Bearer {token}"
Response
{
"id": "xgQQXg3hrtjh7AvZ",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"address": "123 Main St, Springfield, USA",
"created_at": 705103200,
"updated_at": 705103200
}
Update a customer profile
This endpoint allows you to perform an update on a customer profile. Examples of updates are changing the email, updating the phone number, or modifying the address.
Optional attributes
- Name
first_name- Type
- string
- Description
Updated first name of the customer.
- Name
last_name- Type
- string
- Description
Updated last name of the customer.
- Name
email- Type
- string
- Description
Updated email address of the customer.
- Name
phone- Type
- string
- Description
Updated phone number of the customer.
- Name
address- Type
- string
- Description
Updated physical address of the customer.
Request
curl -X PUT https://api.finx.ai/v1/customer-profiles/xgQQXg3hrtjh7AvZ \
-H "Authorization: Bearer {token}" \
-d 'email'="new.email@example.com"
Response
{
"id": "xgQQXg3hrtjh7AvZ",
"first_name": "John",
"last_name": "Doe",
"email": "new.email@example.com",
"phone": "+1234567890",
"address": "123 Main St, Springfield, USA",
"created_at": 705103200,
"updated_at": 705103200
}
Delete a customer profile
This endpoint allows you to delete your customer profiles in Fin X. Note: This will permanently delete the profile and all its data — ensure this is the desired action before proceeding.
Request
curl -X DELETE https://api.finx.ai/v1/customer-profiles/xgQQXg3hrtjh7AvZ \
-H "Authorization: Bearer {token}"