Webhooks allow you to register a callback URL and get notified of certain events happening on Cobot such, as a new member signing up.

In order to receive event notifications you have to subscribe to an event first. When the event occurs we POST to the callback URL you specified.

When receiveing our POST your server must respond with a 2xx status code. If it doesn't, we will retry the POST up to 10 times with increasing intervals up to 20 hours. After that we will deactivate your subscription and you have to renew it. We don't follow 30x redirects. If the callback endpoint returns 410, the webhook will be deactivated immediately.

POST https://:subdomain.cobot.me/api/subscriptions

Subscribe to an event.

Authentication required:
yes, additionally user must be a space admin
Scope required
write_subscriptions
POST https://co-up.cobot.me/api/subscriptions

Body:

{
  "event: "confirmed_membership",
  "callback_url": "http://my.server.com/callback"
}

Response:

{
  "id": "12345",
  "event": "confirmed_membership",
  "url": "http://co-up.cobot.me/api/subscriptions/12345",
  "active": true,
  "callback_url": "http://my.server.com/callback"
}

Response status is 201 on success and 422 if you pass invalid parameters. If you try to create multiple subscriptions with the same event/url combination, you will get a 409.

event
The event you want to subscribe to. See Event Callbacks below for a list of available events.
callback_url
The URL to POST to.
url
The URL of the subscription, needed to delete the subscription or check its active status.
GET https://:subdomain.cobot.me/api/subscriptions

List the subscriptions for the current user and app.

Authentication required:
yes, additionally user must be a space admin
Scope required
read_subscriptions
GET https://co-up.cobot.me/api/subscriptions

Response:

[
  {
    "id": "12345",
    "event": "confirmed_membership",
    "url": "https://co-up.cobot.me/api/subscriptions/12345",
    "active": true,
    "callback_url": "http://my.server.com/callback"
  }
]
GET https://:subdomain.cobot.me/api/subscriptions/:subscription_id

Show a subscription.

Authentication required:
yes, additionally user must be a space admin
Scope required
read_subscriptions
GET https://co-up.cobot.me/api/subscriptions/123456

Response:

{
  "id": "12345",
  "event": "confirmed_membership",
  "url": "http://co-up.cobot.me/api/subscriptions/12345",
  "active": true,
  "callback_url": "http://my.server.com/callback"
}
DELETE https://:subdomain.cobot.me/api/subscriptions/:subscription_id

Delete a subscription.

Authentication required:
yes, additionally user must be a space admin
Scope required
write_subscriptions
DELETE https://co-up.cobot.me/api/subscriptions/12345

Returns an empty response with the status 204.

Whenever an event occours we POST to the callback URL you specified in the subscription. The payload is sent as JSON.

Is triggered when a user connects to a membership, either by accepting an invite or when being created by an admin.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a user that is connected to a membership is updated (updated their email address or password).

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when an admin is added to a space.

Body:

{"url": "https://co-up.cobot.me/api/admins/12345"}

Sends the URL of the admin.

Is triggered when an admin is removed from a space.

Body:

{"url": "https://co-up.cobot.me/api/admins/12345"}

Sends the URL of the admin.

Is triggered when a booking is made.

Body:

{"url": "https://co-up.cobot.me/api/bookings/12345"}

Sends the URL of the booking.

In order to only subscribe to events for a specific resource, when creating the subscription add {"filters": {"resource_id": "<the resource id>"}} to the call.

Is triggered when a booking is updated.

Body:

{"url": "https://co-up.cobot.me/api/bookings/12345"}

Sends the URL of the booking.

In order to only subscribe to events for a specific resource, when creating the subscription add {"filters": {"resource_id": "<the resource id>"}} to the call.

Is triggered before a booking begins. By default, the webhook will arrive within seconds of the booking starting. The time can be increased to up to 60 minutes by sending filters: {"lead_time": 60} when creating the subscription.

Body:

