POST
/
open
/
workspaces
/
create
curl --request POST \
  --url https://api.opnform.com/open/workspaces/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "emoji": "<string>"
}'
{
  "message": "<string>",
  "workspace_id": 123,
  "workspace": {
    "id": 1,
    "name": "My Marketing Team",
    "icon": "🚀",
    "settings": {}
  }
}

Create Workspace

Create a new workspace and automatically add the current user as an admin of that workspace.

Authentication & Scope

Requires the workspaces-write ability.

Request

POST /open/workspaces/create HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>

Body Parameters

FieldTypeRequiredDescription
namestringYesDisplay name of the workspace.
emojistringNoOptional emoji/icon to represent it.

Example:

{
  "name": "Design Team",
  "emoji": "🎨"
}

Response

200 OK – Returns the newly created workspace information.

{
  "message": "Workspace created.",
  "workspace_id": 7,
  "workspace": {
    "id": 7,
    "name": "Design Team",
    "icon": "🎨",
    "settings": {},
    "max_file_size": 25,
    "is_readonly": false
  }
}

403 Forbidden – Token lacks workspaces-write or user not allowed.

Authorizations

Authorization
string
header
required

Personal Access Token

Body

application/json

Response

200
application/json

Created

The response is of type object.