/Docs
/Customers API
Customers API
Create, retrieve, update, and manage customers via the API.
When should I read this?
Read this if you need to programmatically manage customer records.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/customers |
List all customers |
| POST | /v1/customers |
Create a customer |
| GET | /v1/customers/:id |
Retrieve a customer |
| PATCH | /v1/customers/:id |
Update a customer |
| DELETE | /v1/customers/:id |
Delete a customer |
The Customer object
{
"id": "cus_abc123",
"name": "Acme Corp",
"email": "billing@acme.com",
"phone": "+1-555-0123",
"tax_exempt": false,
"tax_id": null,
"billing_address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"created_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
Create a customer
curl https://api.floatless.com/v1/customers \
-H "Authorization: Bearer fl_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"email": "billing@acme.com",
"billing_address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
}
}'
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Customer name |
| string | Yes | Billing email | |
| phone | string | No | Phone number |
| tax_exempt | boolean | No | Tax exempt status |
| tax_id | string | No | Tax identification number |
| billing_address | object | No | Billing address |
| metadata | object | No | Custom key-value data |
List customers
curl https://api.floatless.com/v1/customers \
-H "Authorization: Bearer fl_live_..."
Query parameters
| Parameter | Type | Description |
|---|---|---|
| string | Filter by email | |
| limit | integer | Number of results (default 20, max 100) |
| offset | integer | Pagination offset |
Retrieve a customer
curl https://api.floatless.com/v1/customers/cus_abc123 \
-H "Authorization: Bearer fl_live_..."
Update a customer
curl https://api.floatless.com/v1/customers/cus_abc123 \
-H "Authorization: Bearer fl_live_..." \
-H "Content-Type: application/json" \
-X PATCH \
-d '{
"phone": "+1-555-9999"
}'
Delete a customer
curl https://api.floatless.com/v1/customers/cus_abc123 \
-H "Authorization: Bearer fl_live_..." \
-X DELETE
[!WARNING] Deleting a customer removes all associated data. This action cannot be undone.