{"url": "https://co-up.cobot.me/api/bookings/12345"}

Sends the URL of the booking.

Is triggered shortly (max 10 minutes) after a booking has ended.

Body:

{"url": "https://co-up.cobot.me/api/bookings/12345"}

Sends the URL of the booking.

Is triggered when a booking is canceled. Because a deleted booking can't be loaded anymore, this webhooks sends the booking's data along with the URL.

Body:

{
  "url": "https://co-up.cobot.me/api/bookings/12345",
  "booking": {
    "from": "2017/01/01 12:00:00 +0000",
    "to": "2017/01/01 14:00:00 +0000",
    "tax_rate": "20.0",
    "title": "test booking",
    "resource": {"name": "Meeting Room", "id": "123"},
    "price": 10.0,
    "currency": "EUR",
    "membership": {
      "id": "123498y452346",
      "name": "John Doe"},
    "url": "https://co-up.cobot.me/api/bookings/12345",
    "id": "20723075",
    "can_change": true,
    "comments": "coffee please"
  }
}

Sends the URL of the booking.

In order to only subscribe to events for a specific resource, when creating the subscription, add {"filters": {"resource_id": "<the resource id>"}} to the call.

Is triggered when a custom field is updated.

Body:

{"url": "https://co-up.cobot.me/api/memberships/afd4299f3109"}

Sends the URL of the membership the custom field belongs to.

In order to only subscribe to specific fields, when creating the subscription, add {"filters": {"fields": ["field1", "field2"]}} to the call.

Is triggered when someone buys a drop-in pass.

Body:

{
  "url": "https://api.cobot.me/drop_in_passes/1a7e4994-1562-5d5f-8c35-0f9ef6b4b8a2"
}

Sends the URL of the drop-in pass.

Is triggered when a wifi guest account is added to a space.

Body:

{"url": "https://co-up.cobot.me/api/guest_accounts/12345"}

Sends the URL of the guest account.

Is triggered when a wifi guest account is removed from a space.

Body:

{"url": "https://co-up.cobot.me/api/guest_accounts/12345"}

Sends the URL of the guest account.

Is triggered when an invoice for a member is created automatically.

Body:

{"url": "https://co-up.cobot.me/api/invoices/12345"}

Sends the URL of the invoice.

Is triggered when an invoice for a member is updated manually by an admin or marked as paid/unpaid (automatically though a payment or manually by an admin).

Body:

{"url": "https://co-up.cobot.me/api/invoices/12345"}

Sends the URL of the invoice.

Is triggered when an invoice is written off.

Body:

{"url": "https://co-up.cobot.me/api/invoices/12345"}

Sends the URL of the invoice.

Is triggered when an invoice for a member was sent manually by an admin or automatically via cobot

Body:

{"url": "https://co-up.cobot.me/api/invoices/12345"}

Sends the URL of the invoice.

Is triggered when an invoice gets deleted. Because a deleted invoice can't be loaded anymore, this webhook sends the invoice's data along the URL.

Body:

