# Add webhooks while creating profiles with API

**URL:** <https://forum.youcanbook.me/t/add-webhooks-while-creating-profiles-with-api/1128>\
**Category:** API\
**Created:** [March 10, 2021, 8:50am UTC](https://forum.youcanbook.me/t/add-webhooks-while-creating-profiles-with-api/1128 "2021-03-10T08:50:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityabee](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@adityabee](https://forum.youcanbook.me/u/adityabee)\
**Post date:** [March 10, 2021, 8:50am UTC](https://forum.youcanbook.me/t/add-webhooks-while-creating-profiles-with-api/1128/1 "2021-03-10T08:50:08Z")

</div>

Is there a way too set up webhooks (On booking) while creating a profile from the rest API?

Need this to use YCBM in a automation flow for our companie’s use case.

Any help is appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![Ben](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.youcanbook.me/ben/32/772_2.png) [@Ben](https://forum.youcanbook.me/u/Ben)\
**Post date:** [March 10, 2021, 3:41pm UTC](https://forum.youcanbook.me/t/add-webhooks-while-creating-profiles-with-api/1128/2 "2021-03-10T15:41:31Z")

</div>

@adityabee welcome to the forum. Yes this is possible in the actions array. Use type = WEBHOOK and anchor is when it will be fired (BOOKING\_CREATED, BOOKING\_CANCELLED, BOOKING\_RESCHEDULED, BOOKING\_STARTS, BOOKING\_ENDS) You can use the offset to adjust the time it sends in minutes, can be negative for BOOKING\_STARTS as an example

```
"actions" : [ {
"type" : "WEBHOOK",
"status" : "TEMPLATE",
"anchor" : "BOOKING_CREATED",
"offsetMinutes" : 0,
"title" : "string",
"to" : "https://endpointurl",
"cc" : "",
"subject" : "POST",
"body" : "{ \"startDate\": \"{START}\", \"firstName\": \"{FNAME}\", \"duration\": \"{DURATION}\", \"teamName\": \"{TEAM-NAME}\", \"phone\": \"{PHONE}\", \"apptype\": \"{TYPE-NAME}\", \"appdesc\": \"{TYPE-DESCRIPTION}\"}",
"displayTypeShort" : "webhook",
"displayTypeLong" : "webhook"}]
```
