REST API reference

Peerspace API

15 endpoints for Peerspace. Each one is a POST with a JSON body, called with your API key.

Base URL
https://cotlet.dev/api/v1/peerspace
Connects with
Your own Peerspace host account (email and password, or Google, Facebook or Apple sign-in)
Integration page
Peerspace
Peerspace Endpoints
Endpoint Access Description
list_listings read Your spaces and their listings, with base rate, Instant Book and paused status.
list_bookings read Booking requests and bookings from the Bookings tab, with guest, date, hours and attendees.
get_booking read One booking or request: times, attendees, activity, add-ons, price, expected payout and when a request expires.
list_conversations read Inbox threads with guests, with the last message time and whether the guest wrote last.
get_conversation read All messages in a thread, with the inquiry or booking it belongs to.
get_calendar read Inquiries, requests and bookings for one space, by day.
list_payouts read Payouts with date, amount, status and the bookings, overtime and add-ons in each.
send_message write Reply as you in a guest thread in the Peerspace inbox.
send_custom_offer write Invite the guest to book with your date, time, attendees and price. The guest has 7 days to pay.
accept_booking_request write Accept a pending request. The booking is confirmed and the guest is charged in full.
decline_booking_request write Decline a pending request and release the authorization hold on the guest's card.
request_booking_update write Ask the guest to approve a new date, time, attendee count or price, up to 1 hour before start.
block_calendar_time write Block dates and times on a space calendar so guests cannot book them.
add_calendar_rate write Rate for chosen days and times on one listing, e.g. weekends or weekday evenings.
set_instant_book write Turn Instant Book on or off for one listing, if your account has access.

POST https://cotlet.dev/api/v1/peerspace/list_listings

Returns every listing on your host account with its space, base rate, whether Instant Book is on and whether the listing is live or paused. A paused listing cannot be booked and is hidden from search, and guests cannot contact you about it. Use the IDs here in the other calls.

Parameters

No parameters.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/list_listings \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("peerspace", "list_listings")
Node.js
const result = await cotlet.call('peerspace', 'list_listings');
CLI
cotlet call peerspace list_listings

Example response

{
  "listings": [
    {
      "listing_id": "l_30918",
      "space_id": "s_4410",
      "title": "Daylight loft studio",
      "base_hourly_rate": 120,
      "instant_book": false,
      "status": "live"
    },
    {
      "listing_id": "l_30922",
      "space_id": "s_4410",
      "title": "Daylight loft, events",
      "base_hourly_rate": 150,
      "instant_book": false,
      "status": "paused"
    }
  ]
}

POST https://cotlet.dev/api/v1/peerspace/list_bookings

Lists bookings and requests, each with guest first name, start and end, attendees and the status. Requests carry an expires_at, two business days after you received them, so your agent can answer the oldest first. Use booking_id with get_booking, accept_booking_request and decline_booking_request.

Parameters

Parameters: list_bookings
NameTypeDescription
status enum requested, confirmed, past or cancelled. Default: requested.
listing_id string Only this listing.
from date Bookings on or after this date.
to date Bookings on or before this date.
cursor string Next page cursor from the previous call.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/list_bookings \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("peerspace", "list_bookings")
Node.js
const result = await cotlet.call('peerspace', 'list_bookings');
CLI
cotlet call peerspace list_bookings

Example response

{
  "bookings": [
    {
      "booking_id": "b_90417",
      "listing_id": "l_30918",
      "guest": "Dana",
      "status": "requested",
      "start": "2026-10-17T14:00:00-07:00",
      "end": "2026-10-17T18:00:00-07:00",
      "attendees": 12,
      "expires_at": "2026-10-14T09:12:00-07:00"
    }
  ],
  "next_cursor": null
}

POST https://cotlet.dev/api/v1/peerspace/get_booking

Returns the full record of one booking or request, including the add-ons attached, the price and the payout you expect after Peerspace's service fee. For a request it also returns when it expires. Read it before you accept or decline.

