# How to add a user to a Wix Bookings session using code?

**URL:** <https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452>\
**Category:** Ask the community\
**Tags:** api, question, wix-blocks, code, wix\
**Created:** [June 12, 2025, 10:32am UTC](https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452 "2025-06-12T10:32:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5092](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/user5092/32/108486_2.png) [@user5092](https://forum.wixstudio.com/u/user5092)\
**Post date:** [June 12, 2025, 10:32am UTC](https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452/1 "2025-06-12T10:32:49Z")

</div>

**Product:**  
I am using Wix Editor

**What are you trying to achieve:**  
I am trying to add user in existing calendar session for a service using backend velo code and What’s going on is that  
Wix does not expose a built-in Velo backend API method like querySessions or createBooking.

The Bookings API v2 ([https://www.wixapis.com/bookings/v2](https://www.wixapis.com/bookings/v2)) is a REST API meant to be called via HTTP requests with an API key or OAuth token.

But calling it directly from Velo using fetch() fails because Wix blocks these requests or requires authentication that you cannot do easily with API keys from inside Velo backend code.

The official Velo wix-bookings-backend module has only very limited functions, none for advanced session querying or booking creation.

**What have you already tried:**  
I have tried Wix buildin methods for Bookings.  
Wix does not expose a built-in Velo backend API method like querySessions or createBooking.  
I have also tried calling REST api for booking using APi key  
The Bookings API v2 ([https://www.wixapis.com/bookings/v2](https://www.wixapis.com/bookings/v2)) is a REST API meant to be called via HTTP requests with an API key or OAuth token.

But calling it directly from Velo using fetch() fails and API is sending HTML response 404 instead of JSON  
The official Velo wix-bookings-backend module has only very limited functions, none for advanced session querying or booking creation.

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [June 12, 2025, 12:37pm UTC](https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452/2 "2025-06-12T12:37:18Z")

</div>

Generally speaking, we now encourage the use of SDK within sites. Bookings found [here](https://dev.wix.com/docs/sdk/backend-modules/bookings/introduction).

Since it’s run within the context of a Wix site, the OAuth etc is handled for you, simply need to call the methods etc.

The SDK is fairly extensive with it’s methods 🙂

---

<div class="post-metadata">

**Author:** ![user5092](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/user5092/32/108486_2.png) [@user5092](https://forum.wixstudio.com/u/user5092)\
**Post date:** [June 20, 2025, 5:03pm UTC](https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452/3 "2025-06-20T17:03:40Z")

</div>

Thanks noahlovell, I am trying to use package but Wix’s SDK does not expose an `addParticipants()` method in the `wix-bookings-backend` module. I have tried using these packages but seems like most of the required methods are not exposed.  
In simple I need a code to add users in already scheduled calendar sessions when user purchase a pricing plan.

---

<div class="post-metadata">

**Author:** ![user5092](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/user5092/32/108486_2.png) [@user5092](https://forum.wixstudio.com/u/user5092)\
**Post date:** [June 27, 2025, 3:59pm UTC](https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452/4 "2025-06-27T15:59:23Z")

</div>

@noahlovell I was just wondering if any pointer for my problem described above? Thanks

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [June 27, 2025, 4:15pm UTC](https://forum.wixstudio.com/t/how-to-add-a-user-to-a-wix-bookings-session-using-code/71452/5 "2025-06-27T16:15:34Z")

</div>

I’m not too well versed with the Bookings SDK (haven’t had to do too much work with it).

@emmy - do you have any advice here?
