Contact messages

List contact messages assigned to you, or retrieve a single message by id.

The contact message model

Contact messages are created when someone reaches out through a listing page or contact flow. The API returns messages that are assigned to the authenticated user (rep_user_id).

Properties

  • Name
    id
    Type
    integer
    Description
    Unique identifier for the contact message.
  • Name
    topic
    Type
    string|null
    Description
    Short subject/topic entered by the contact (when available).
  • Name
    spot_name
    Type
    string|null
    Description
    Listing name (if the message came from a listing page).
  • Name
    spot_slug
    Type
    string|null
    Description
    Listing slug (if the message came from a listing page).
  • Name
    from_url
    Type
    string|null
    Description
    Page URL where the message was submitted.
  • Name
    name
    Type
    string|null
    Description
    Contact name.
  • Name
    email
    Type
    string|null
    Description
    Contact email address.
  • Name
    phone
    Type
    string|null
    Description
    Contact phone number.
  • Name
    move_in
    Type
    string|null
    Description
    Desired move-in date (free-form).
  • Name
    budget
    Type
    string|null
    Description
    Budget (free-form).
  • Name
    request_kind
    Type
    string|null
    Description
    Classification (for example viewing).
  • Name
    request_status
    Type
    string|null
    Description
    Status for internal tracking (for example new, in_progress).
  • Name
    preferred_slots
    Type
    array|null
    Description
    Preferred time slots (decoded from stored JSON when present).
  • Name
    rep_user_id
    Type
    integer
    Description
    Assigned rep user id (used for filtering).
  • Name
    created_at
    Type
    timestamp
    Description
    Timestamp of when the message was created.
  • Name
    message
    Type
    string|null
    Description
    Full message text.

GET/v1/contact-messages/

List all contact messages

Retrieve a paginated list of contact messages that are assigned to the authenticated user. By default, a maximum of 50 messages are shown per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description
    Limit the number of messages returned (default 50, max 200).
  • Name
    before_id
    Type
    integer
    Description
    Return messages with id less than this value (cursor pagination).

Required scope

Tokens must include read:contact_messages (OAuth tokens and API keys).

Request

GET
/v1/contact-messages/
curl -G https://api.twentybaan.com/v1/contact-messages/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d limit=10

Response

{
  "ok": true,
  "items": [
    {
      "id": 123,
      "topic": "Viewing request",
      "spot_name": "Twentybaan listing",
      "spot_slug": "modern-condo-sukhumvit",
      "from_url": "https://twentybaan.com/spots/modern-condo-sukhumvit/",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "phone": "+66 12 345 6789",
      "move_in": "2026-02-01",
      "budget": "35000",
      "notes": "Can we do a viewing this week?",
      "request_kind": "viewing",
      "request_status": "new",
      "request_timezone": "Asia/Bangkok",
      "preferred_slots": [
        {"date": "2026-01-15", "time": "10:00"},
        {"date": "2026-01-16", "time": "14:00"}
      ],
      "rep_name": "Your Name",
      "rep_brand": "twentybaan",
      "rep_user_id": 42,
      "rep_email": "rep@twentybaan.com",
      "created_at": "2026-01-12T02:03:04Z",
      "message": "Hello, I'm interested in this property..."
    }
  ],
  "next_before_id": 120
}

GET/v1/contact-messages?id=:id

Retrieve a contact message

Fetch a single contact message by id. The authenticated user must be the assigned rep.

Required attributes

  • Name
    id
    Type
    integer
    Description
    The contact message id to retrieve.

Errors

Returns 404 if the message does not exist or is not assigned to the authenticated user.

Request

GET
/v1/contact-messages/
curl -G https://api.twentybaan.com/v1/contact-messages/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d id=123

Response

{
  "ok": true,
  "contact_message": {
    "id": 123,
    "topic": "Viewing request",
    "spot_name": "Twentybaan listing",
    "spot_slug": "modern-condo-sukhumvit",
    "from_url": "https://twentybaan.com/spots/modern-condo-sukhumvit/",
    "name": "Jane Doe",
    "email": "jane@example.com",
    "phone": "+66 12 345 6789",
    "move_in": "2026-02-01",
    "budget": "35000",
    "notes": "Can we do a viewing this week?",
    "request_kind": "viewing",
    "request_status": "new",
    "request_timezone": "Asia/Bangkok",
    "preferred_slots": [
      {"date": "2026-01-15", "time": "10:00"},
      {"date": "2026-01-16", "time": "14:00"}
    ],
    "rep_name": "Your Name",
    "rep_brand": "twentybaan",
    "rep_user_id": 42,
    "rep_email": "rep@twentybaan.com",
    "created_at": "2026-01-12T02:03:04Z",
    "message": "Hello, I'm interested in this property..."
  }
}
tb twentybaan

Sign in to your account

Not a member? Create an account

Or continue with email

Uncheck on shared devices.