Charter Boats API
Boats

Delete Boat

Permanently delete a boat listing

DELETE/boats/:id

Permanently delete a boat listing and all associated data. The requesting user must be an admin or owner of the company that owns the boat.

Authentication

Requires one of:

  • API key: X-API-Key header with your owner API key (cb_live_*)
  • Session: Authenticated user session (cookie-based)

Path Parameters

ParameterTypeRequiredDescription
idstringYesBoat UUID

Prerequisites

The boat must have no open bookings. Open booking statuses are:

  • pending -- awaiting owner approval
  • accepted -- awaiting guest payment
  • confirmed -- paid and scheduled

Cancel or complete all bookings before deleting.

Request

# Delete with API key
curl -X DELETE https://charter.boats/api/boats/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: cb_live_your_api_key"
 
# Delete with session
curl -X DELETE https://charter.boats/api/boats/550e8400-e29b-41d4-a716-446655440000 \
  -H "Cookie: session=..."

Response

{
  "success": true
}

What Gets Deleted

When a boat is deleted, the following data is permanently removed:

  • Boat record and all fields
  • All boat images (from storage and database)
  • Amenity associations
  • Calendar blocks
  • External calendar events
  • Calendar sources (iCal imports)
  • Favorites from all users

Completed and cancelled bookings are retained for record-keeping.

Errors

StatusMessage
400Boat ID is required
400Cannot delete boat with N open booking(s). Please cancel or complete all bookings first.
401Invalid API key
401Invalid API key format
403Not authorized to delete this boat (not a company admin/owner)
404Boat not found

On this page