Parameters

Parameters: get_booking
NameTypeDescription
booking_id required string Booking or request ID from list_bookings.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/get_booking \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"booking_id":"booking_8c41d2"}'
Python
result = client.call("peerspace", "get_booking", {"booking_id":"booking_8c41d2"})
Node.js
const result = await cotlet.call('peerspace', 'get_booking', {"booking_id":"booking_8c41d2"});
CLI
cotlet call peerspace get_booking --data '{"booking_id":"booking_8c41d2"}'

Example response

{
  "booking_id": "b_90417",
  "listing_id": "l_30918",
  "guest": "Dana",
  "status": "requested",
  "start": "2026-10-17T14:00:00-07:00",
  "end": "2026-10-17T18:00:00-07:00",
  "attendees": 12,
  "activity": "Photo shoot",
  "add_ons": [
    {
      "name": "Backdrop set",
      "price": 50
    }
  ],
  "subtotal": 480,
  "total": 530,
  "expected_payout": 477,
  "expires_at": "2026-10-14T09:12:00-07:00"
}

POST https://cotlet.dev/api/v1/peerspace/list_conversations

Lists your Peerspace inbox threads, each linked to an inquiry or a booking. Set unanswered_only to get only threads where the guest wrote last, which is what response rate is measured on. Pass next_cursor back as cursor for the next page.

Parameters

Parameters: list_conversations
NameTypeDescription
unanswered_only boolean Only threads where the guest wrote last.
limit integer Maximum threads per page.
cursor string Next page cursor from the previous call.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/list_conversations \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("peerspace", "list_conversations")
Node.js
const result = await cotlet.call('peerspace', 'list_conversations');
CLI
cotlet call peerspace list_conversations

Example response

{
  "conversations": [
    {
      "conversation_id": "c_58210437",
      "guest": "Dana",
      "about": "inquiry",
      "last_message_at": "2026-10-11T08:40:00-07:00",
      "guest_wrote_last": true
    }
  ],
  "next_cursor": null
}

POST https://cotlet.dev/api/v1/peerspace/get_conversation

Returns the whole thread, oldest message first, with the inquiry or booking it is about. Your agent reads it before replying so it does not repeat an earlier answer.

Parameters

Parameters: get_conversation
NameTypeDescription
conversation_id required string Inbox thread ID from list_conversations.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/get_conversation \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversation_id":"conversation_8c41d2"}'
Python
result = client.call("peerspace", "get_conversation", {"conversation_id":"conversation_8c41d2"})
Node.js
const result = await cotlet.call('peerspace', 'get_conversation', {"conversation_id":"conversation_8c41d2"});
CLI
cotlet call peerspace get_conversation --data '{"conversation_id":"conversation_8c41d2"}'

Example response

{
  "conversation_id": "c_58210437",
  "about": "inquiry",
  "messages": [
    {
      "from": "guest",
      "sent_at": "2026-10-11T08:40:00-07:00",
      "body": "Hi! Is parking free, and can we shoot on Oct 24?"
    }
  ]
}

POST https://cotlet.dev/api/v1/peerspace/get_calendar

Returns what the Peerspace calendar shows for one space between two dates: inquiries, requests and bookings. Inquiries and requests do not block the time, so it still looks open to guests; accepted bookings do. Check it before you accept a request.

Parameters

Parameters: get_calendar
NameTypeDescription
space_id required string Space ID from list_listings.
from required date First day.
to required date Last day.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/get_calendar \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"}'
Python
result = client.call("peerspace", "get_calendar", {"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"})
Node.js
const result = await cotlet.call('peerspace', 'get_calendar', {"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"});
CLI
cotlet call peerspace get_calendar --data '{"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"}'

Example response