{
  "created_at": "2012-01-01",
  "paid_at": null,
   "charge_at": "2012/01/02 12:00:00 +0000",
   "due_date": "2012/01/01",
   "currency": "EUR",
   "id": "cc7e75473a6911587b63d78f4e3f8eba",
   "membership_id": "a9f6bcbed420c37539fa1257e66fd66b",
   "address": {
     "name": "joe doe",
     "full_address": "broadway\n12345 Berlin",
     "company": "joe inc.",
     "country": "ocean"
   },
   "space_address": {
     "name": "john space",
     "address": "2 coworking way\n37521 new atlantis",
     "company": "space inc.",
     "country": "oceanis"
   },
   "invoice_text": "pay now",
   "tax_name": "VAT",
   "tax_rate": "20.0",
   "tax_id_name": "VAT ID",
   "tax_id": "100-535-87D",
   "invoice_number": 100,
   "formatted_invoice_number": "2016-X-100",
   "customer_number": 101,
   "items": [
     {
       "id": "53d3fc2107436",
       "paid": false,
       "amount": "80.0",
       "description": "monthly rent",
       "quantity": "2.0",
       "tax_rate": "20.0",
       "accounting_code": "FlexPlan"
     },
     {
       "id": "53d3fc2107437",
       "paid": false,
       "amount": "20.0",
       "description": "2 time passes",
       "quantity": "2.0",
       "tax_rate": "20.0",
       "accounting_code": "Pass"
     }
   ],
   "total_amount": "240.0",
   "total_amount_without_taxes": "200.0",
   "payable_amount": "240.0",
   "total_paid_amount": "0.0",
   "tax_amounts": {"20.0": "40.0"},
   "url": "http://some-space.cobot.me/api/invoices/100",
   "paid": false,
   "sent": false,
   "sent_status": "unsent",
   "paid_status": "unpaid"
}

Is triggered when a membership is confirmed. When an admin creates a new membership it is confirmed immediately. For memberships that are confirmed to a future date, this notification is sent when the date is reached. Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a membership is created.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a membership is deleted by an admin.

Body:

{
  "url": "https://co-up.cobot.me/api/memberships/93207605",
  "membership": {
    "id": "93207605",
    "...": "..."
  }
}

Sends the URL of the membership and the membership data (see [memberships api](memberships)).

Is triggered when a membership is canceled (by an admin or the member themselves) or the cancellation date is changed to another date. This event triggers right after someone sets the cancellation date. See the membership_cancellation_date_reached event for being notified on the date of cancellation.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a future cancelation date is removed from a membership. See reactivated_membership for the event after the cancelation date has been reached.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a membership that was previously canceled has now been reactivated.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered on the day a membership reaches its previously set cancellation date, i.e. on the day the canceled membership actually ends.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a member changes their payment method.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a member changes their plan/an admin changes a member's plan. This event triggers when the plan change is entered, not when the plan actually changes. See the membership_plan_change_date_reached event for being notified on the date of the new plan becoming active.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered on the day a member's new plan becomes active.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a member updates their (contact) details.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a member updates their picture.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when a member checks in.

Body:

{"url": "https://co-up.cobot.me/api/check_ins/93207605"}

Sends the URL of the check-in.

Is triggered when a member checks

Note: this only fires when a member actively checks out, either using a button on the site or the API endpoint. It does not fire when a member is implicitly checked out when the valid_until time of a check-in has passed.

Body:

{"url": "https://co-up.cobot.me/api/check_ins/93207605"}

Sends the URL of the check-in.

Is triggered when a member adds a check-in token.

Body:

{"url": "https://co-up.cobot.me/api/check_in_tokens/93207605"}

Sends the URL of the check-in token.

Is triggered when a member deletes a check-in token.

Body:

{"url": "https://co-up.cobot.me/api/check_in_tokens/93207605"}

Sends the URL of the check-in token.

Is triggered when a space changes their subscription (what they pay Cobot, which extras they have subscribed to).

Body:

{"url": "https://api.cobot.me/spaces/8bd91251-70a0-574a-8fc3-cbff2999472e/subscription"}

Sends the URL of the subscription (API2).

Is triggered when time passes are added to a membership. Time passes are added by eiher: the member buying them, an admin assigning them to a member, Cobot automatically adding them because they are included in the member's plan.

Body:

{"url": "https://co-up.cobot.me/api/memberships/93207605"}

Sends the URL of the membership.

Is triggered when an admin removed time passes from a membership.

You can use the REST API to obtain more details about the objects returned by the webhooks.

Is triggered when an admin publishes an event.

You can use the REST API to obtain more details about the objects returned by the webhooks.

Is triggered when an event attendance is created.

You can use the REST API to obtain more details about the objects returned by the webhooks.

back to index