# Peerspace API

> Every Peerspace endpoint on Cotlet: inputs, JSON Schema, cURL, Python and Node.js examples and an example response for each call.

Source: https://cotlet.dev/docs/api/peerspace

Docs sections: [Get started](https://cotlet.dev/docs.md) · [REST API](https://cotlet.dev/docs/api.md) · [MCP](https://cotlet.dev/docs/mcp.md) · [SDKs & CLI](https://cotlet.dev/docs/sdks.md) · [Integrations](https://cotlet.dev/docs/integrations.md)

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: https://cotlet.dev/integrations/peerspace-api-mcp-server

## 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. |

## List listings

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

Access: read.

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**

```bash
curl -X POST https://cotlet.dev/api/v1/peerspace/list_listings \
  -H "Authorization: Bearer $COTLET_API_KEY"
```

**Python**

```python
result = client.call("peerspace", "list_listings")
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'list_listings');
```

**CLI**

```bash
cotlet call peerspace list_listings
```

### Example response

```json
{
  "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"
    }
  ]
}
```

## List bookings

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

Access: read.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `status` | enum | no | requested, confirmed, past or cancelled. Default: requested. |
| `listing_id` | string | no | Only this listing. |
| `from` | date | no | Bookings on or after this date. |
| `to` | date | no | Bookings on or before this date. |
| `cursor` | string | no | Next page cursor from the previous call. |

### Request

**cURL**

```bash
curl -X POST https://cotlet.dev/api/v1/peerspace/list_bookings \
  -H "Authorization: Bearer $COTLET_API_KEY"
```

**Python**

```python
result = client.call("peerspace", "list_bookings")
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'list_bookings');
```

**CLI**

```bash
cotlet call peerspace list_bookings
```

### Example response

```json
{
  "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
}
```

## Get booking

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

Access: read.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `booking_id` | string | yes | Booking or request ID from list_bookings. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "get_booking", {"booking_id":"booking_8c41d2"})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'get_booking', {"booking_id":"booking_8c41d2"});
```

**CLI**

```bash
cotlet call peerspace get_booking --data '{"booking_id":"booking_8c41d2"}'
```

### Example response

```json
{
  "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"
}
```

## List conversations

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

Access: read.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `unanswered_only` | boolean | no | Only threads where the guest wrote last. |
| `limit` | integer | no | Maximum threads per page. |
| `cursor` | string | no | Next page cursor from the previous call. |

### Request

**cURL**

```bash
curl -X POST https://cotlet.dev/api/v1/peerspace/list_conversations \
  -H "Authorization: Bearer $COTLET_API_KEY"
```

**Python**

```python
result = client.call("peerspace", "list_conversations")
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'list_conversations');
```

**CLI**

```bash
cotlet call peerspace list_conversations
```

### Example response

```json
{
  "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
}
```

## Get conversation

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

Access: read.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `conversation_id` | string | yes | Inbox thread ID from list_conversations. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "get_conversation", {"conversation_id":"conversation_8c41d2"})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'get_conversation', {"conversation_id":"conversation_8c41d2"});
```

**CLI**

```bash
cotlet call peerspace get_conversation --data '{"conversation_id":"conversation_8c41d2"}'
```

### Example response

```json
{
  "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?"
    }
  ]
}
```

## Get calendar

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

Access: read.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `space_id` | string | yes | Space ID from list_listings. |
| `from` | date | yes | First day. |
| `to` | date | yes | Last day. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "get_calendar", {"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'get_calendar', {"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"});
```

**CLI**

```bash
cotlet call peerspace get_calendar --data '{"space_id":"space_8c41d2","from":"2026-10-01","to":"2026-10-01"}'
```

### Example response

```json
{
  "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"
        }
      ]
    }
  ]
}
```

## List payouts

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

Access: read.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `status` | enum | no | scheduled, processing or processed. Default: all. |
| `since` | date | no | Only payouts on or after this date. |

### Request

**cURL**

```bash
curl -X POST https://cotlet.dev/api/v1/peerspace/list_payouts \
  -H "Authorization: Bearer $COTLET_API_KEY"
```

**Python**

```python
result = client.call("peerspace", "list_payouts")
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'list_payouts');
```

**CLI**

```bash
cotlet call peerspace list_payouts
```

### Example response

```json
{
  "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

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `conversation_id` | string | yes | Inbox thread ID from list_conversations. |
| `body` | string | yes | Message text. |

### Request

**cURL**

```bash
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**

```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**

```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**

```bash
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

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

## Send custom offer

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

Access: write. Confirm: waits for the user's OK before it runs.

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

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

### Request

**cURL**

```bash
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**

```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**

```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**

```bash
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

```json
{
  "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

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `booking_id` | string | yes | Booking or request ID from list_bookings. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "accept_booking_request", {"booking_id":"b_90417"})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'accept_booking_request', {"booking_id":"b_90417"});
```

**CLI**

```bash
cotlet call peerspace accept_booking_request --data '{"booking_id":"b_90417"}'
```

### Example response

```json
{
  "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

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `booking_id` | string | yes | Booking or request ID from list_bookings. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "decline_booking_request", {"booking_id":"booking_8c41d2"})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'decline_booking_request', {"booking_id":"booking_8c41d2"});
```

**CLI**

```bash
cotlet call peerspace decline_booking_request --data '{"booking_id":"booking_8c41d2"}'
```

### Example response

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

## Request booking update

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `booking_id` | string | yes | Booking or request ID from list_bookings. |
| `fields` | object | yes | Any of start, end, attendees, subtotal. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "request_booking_update", {"booking_id":"booking_8c41d2","fields":"fields"})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'request_booking_update', {"booking_id":"booking_8c41d2","fields":"fields"});
```

**CLI**

```bash
cotlet call peerspace request_booking_update --data '{"booking_id":"booking_8c41d2","fields":"fields"}'
```

### Example response

```json
{
  "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

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `space_id` | string | yes | Space ID from list_listings. |
| `start` | datetime | yes | Start, ISO 8601 with time zone. |
| `end` | datetime | yes | End, ISO 8601 with time zone. |
| `title` | string | no | Private reminder, not shown to guests. |

### Request

**cURL**

```bash
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**

```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**

```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**

```bash
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

```json
{
  "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

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `listing_id` | string | yes | Listing ID from list_listings. |
| `name` | string | yes | Rate name, e.g. Weekend. |
| `hourly_rate` | number | yes | Rate per hour. |
| `days` | string[] | yes | mon, tue, wed, thu, fri, sat, sun. |
| `from_time` | string | no | Start time, HH:MM. |
| `to_time` | string | no | End time, HH:MM. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "add_calendar_rate", {"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'add_calendar_rate', {"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]});
```

**CLI**

```bash
cotlet call peerspace add_calendar_rate --data '{"listing_id":"listing_8c41d2","name":"Jane Doe","hourly_rate":1,"days":["days"]}'
```

### Example response

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

## Set Instant Book

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

Access: write. Confirm: waits for the user's OK before it runs.

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

| Name | Type | Required | Description |
|---|---|---|---|
| `listing_id` | string | yes | Listing ID from list_listings. |
| `enabled` | boolean | yes | true to turn on, false to turn off. |

### Request

**cURL**

```bash
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**

```python
result = client.call("peerspace", "set_instant_book", {"listing_id":"listing_8c41d2","enabled":True})
```

**Node.js**

```js
const result = await cotlet.call('peerspace', 'set_instant_book', {"listing_id":"listing_8c41d2","enabled":true});
```

**CLI**

```bash
cotlet call peerspace set_instant_book --data '{"listing_id":"listing_8c41d2","enabled":true}'
```

### Example response

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