Act
Calendar and e-mail
A client who connects Google lets your automations find free slots and book them in Google Calendar, and send e-mail from their Gmail address. Nothing is read from their inbox.
On this page
What the client allows#
On the connect page the client chooses the Google features they grant (Calendar, Gmail sending, or both) and, separately, whether your automations may book appointments and send e-mails on their own. Both automations are off unless the client ticks them.
- Your API key needs the scope
calendaroremail; without it the API answersforbidden. - If the client did not allow an automation, the API answers
forbiddenwith a hint. - Without an active plan, booking, changing and cancelling events and sending e-mail answer
402 subscription_inactive; availability and reading an event keep working. Calendar and e-mail calls do not count toward the plan's monthly allowance. - If Google did not grant the permission an action needs (clients can untick permissions on Google's screen), the API answers
scope_missing: ask the client to reconnect and allow it. - A Google authorization that stops working turns the channel to
needs_reauth. The client can always disconnect Google from the connect page.
Checking availability#
/v1/calendar/availabilityscope calendarFree slots of a given length in a connected Google Calendar
curl -X POST https://api.braidport.com/v1/calendar/availability \ -H "Authorization: Bearer $BRAIDPORT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "channel_id": "ch_01m74e503qm4cft8xvtq85g98s", "start": "2026-11-16T00:00:00+01:00", "end": "2026-11-21T00:00:00+01:00", "duration_minutes": 30, "time_zone": "Europe/Rome", "working_hours": { "mon": [ [ "09:00", "13:00" ], [ "14:00", "18:00" ] ], "tue": [ [ "09:00", "13:00" ] ] }, "buffer_minutes": 10}'| Field | Type | Description |
|---|---|---|
channel_id | ch_ id | requiredA Google channel with Calendar access. |
start | timestamp | requiredStart of the search window, ISO-8601 with an offset. |
end | timestamp | requiredEnd of the search window, at most 31 days after start. |
duration_minutes | integer | required≥ 5≤ 1440Length of each slot. |
time_zone | string | required≤ 64 charsIANA time zone used for working hours and for the response, e.g. Europe/Rome. |
calendar_ids | string[] | optional≥ 1 items≤ 10 itemsdefault ["primary"]Calendars whose events block time. |
working_hours | object | optionalBookable hours per weekday (mon … sun): a list of ["HH:MM", "HH:MM"] ranges in time_zone. A day left out is not bookable. |
buffer_minutes | integer | optional≤ 1440default 0Free time kept before and after every busy event. |
{ "time_zone": "Europe/Rome", "slots": [ { "start": "2026-11-16T09:00:00+01:00", "end": "2026-11-16T09:30:00+01:00" }, { "start": "2026-11-16T09:30:00+01:00", "end": "2026-11-16T10:00:00+01:00" } ]}| Field | Type | Description |
|---|---|---|
time_zone | string | The time zone of the request. |
slots | object[] | Free slots, in order. |
slots[].start | timestamp | Slot start. |
slots[].end | timestamp | Slot end. |
Availability is computed from the events of the chosen calendars: all-day, busy and out-of-office events block time; events marked free and cancelled events do not. The window can span up to 31 days.
Booking a slot#
/v1/calendar/eventsscope calendarBook a calendar event (an Idempotency-Key prevents double booking)
curl -X POST https://api.braidport.com/v1/calendar/events \ -H "Authorization: Bearer $BRAIDPORT_API_KEY" \ -H "Idempotency-Key: booking-8841" \ -H "Content-Type: application/json" \ -d '{ "channel_id": "ch_01m74e503qm4cft8xvtq85g98s", "summary": "Cleaning: Mario Rossi", "start": "2026-11-16T09:00:00+01:00", "end": "2026-11-16T09:30:00+01:00", "time_zone": "Europe/Rome", "attendees": [ { "email": "mario.rossi@example.com", "name": "Mario Rossi" } ], "send_updates": "all"}'| Field | Type | Description |
|---|---|---|
channel_id | ch_ id | requiredA Google channel with Calendar access. |
calendar_id | string | optional≤ 1,024 charsdefault "primary"Calendar to write to. |
summary | string | required≤ 1,024 charsEvent title. |
description | string | optional≤ 8,192 charsEvent description. |
location | string | optional≤ 1,024 charsEvent location. |
start | timestamp | requiredStart, ISO-8601 with an offset. |
end | timestamp | requiredEnd, after start. |
time_zone | string | required≤ 64 charsIANA time zone of the event. |
attendees | object[] | optional≤ 100 itemsGuests to invite. |
attendees[].email | e-mail address | required≤ 254 charsGuest e-mail address. |
attendees[].name | string | ≤ 256 charsGuest name. |
meet | boolean | optionaldefault falseAdd a Google Meet link. |
send_updates | "all" | "externalOnly" | "none" | optionalWhether Google e-mails the invitation: all, externalOnly or none. |
With an Idempotency-Key, the Google event id is derived from the key, so a retried request returns the event already booked instead of booking twice. Change or cancel an event with PATCH /v1/calendar/events/:event_id?channel_id=… and DELETE /v1/calendar/events/:event_id?channel_id=….
With meet: true, Google creates the Meet link after the event. Braidport checks again for about two seconds; if the answer still has conference_status: "pending" and meet_url: null, read the event later with the same channel_id and calendar_id:
/v1/calendar/events/:event_idscope calendarRead a calendar event again, for example a Meet link still pending at booking
Each read is one request to Google and does not wait, so ask again until conference_status is success (the link is in meet_url) or failure. An event that no longer exists answers not_found; a cancelled one comes back with status: "cancelled".
Sending e-mail#
/v1/email/sendscope emailSend an e-mail from a connected Gmail account
curl -X POST https://api.braidport.com/v1/email/send \ -H "Authorization: Bearer $BRAIDPORT_API_KEY" \ -H "Idempotency-Key: booking-8841-email" \ -H "Content-Type: application/json" \ -d '{ "channel_id": "ch_01m74e503qm4cft8xvtq85g98s", "to": [ "mario.rossi@example.com" ], "subject": "Your appointment on Monday 16 November", "text": "Hi Mario,\n\nyour cleaning is booked for Monday at 09:00.\n\nSee you soon,\nStudio Bianchi"}'| Field | Type | Description |
|---|---|---|
channel_id | ch_ id | requiredA Google channel with Gmail send access. |
to | e-mail address[] | required≥ 1 items≤ 500 itemsRecipients. |
cc | e-mail address[] | optional≤ 500 itemsCopy recipients. |
bcc | e-mail address[] | optional≤ 500 itemsBlind-copy recipients. |
subject | string | required≤ 998 charsSubject line. |
text | string | optional≤ 5,242,880 charsPlain-text body (give text, html or both). |
html | string | optional≤ 5,242,880 charsHTML body. |
reply_to | e-mail address | optional≤ 254 charsReply-To address. |
thread_id | string | optional≤ 256 charsGmail thread to add the message to. |
in_reply_to | string | optional≤ 998 charsMessage-ID header of the message you are answering. |
attachments | object[] | optional≤ 25 itemsFiles to attach. |
attachments[].filename | string | required≤ 255 charsFile name. |
attachments[].mime_type | string | required≤ 255 charsMIME type. |
attachments[].content_base64 | string | required≥ 4 charsFile content, base64-encoded. |
{ "id": "18c2f9a7b3d4e5f6", "thread_id": "18c2f9a7b3d4e5f6"}| Field | Type | Description |
|---|---|---|
id | string | Gmail message id. |
thread_id | string | Gmail thread id. Pass it as thread_id to continue the thread. |
The message is sent from the client's own Gmail address. Pass the returned thread_id (and in_reply_to) to continue a thread. Braidport can send e-mail but cannot read the mailbox.
With an Idempotency-Key, a send whose outcome is unknown keeps the key for 24 hours: a retry answers 409 conflict (delivery_unknown) instead of sending the e-mail again; send with a new key only once you know it did not arrive.