POST https://www.cobot.me/api/spaces

This creates a coworking space.

Authentication required:
yes
Scope required:
write

URL:

POST https://www.cobot.me/api/spaces

Body:

{
  "name": "co.up",
  "owner_name": "Jane",
  "description": "cool space",
  "subdomain": "co-up",
  "time_zone_name": "Europe/Berlin",
  "country": "Germany"
}

Only name, owner_name and subdomain are required.

Response:

{
  "name": "co.up",
  "id": "space-co-up",
  "url": "http://co-up.cobot.me",
  "email": "user@example.com",
  "created_at": "2013/01/05",
  "description": "cool space",
  "owner_id": "102835a3",
  "country": "Germany",
  "locale": "de-DE",
  "in_eu": true,
  "subdomain": "co-up",
  "tax_rate" : 19.0,
  "price_display": "gross",
  "time_zone_name": "Europe/Berlin",
  "time_zone_offset": 1,
  "hour_format": 24
}

The <owner_id> is the id of the user that was using the API/created the space. Response status is 201 on success, 422 if the space is invalid. Additionally the errors are returned like this:

{"errors": {"name": "can't be blank"}}
PUT https://www.cobot.me/api/spaces/:subdomain

This updates a coworking space.

Authentication required:
yes, additionally user must be a space admin
Scope required:
write

URL:

PUT https://www.cobot.me/api/spaces/co-up

Body:

{
  "name": "co.up",
  "description": "cool space",
  "time_zone_name": "Europe/Berlin"
}

Response:

{
  "name": "co.up",
  "id": "space-co-up",
  "url": "http://co-up.cobot.me",
  "email": "user@example.com",
  "created_at": "2013/01/05",
  "description": "cool space",
  "owner_id": "102835a3",
  "subdomain": "co-up",
  "tax-rate" : 19.0,
  "price_display": "gross"
  "country": "Germany",
  "locale": "de-DE",
  "in_eu": true,
  "time_zone_name": "Europe/Berlin",
  "time_zone_offset": 1,
  "hour_format": 24
}

Response status is 200 on success, 422 if the space is invalid. Additionally the errors are returned like this:

{"errors": {"name": "can't be blank}}
GET https://www.cobot.me/api/spaces/:subdomain

This returns the details for a coworking space.

Authentication required:
no
GET https://www.cobot.me/api/spaces/co-up

Response:

{
  "name": "co.up",
  "id": "space-co-up",
  "url": "http://co-up.cobot.me",
  "email": "user@example.com",
  "created_at": "2013/01/05",
  "description": "cool space",
  "owner_id": "102835a3",
  "subdomain": "co-up",
  "tax-rate" : 19.0,
  "price_display": "gross"
  "country": "Germany",
  "locale": "de-DE",
  "in_eu": true,
  "time_zone_name": "Europe/Berlin",
  "time_zone_offset": 1,
  "hour_format": 24
}

The time_zone_offset is the current UTC offset in hours.

The email is the email address of the user who created the space.

hour_format is either 12 or 24 and denotes if the space's country prefers time to be displayed in 12h plus am/pam or 24h.

subdomain refers to the subdomain under the cobot.me domain where a space can be reached. Even though a space can change their subdomain or set up a custom domain for their website on Cobot (admin and member section), for the API the subdomain never changes and the custom domain is not used.

GET https://www.cobot.me/api/spaces/:subdomain/logo

Redirects to the space's logo so can be used within an <img/> tag. If no logo is set, redirects to fallback Cobot logo.

You can get different sizes by appending ?logo_size=<size>, where size can be one of default (100x100) or pdf (400x400).

Authentication required:
no

back to index