Menu

Workspaces

1 endpoint in the Mattering Contracts API.

GETPOST workspaces/ User APIService tier

List workspaces, or create one with POST. derived from route

URL

  • User APIhttps://contracts.mattering.io/api/user/v1/workspaces/
  • Service tierhttps://contracts.mattering.io/api/internal/workspaces/

Query parameters

NameDefault
space_idnone

Body keys (JSON)

KeyRequiredDefault
coloroptional or conditionalnone
descriptionoptional or conditionalnone
nameoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "workspaces": [
    {
      "id": "...",
      "name": "...",
      "slug": "...",
      "color": "...",
      "is_active": true,
      "space_id": "...",
      "workspace_public_id": "..."
    }
  ]
}

201 bare JSON object (no envelope)

{
  "workspace": {
    "id": "...",
    "name": "...",
    "slug": "...",
    "color": "...",
    "is_active": true,
    "space_id": "...",
    "workspace_public_id": "..."
  }
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400name_required
400no_org_context
401unauthorized

Example

curl -X POST "https://contracts.mattering.io/api/user/v1/workspaces/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "color": "...",
  "description": "...",
  "name": "..."
}'

Source: ContractsCore/internal_api.py (internal_api.workspaces)

All Contracts resources
Start Free Explore our Products