Create a client
The Fstop API includes an endpoint that allows client applications to create new clients in the database.
In this guide, you’ll make a POST request to the /api/clients/ endpoint to create a new client.
Before you begin
Section titled “Before you begin”Before you make a POST request, ensure that you have an access token. For instructions on requesting an access token, see Getting started with the Fstop API.
Make a POST request
Section titled “Make a POST request”-
Open a terminal and run the following command:
create_client.sh curl -X POST http://localhost:8000/api/clients/ \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"first_name": "Alice","last_name": "Johnson","city": "Cincinnati","state": "OH","zip_code": "45202","email": "alice.johnson@example.com","phone_number": "+12161239999"}'The API returns a
201 CREATEDand the details of the newly created client:create_client_response.json {"id": "550e8400-e29b-41d4-a716-446655440002","first_name": "Alice","last_name": "Johnson","city": "Cincinnati","state": "OH","zip_code": "45202","email": "alice.johnson@example.com","phone_number": "+12161239999","created_at": "2026-05-21T10:10:00Z"} -
Using the Python SDK:
create_client.py from fstop import Fstopwith Fstop(jwt_auth="YOUR_ACCESS_TOKEN") as f_client:created_client = f_client.clients.create_client(first_name="Alice",last_name="Johnson",city="Cincinnati",state="OH",zip_code="45202",email="alice.johnson@example.com",phone_number="+12161239999")print(f"Client created with ID: {created_client.id}")
You can use the returned client data in your application. The id field uniquely identifies the client and can be used to create projects and bookings associated with this client.
What to do next
Section titled “What to do next”See POST /api/clients/ for a full list of request parameters and response schemas.