Skip to main content
POST
http://localhost:3000
/
scope-types
/
batch
curl -X POST 'https://api.example.com/scope-types/batch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "scope_type_org",
      "name": "Organization",
      "config": {"permissionMode": "define"}
    },
    {
      "id": "scope_type_team",
      "name": "Team",
      "config": {"permissionMode": "inherit"}
    },
    {
      "id": "scope_type_project",
      "name": "Project",
      "config": {"permissionMode": "inherit"}
    }
  ]'
[
  {
    "id": "scope_type_org",
    "name": "Organization",
    "config": {"permissionMode": "define"}
  },
  {
    "id": "scope_type_team",
    "name": "Team",
    "config": {"permissionMode": "inherit"}
  },
  {
    "id": "scope_type_project",
    "name": "Project",
    "config": {"permissionMode": "inherit"}
  }
]

Overview

Batch creation allows you to create multiple scope types in a single API call. You can provide client IDs for in-batch references when setting up scope type hierarchies.
ID Format: All IDs use a namespaced UUIDv7 format: scope_type_{uuidv7}. You can optionally provide your own IDs for in-batch references.

Request Body

Array of scope type objects:
[].id
string
Optional client-provided ID. Useful for referencing within the same batch.
[].name
string
required
Display name for the scope type
[].config
object
Configuration for the scope type including permission mode

Response

Returns an array of created scope type objects.
curl -X POST 'https://api.example.com/scope-types/batch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "scope_type_org",
      "name": "Organization",
      "config": {"permissionMode": "define"}
    },
    {
      "id": "scope_type_team",
      "name": "Team",
      "config": {"permissionMode": "inherit"}
    },
    {
      "id": "scope_type_project",
      "name": "Project",
      "config": {"permissionMode": "inherit"}
    }
  ]'
[
  {
    "id": "scope_type_org",
    "name": "Organization",
    "config": {"permissionMode": "define"}
  },
  {
    "id": "scope_type_team",
    "name": "Team",
    "config": {"permissionMode": "inherit"}
  },
  {
    "id": "scope_type_project",
    "name": "Project",
    "config": {"permissionMode": "inherit"}
  }
]