Developer docs

Messaging

Start a conversation with the venue on a guest's behalf — a server-side call that opens a thread the venue answers from its console.

A guest with a question — "is the event area free for eighteen on the 24th?" — should not have to phone. This endpoint opens a conversation thread with the venue; the venue answers from the console and the guest receives the reply by e-mail. It follows the same key and CORS rules as every other /api/venues/** route (CORS and preflight) — a publishable key with an Origin header works from a browser like anywhere else. The recommended shape is still server-side with a secret key: a guest's e-mail address and free-text message are worth keeping behind your own form and anti-abuse checks rather than handing a key straight to the page.

Endpoints

POST /api/venues/{venueSlug}/messages

Request body (Content-Type: application/json)

Field Required Meaning
guestName yes Up to 120 characters
guestEmail yes A valid e-mail address — the reply goes there
subject yes Up to 200 characters
body yes Up to 4000 characters

Response 202 Accepted — the thread exists and the venue has been notified. The body carries the thread id for your own records; there is no public read endpoint for threads.

{
  "threadId": "f0c5853d-97e9-4744-a0d3-dda85e1f3f3a"
}

Errors

Status When
400 A field is empty, not an e-mail address, or over its length (errors.message)
403 The venue's plan does not include guest messaging — offer the venue's phone or e-mail from business-info instead
404 No venue with that slug

curl

curl -X POST "https://api.bookdineplay.com/api/venues/your-venue/messages" \
  -H "Authorization: Bearer $BOOKDINEPLAY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "guestName": "Ada Lovelace", "guestEmail": "ada@example.com", "subject": "Private event on 24 October?", "body": "We are 18 people — is the event area free that evening?" }'

JavaScript

// Node.js on your server — the key comes from the environment, never from the page.
const response = await fetch('https://api.bookdineplay.com/api/venues/your-venue/messages', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${process.env.BOOKDINEPLAY_SECRET_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ guestName, guestEmail, subject, body })
});
if (response.status === 403) { /* messaging not available for this venue */ }

C#

var result = await client.StartConversationAsync("your-venue", new StartConversationRequest(
    "Ada Lovelace", "ada@example.com", "Private event on 24 October?",
    "We are 18 people — is the event area free that evening?"), cancellationToken);
if (result.Status != StartConversationStatus.Sent) { /* NotAvailable, Invalid or Failed */ }

The curl and JavaScript samples send a secret key and no Origin header — the recommended server-side shape. A publishable key with an Origin header is accepted too, exactly as on the rest of /api/venues/**; only a publishable key sent without an Origin is refused, with publishable-key-without-origin (Errors).

Next steps

  • .NET SDKStartConversationAsync reports the outcome as a status instead of throwing.
  • Venue — the venue's phone and e-mail for the 403 case.