{
  "space_id": "s_4410",
  "days": [
    {
      "date": "2026-10-17",
      "items": [
        {
          "type": "request",
          "booking_id": "b_90417",
          "start": "14:00",
          "end": "18:00"
        }
      ]
    },
    {
      "date": "2026-10-18",
      "items": [
        {
          "type": "booking",
          "booking_id": "b_90388",
          "start": "10:00",
          "end": "13:00"
        }
      ]
    }
  ]
}

POST https://cotlet.dev/api/v1/peerspace/list_payouts

Lists the payouts from your payout dashboard. A payout is scheduled 72 hours after the booking ends, becomes processing once initiated and processed after it is paid out. Each entry lists what is inside it, because the payout for a booking and for its overtime can arrive separately.

Parameters

Parameters: list_payouts
NameTypeDescription
status enum scheduled, processing or processed. Default: all.
since date Only payouts on or after this date.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/list_payouts \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("peerspace", "list_payouts")
Node.js
const result = await cotlet.call('peerspace', 'list_payouts');
CLI
cotlet call peerspace list_payouts

Example response

{
  "payouts": [
    {
      "payout_id": "p_7710",
      "status": "scheduled",
      "date": "2026-10-20",
      "amount": 842.5,
      "includes": [
        {
          "type": "booking",
          "booking_id": "b_90388",
          "amount": 800
        },
        {
          "type": "overtime",
          "booking_id": "b_90388",
          "amount": 42.5
        }
      ]
    }
  ]
}

Send message

write Confirm

POST https://cotlet.dev/api/v1/peerspace/send_message

Sends a message in an existing thread under your name; the guest gets it in the Peerspace inbox. It cannot start a thread with a stranger, only answer one. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: send_message
NameTypeDescription
conversation_id required string Inbox thread ID from list_conversations.
body required string Message text.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/send_message \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversation_id":"c_58210437","body":"Hi Dana, Oct 24 is open for 20 people. Parking for 6 cars is free on site, and load-in is through the back door on 3rd St. Want me to send you an offer for the hours you need?"}'
Python
result = client.call("peerspace", "send_message", {"conversation_id":"c_58210437","body":"Hi Dana, Oct 24 is open for 20 people. Parking for 6 cars is free on site, and load-in is through the back door on 3rd St. Want me to send you an offer for the hours you need?"})
Node.js
const result = await cotlet.call('peerspace', 'send_message', {"conversation_id":"c_58210437","body":"Hi Dana, Oct 24 is open for 20 people. Parking for 6 cars is free on site, and load-in is through the back door on 3rd St. Want me to send you an offer for the hours you need?"});
CLI
cotlet call peerspace send_message --data '{"conversation_id":"c_58210437","body":"Hi Dana, Oct 24 is open for 20 people. Parking for 6 cars is free on site, and load-in is through the back door on 3rd St. Want me to send you an offer for the hours you need?"}'

Example response

{
  "message_id": "m_6204188",
  "conversation_id": "c_58210437",
  "status": "sent",
  "sent_at": "2026-10-11T09:05:00-07:00"
}

Send custom offer

write Confirm

POST https://cotlet.dev/api/v1/peerspace/send_custom_offer

