Skip to content

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 calendar or email; without it the API answers forbidden.
  • If the client did not allow an automation, the API answers forbidden with 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.

Google data

Google Workspace data is never used to train AI models and is not processed by AI inside Braidport. See the privacy policy.

Checking availability#

POST/v1/calendar/availabilityscope calendar

Free slots of a given length in a connected Google Calendar

cURLbash
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}'
FieldTypeDescription
channel_idch_ idrequiredA Google channel with Calendar access.
starttimestamprequiredStart of the search window, ISO-8601 with an offset.
endtimestamprequiredEnd of the search window, at most 31 days after start.
duration_minutesintegerrequired≥ 5≤ 1440Length of each slot.
time_zonestringrequired≤ 64 charsIANA time zone used for working hours and for the response, e.g. Europe/Rome.
calendar_idsstring[]optional≥ 1 items≤ 10 itemsdefault ["primary"]Calendars whose events block time.
working_hoursobjectoptionalBookable hours per weekday (mon … sun): a list of ["HH:MM", "HH:MM"] ranges in time_zone. A day left out is not bookable.
buffer_minutesintegeroptional≤ 1440default 0Free time kept before and after every busy event.
200 OKjson
{  "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"    }  ]}
FieldTypeDescription
time_zonestringThe time zone of the request.
slotsobject[]Free slots, in order.
slots[].starttimestampSlot start.
slots[].endtimestampSlot 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#

POST/v1/calendar/eventsscope calendar

Book a calendar event (an Idempotency-Key prevents double booking)

cURLbash
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"}'
FieldTypeDescription
channel_idch_ idrequiredA Google channel with Calendar access.
calendar_idstringoptional≤ 1,024 charsdefault "primary"Calendar to write to.
summarystringrequired≤ 1,024 charsEvent title.
descriptionstringoptional≤ 8,192 charsEvent description.
locationstringoptional≤ 1,024 charsEvent location.
starttimestamprequiredStart, ISO-8601 with an offset.
endtimestamprequiredEnd, after start.
time_zonestringrequired≤ 64 charsIANA time zone of the event.
attendeesobject[]optional≤ 100 itemsGuests to invite.
attendees[].emaile-mail addressrequired≤ 254 charsGuest e-mail address.
attendees[].namestring≤ 256 charsGuest name.
meetbooleanoptionaldefault 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:

GET/v1/calendar/events/:event_idscope calendar

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

POST/v1/email/sendscope email

Send an e-mail from a connected Gmail account

cURLbash
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"}'
FieldTypeDescription
channel_idch_ idrequiredA Google channel with Gmail send access.
toe-mail address[]required≥ 1 items≤ 500 itemsRecipients.
cce-mail address[]optional≤ 500 itemsCopy recipients.
bcce-mail address[]optional≤ 500 itemsBlind-copy recipients.
subjectstringrequired≤ 998 charsSubject line.
textstringoptional≤ 5,242,880 charsPlain-text body (give text, html or both).
htmlstringoptional≤ 5,242,880 charsHTML body.
reply_toe-mail addressoptional≤ 254 charsReply-To address.
thread_idstringoptional≤ 256 charsGmail thread to add the message to.
in_reply_tostringoptional≤ 998 charsMessage-ID header of the message you are answering.
attachmentsobject[]optional≤ 25 itemsFiles to attach.
attachments[].filenamestringrequired≤ 255 charsFile name.
attachments[].mime_typestringrequired≤ 255 charsMIME type.
attachments[].content_base64stringrequired≥ 4 charsFile content, base64-encoded.
200 OKjson
{  "id": "18c2f9a7b3d4e5f6",  "thread_id": "18c2f9a7b3d4e5f6"}
FieldTypeDescription
idstringGmail message id.
thread_idstringGmail 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.