Charter Boats API
Claims

Respond to Claim

Add a response message to an open damage claim

POST/claims/:id/respond

Add a response message to an existing damage claim. Both the boat's company members and the booking guest can respond. Responses can only be added while the claim is open (not resolved or declined).

Authentication

Requires authentication as either a company member for the boat or the booking guest.

X-API-Key: cb_live_xxxxx

Path Parameters

ParameterTypeDescription
idstringClaim ID (UUID)

Request Body

FieldTypeRequiredDescription
messagestringYesResponse message text
attachmentsstring[]NoArray of attachment URLs

Request

curl -X POST https://charter.boats/api/claims/a1b2c3d4-e5f6-7890-abcd-ef1234567890/respond \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cb_live_xxxxx" \
  -d '{
    "message": "I have photos showing the boat condition at check-in. The scratch was not present when I returned the boat.",
    "attachments": [
      "https://storage.example.com/checkin-photo-1.jpg"
    ]
  }'

Response

{
  "success": true,
  "message": {
    "id": "msg-1a2b3c...",
    "claim_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "sender_type": "guest",
    "sender_id": "user-uuid",
    "message": "I have photos showing the boat condition at check-in. The scratch was not present when I returned the boat.",
    "attachments": [
      "https://storage.example.com/checkin-photo-1.jpg"
    ],
    "created_at": "2024-01-21T10:15:00Z"
  }
}

Response Fields

FieldTypeDescription
successbooleanAlways true on success
message.idstringMessage ID (UUID)
message.claim_idstringThe claim this message belongs to
message.sender_typestringowner (company member) or guest
message.sender_idstringUser ID of the sender
message.messagestringResponse text
message.attachmentsstring[]Attached file URLs
message.created_atstringISO 8601 timestamp

Sender Types

The sender_type is automatically determined based on the authenticated user:

Sender TypeWho
ownerA member of the boat's company
guestThe guest from the booking

Errors

StatusMessage
400Claim ID required
400Message is required
400This claim has been closed
403Not authorized
404Claim not found

Notifications

When a response is added, email notifications are sent to:

  • The other party (guest receives owner responses, owner receives guest responses)
  • The claims team at Charter Boats

On this page