Sends an invite-to-book from a guest thread. Spaces without a food and beverage minimum take a rental fee; spaces with one also take minimum spend and gratuity. Sales tax on minimum spend and add-ons is added automatically, so do not include it. The guest then has 7 days to review and submit payment. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: send_custom_offer
NameTypeDescription
conversation_id required string Inbox thread ID from list_conversations.
start required datetime Start, ISO 8601 with time zone.
end required datetime End, ISO 8601 with time zone.
attendees required integer Number of attendees.
rental_fee required number Space rental fee.
minimum_spend number Food and beverage minimum, only for spaces that have one.
gratuity number Gratuity, only with a food and beverage minimum.
add_on_ids string[] Existing add-ons of the listing to include.
note string What the offer includes and what the guest can expect.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/send_custom_offer \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversation_id":"c_58210437","start":"2026-10-24T10:00:00-07:00","end":"2026-10-24T16:00:00-07:00","attendees":20,"rental_fee":900,"note":"Six hours for your team offsite, setup from 9:30."}'
Python
result = client.call("peerspace", "send_custom_offer", {"conversation_id":"c_58210437","start":"2026-10-24T10:00:00-07:00","end":"2026-10-24T16:00:00-07:00","attendees":20,"rental_fee":900,"note":"Six hours for your team offsite, setup from 9:30."})
Node.js
const result = await cotlet.call('peerspace', 'send_custom_offer', {"conversation_id":"c_58210437","start":"2026-10-24T10:00:00-07:00","end":"2026-10-24T16:00:00-07:00","attendees":20,"rental_fee":900,"note":"Six hours for your team offsite, setup from 9:30."});
CLI
cotlet call peerspace send_custom_offer --data '{"conversation_id":"c_58210437","start":"2026-10-24T10:00:00-07:00","end":"2026-10-24T16:00:00-07:00","attendees":20,"rental_fee":900,"note":"Six hours for your team offsite, setup from 9:30."}'

Example response

{
  "offer_id": "o_7731905",
  "conversation_id": "c_58210437",
  "status": "sent",
  "rental_fee": 900,
  "expires_at": "2026-10-18T09:05:00-07:00"
}

Accept booking request

write Confirm

POST https://cotlet.dev/api/v1/peerspace/accept_booking_request

Accepts a request from the Bookings tab. The booking is confirmed and the guest's card is charged for the full amount. A request you leave alone expires after two business days. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: accept_booking_request
NameTypeDescription
booking_id required string Booking or request ID from list_bookings.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/accept_booking_request \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"booking_id":"b_90417"}'
Python
result = client.call("peerspace", "accept_booking_request", {"booking_id":"b_90417"})
Node.js
const result = await cotlet.call('peerspace', 'accept_booking_request', {"booking_id":"b_90417"});
CLI
cotlet call peerspace accept_booking_request --data '{"booking_id":"b_90417"}'

Example response

{
  "booking_id": "b_90417",
  "status": "confirmed",
  "start": "2026-10-17T14:00:00-07:00",
  "end": "2026-10-17T18:00:00-07:00",
  "total": 530
}

Decline booking request

write Confirm

POST https://cotlet.dev/api/v1/peerspace/decline_booking_request

Declines a request. The authorization hold on the guest's card is released. Declining counts as a response for your response rate, an expired request does not. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: decline_booking_request
NameTypeDescription
booking_id required string Booking or request ID from list_bookings.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/decline_booking_request \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"booking_id":"booking_8c41d2"}'
Python
result = client.call("peerspace", "decline_booking_request", {"booking_id":"booking_8c41d2"})
Node.js
const result = await cotlet.call('peerspace', 'decline_booking_request', {"booking_id":"booking_8c41d2"});
CLI
cotlet call peerspace decline_booking_request --data '{"booking_id":"booking_8c41d2"}'

Example response

{
  "booking_id": "b_90421",
  "status": "declined"
}

Request booking update

write Confirm

POST https://cotlet.dev/api/v1/peerspace/request_booking_update

Sends an update request on a confirmed booking; the guest accepts or declines. If they accept, the change applies at once. If they decline, or do not answer within two business days, the original booking stays. If you change the hours, set the new price yourself: it does not update on its own, and 8+ hour discounts do not apply to host updates. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: request_booking_update
NameTypeDescription
booking_id required string Booking or request ID from list_bookings.
fields required object Any of start, end, attendees, subtotal.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/request_booking_update \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"booking_id":"booking_8c41d2","fields":"fields"}'
Python
result = client.call("peerspace", "request_booking_update", {"booking_id":"booking_8c41d2","fields":"fields"})
Node.js
const result = await cotlet.call('peerspace', 'request_booking_update', {"booking_id":"booking_8c41d2","fields":"fields"});
CLI
cotlet call peerspace request_booking_update --data '{"booking_id":"booking_8c41d2","fields":"fields"}'

