Skip to content
KnockDevelopers
Members

Update the availability of a member

Chat with a Developer
PATCH
/v1/members/{memberId}/availability

Changes the member's working hours on the days you send and returns their hours after the change. A day you leave out keeps its hours, [] makes a day a day off, and an empty weeklyHours changes nothing. The hours are in the member's timeZone.

The new hours apply to the meetings booked from then on: meetings already booked are not moved or canceled. The member needs working hours on at least one day.

Authorization

ApiKeyAuth
headerx-api-key<token>

Your Knock API key. Ask your Knock account team for one: a key with the Enrichment API role to enrich and route leads and find warm intros, the Viewer role to read chats, meetings, routing rules, FAQs, analytics, magic links, meeting routing rules, marketing cards and members, the Admin, Editor or AI Manager role to change FAQs, the Admin, Editor or Partner Contributor role to create marketing cards and wrap chat links, or the Admin role to set the working hours of your members.

Path Parameters

memberId*string

ID of the member, from GET /v1/members.

Formatuuid

Request Body

application/json
  1. body

A change to a member's working hours.

weeklyHours*

The days to change, by their lowercase English name. A day you leave out keeps its hours.

Response Body

The member's working hours after the change.

application/json
  1. response

When a member can be booked: Knock offers a meeting slot with them only inside these hours, and only when their calendar is free. An active temporary availability period set in Knock replaces these hours while it lasts.

memberId*string

ID of the member.

Formatuuid
timeZone*string

IANA time zone the working hours are in, such as America/New_York. UTC when the member never set one.

weeklyHours*

Working hours for each day of the week.

Example Request
curl -X PATCH 'https://app.knock-ai.com/v1/members/6b1f0c8e-2d4a-4f3b-9e7c-1a5d8b2c4e90/availability' \  -H 'x-api-key: <YOUR_API_KEY>' \  -H 'Content-Type: application/json' \  -d '{  "weeklyHours": {    "monday": [      {        "start": "09:00",        "end": "12:00"      },      {        "start": "13:00",        "end": "17:00"      }    ],    "saturday": []  }}'
Example Response
{  "memberId": "6b1f0c8e-2d4a-4f3b-9e7c-1a5d8b2c4e90",  "timeZone": "America/New_York",  "weeklyHours": {    "monday": [      {        "start": "09:00",        "end": "12:00"      },      {        "start": "13:00",        "end": "17:00"      }    ],    "tuesday": [      {        "start": "09:00",        "end": "17:00"      }    ],    "wednesday": [      {        "start": "09:00",        "end": "17:00"      }    ],    "thursday": [      {        "start": "09:00",        "end": "17:00"      }    ],    "friday": [      {        "start": "09:00",        "end": "17:00"      }    ],    "saturday": [],    "sunday": []  }}