Logo
Search
Docs

Workspaces update

PATCH https://app.sulus.ai/api/workspaces/{workspace}

Rename a workspace

Authentication

Send a bearer token created on your dashboard's Developer page:

Authorization: Bearer <YOUR_API_KEY>

Path parameters

workspace string Required

Workspace id.

Validation: UUID of a workspace the caller can access
Stored in workspaces.id

Request body

name string Required

New workspace display name.

Validation: required|string|max:255
Stored in workspaces.name

Errors

StatusMeaningBody
401 Missing or invalid bearer token
403 Feature workspaces not enabled {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"workspaces"}
403 Policy denied {"message":"This action is unauthorized."}
422 Validation failed {"message":"The given data was invalid.","errors":{"email":["The email field is required."]}}

Notes

  • Policy update allows owner or admin.
curl --request PATCH \
  --url https://app.sulus.ai/api/workspaces/{workspace} \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Acme Front Desk"
}'
import requests

url = "https://app.sulus.ai/api/workspaces/{workspace}"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
  "name": "Acme Front Desk"
}

response = requests.patch(url, json=payload, headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	url := "https://app.sulus.ai/api/workspaces/{workspace}"
	payload := strings.NewReader(`{
  "name": "Acme Front Desk"
}`)
	req, _ := http.NewRequest("PATCH", url, payload)
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
	req.Header.Add("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
Response 200
{
    "message": "Workspace updated.",
    "data": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "name": "Acme Front Desk"
    }
}