Create a booking
The Fstop API includes an endpoint that allows client applications to create new bookings in the database.
In this guide, you’ll make a POST request to the /api/bookings/ endpoint to create a new booking for a project.
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.
You’ll also need the UUID of an existing project to associate with the booking. To get the UUID, use the /api/projects endpoint.
Make a POST request
Section titled “Make a POST request”-
Open a terminal and run the following command:
create_booking.sh curl -X POST http://localhost:8000/api/bookings/ \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"project_id": "660e8400-e29b-41d4-a716-446655440000","date": "2026-06-15","time": "14:00:00","duration": 480,"location": "Downtown Venue"}'The API returns a
201 CREATEDand the details of the newly created booking:create_booking_response.json {"id": "770e8400-e29b-41d4-a716-446655440001","project": {"id": "660e8400-e29b-41d4-a716-446655440000","project_name": "Wedding","project_type": "event","client": {"id": "550e8400-e29b-41d4-a716-446655440000","first_name": "John","last_name": "Doe","city": "Cleveland","state": "OH","zip_code": "44122","email": "john.doe@example.com","phone_number": "+12161231234","created_at": "2026-05-21T10:00:00Z"},"created_at": "2026-05-21T10:15:00Z"},"date": "2026-06-15","time": "14:00:00","duration": 480,"location": "Downtown Venue","created_at": "2026-05-21T10:30:00Z"} -
Using the Python SDK:
create_booking.py from fstop import Fstopfrom datetime import datewith Fstop(jwt_auth="YOUR_ACCESS_TOKEN") as f_client:created_booking = f_client.bookings.create_booking(project_id="660e8400-e29b-41d4-a716-446655440000",date_=date.fromisoformat("2026-06-15"),time="14:00:00",duration=480,location="Downtown Venue")print(f"Booking created with ID: {created_booking.id}")
You can use the returned booking data in your application. The id field uniquely identifies the booking and can be used to create galleries or update the booking details.
What to do next
Section titled “What to do next”See POST /api/bookings/ for a full list of request parameters and response schemas.