Spaces

Create and manage spaces that organize pipelines and control access to them.

/spaces
  • GETList spaces the caller can access.

    Sample request

    GET /spaces HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
      "data": [
        {
          "self": {
            "id": "space_123",
            "name": "engineering"
          }
        }
      ]
    }

    Common errors

    • 401 The credentials are missing, expired, or invalid.
  • POSTCreate a space.

    Sample request

    POST /spaces HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>
    Content-Type: application/json
    
    {
      "name": "engineering"
    }

    Example response

    HTTP/1.1 201 Created
    Content-Type: application/json
    
    {
      "data": {
        "id": "space_123"
      }
    }

    Common errors

    • 400 Use application/json and send valid JSON that matches the expected schema.
    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
/spaces/{spaceId}
  • GETGet details for a space.

    Sample request

    GET /spaces/space_123 HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
      "self": {
        "id": "space_123",
        "name": "engineering"
      },
      "data": {
        "owner": {
          "kind": "user",
          "id": "user_123"
        }
      }
    }

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space was not found.
  • PATCHUpdate selected settings for a space.

    Sample request

    PATCH /spaces/space_123 HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>
    Content-Type: application/json
    
    {
      "name": "platform"
    }

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 400 Use application/json and send valid JSON that matches the expected schema.
    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space was not found.
  • DELETEDelete a space.

    Sample request

    DELETE /spaces/space_123 HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space was not found.
    • 409 The space must be empty before it can be deleted.