curl --request POST \
--url https://api.withflex.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"checkout_session_id": "<string>",
"metadata": "{\"key\": \"value\"}"
}
}
'{
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"created_at": "<string>",
"test_mode": true,
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"metadata": {}
}
}Create a new Customer
curl --request POST \
--url https://api.withflex.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"checkout_session_id": "<string>",
"metadata": "{\"key\": \"value\"}"
}
}
'{
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"created_at": "<string>",
"test_mode": true,
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"metadata": {}
}
}Use a Bearer token to access this API.
Show child attributes
"John"
"Doe"
"+15555555555"
"Flex"
Show child attributes
The unique identifier for the customer.
"fcus_01HACM7FZ1084XB1GB6053VM0D"
The customer's first name.
"John"
The customer's last name.
"Doe"
The customer's email address.
The time the customer was created.
Whether the customer was created in test mode.
The customer's phone number.
"+15555555555"
The customer's employer.
"Flex"
The customer's shipping address.
Show child attributes