POST
/
workspaces
curl --request POST \
  --url https://app.getcensus.com/api/v1/workspaces \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Workspace",
  "notification_emails": [
    "notifications@mycompany.slack.com"
  ],
  "return_workspace_api_key": true
}'
{
  "status": "success",
  "data": {
    "id": 123,
    "name": "My Workspace",
    "organization_id": 1,
    "created_at": "2023-09-05T19:42:42.672Z",
    "notification_emails": [
      "notifications@mycompany.slack.com"
    ],
    "api_key": "YourAPIKeyHere"
  }
}

Authorizations

Authorization
string
header
required

Bearer authorization using your Personal Access Token. Generate a new PAT on your user settings page.

Body

application/json
name
string
required

The name of the workspace. Must be unique within the organization.

Example:

"My Workspace"

notification_emails
string[]

The list of emails that will receive alerts from the workspace.

Example:
["notifications@mycompany.slack.com"]
return_workspace_api_key
boolean
default:false

Whether or not a successful result should include the api_key field in the response. This workspace api_key is used to interact with the Workspace APIs.

Example:

true

Response

201 - application/json
Successfully created a new workspace.
status
enum<string>
required

The outcome of the creation request

Available options:
success
Example:

"success"

data
object
required