Example response

{
  "booking_id": "b_90388",
  "update_id": "u_2045",
  "status": "pending_guest",
  "fields": {
    "end": "2026-10-18T14:00:00-07:00",
    "subtotal": 800
  }
}

Block calendar time

write Confirm

POST https://cotlet.dev/api/v1/peerspace/block_calendar_time

Blocks the time for all guests, including guests with a pending inquiry or offer. The title is a private reminder that guests cannot see. There is no call to unblock. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: block_calendar_time
NameTypeDescription
space_id required string Space ID from list_listings.
start required datetime Start, ISO 8601 with time zone.
end required datetime End, ISO 8601 with time zone.
title string Private reminder, not shown to guests.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/block_calendar_time \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"space_id":"space_8c41d2","start":"2026-10-01T09:00:00Z","end":"2026-10-01T09:00:00Z"}'
Python
result = client.call("peerspace", "block_calendar_time", {"space_id":"space_8c41d2","start":"2026-10-01T09:00:00Z","end":"2026-10-01T09:00:00Z"})
Node.js
const result = await cotlet.call('peerspace', 'block_calendar_time', {"space_id":"space_8c41d2","start":"2026-10-01T09:00:00Z","end":"2026-10-01T09:00:00Z"});
CLI
cotlet call peerspace block_calendar_time --data '{"space_id":"space_8c41d2","start":"2026-10-01T09:00:00Z","end":"2026-10-01T09:00:00Z"}'

Example response

{
  "block_id": "blk_5531",
  "space_id": "s_4410",
  "start": "2026-11-03T00:00:00-08:00",
  "end": "2026-11-03T23:59:00-08:00",
  "title": "Maintenance"
}

Add calendar rate

write Confirm

POST https://cotlet.dev/api/v1/peerspace/add_calendar_rate

Adds a calendar rate to one listing: a name, a rate and the days and times it applies to. Guests see it at checkout once they enter start and end times. Rates far above your base rate can hurt conversion, and Peerspace may remove accounts that use rates to mislead guests. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: add_calendar_rate
NameTypeDescription
listing_id required string Listing ID from list_listings.
name required string Rate name, e.g. Weekend.
hourly_rate required number Rate per hour.
days required string[] mon, tue, wed, thu, fri, sat, sun.
from_time string Start time, HH:MM.
to_time string End time, HH:MM.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/add_calendar_rate \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]}'
Python
result = client.call("peerspace", "add_calendar_rate", {"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]})
Node.js
const result = await cotlet.call('peerspace', 'add_calendar_rate', {"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]});
CLI
cotlet call peerspace add_calendar_rate --data '{"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]}'

Example response

{
  "listing_id": "l_30918",
  "rate_id": "r_8802",
  "name": "Weekend",
  "hourly_rate": 150,
  "days": [
    "sat",
    "sun"
  ]
}

Set Instant Book

write Confirm

POST https://cotlet.dev/api/v1/peerspace/set_instant_book

Switches the Instant Book toggle for one listing. If the toggle is not available on the listing, the call fails and you need to use Request Access in Peerspace first. You can turn it on or off at any time. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: set_instant_book
NameTypeDescription
listing_id required string Listing ID from list_listings.
enabled required boolean true to turn on, false to turn off.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/peerspace/set_instant_book \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"listing_8c41d2","enabled":true}'
Python
result = client.call("peerspace", "set_instant_book", {"listing_id":"listing_8c41d2","enabled":True})
Node.js
const result = await cotlet.call('peerspace', 'set_instant_book', {"listing_id":"listing_8c41d2","enabled":true});
CLI
cotlet call peerspace set_instant_book --data '{"listing_id":"listing_8c41d2","enabled":true}'

Example response

{
  "listing_id": "l_30918",
  "instant_book": true
}