OpenCourt Developers
API ReferenceSpaces

List spaces

GET/v1/spaces

Returns the club's bookable spaces — courts and rooms — in the club's display order. Each space includes its category and visibility. Scoped to the club tied to your API key.

Authorization

bearerAuth
AuthorizationBearer <token>

Your club API key. Send it as Authorization: Bearer oc_live_….

In: header

Response Body

application/json

application/json

application/json

curl -X GET "https://api.getopencourt.com/v1/spaces"
{
  "object": "list",
  "data": [
    {
      "id": "b2d4f6a8-1c3e-4a5b-9d7c-0e2f4a6b8c1d",
      "object": "space",
      "name": "Court 1",
      "short_name": "C1",
      "category": {
        "id": "a1c3e5f7-2b4d-4c6e-8a0b-1d3f5a7c9e1b",
        "name": "Indoor Courts"
      },
      "visibility": "public"
    }
  ],
  "has_more": true,
  "url": "string"
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}