Create a space

post

/swm/rs/v1/spaces

Create a new space for a site.

Site must belong to the same merchant as the API user.

Space name can not be blank and must be unique for the API user.

The API user will "own" the created space, and also be the first member of the space.

Valid values for accessLevel are:
  • 0 - Private (can not have members besides space creator; not shared)
  • 1 - Shared (can have members besides space creator; read-only access available for anyone, authenticated or not, if given the space URL)
  • 2 - Group (can have members besides space creator; not shared)

    Request

    Supported Media Types
    Body ()
    {
    "siteId":"string", - ID of merchant site to host the space
    "spaceName":"string", - Name of the space
    "spaceDescription":"string", - Description for the space (optional)
    "accessLevel":"number" - 0 (Private), 1 (Shared), or 2 (Group)
    }
    Root Schema : schema
    Type: string
    Back to Top

    Response

    Supported Media Types

    200 Response

    successful operation
    Body ()
    Root Schema : JSONObject
    Type: object

    201 Response

    space resource created

    404 Response

    space resource not found
    Back to Top

    Examples

    Sample Request:

           {
            "siteId":"RoGcM7ZB1dwMgzI6",
            "spaceName":"New Example Space",
            "spaceDescription":"Items for kids play room",
            "accessLevel":"0"
           }    

    Sample Response:

           {"response":{"code":"201.0","developerMessage":"space resource created"},
            "spaceName":"New Example Space",
            "spaceId":"rpCcZTzUdDbVAmRjCy2BFCOO",
            "spaceDescription":"Items for kids play room"}    

    Possible Error Codes:

           {
              "code":"404.0","developerMessage":"space resource not found",
              "code":"409.0","developerMessage":"space resource already exists"
           }    
    Back to Top