Semaphor

Create a group

Creates a new user group. Set type to ORG_GROUP for an organization-wide group, or TENANT_GROUP for a group scoped to a single tenant. Tenant groups require a tenantId. Group names must be unique within their scope.

POST
/api/management/v1/groups

Authorization

BearerAuth
AuthorizationBearer <token>

A project-scoped access token. Generate one via the Token API with your project ID and project secret.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X post "https://semaphor.cloud/api/management/v1/groups" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "ORG_GROUP"  }'
{
  "id": "string",
  "name": "string",
  "description": "string",
  "type": "ORG_GROUP",
  "organizationId": "string",
  "tenantId": "string",
  "createdBy": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "memberCount": 0,
  "permissions": {
    "canEdit": true,
    "canDelete": true,
    "canManageMembers": true
  },
  "members": [
    {
      "id": "string",
      "groupId": "string",
      "orgUserId": "string",
      "tenantUserId": "string",
      "addedBy": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "orgUser": {
        "id": "string",
        "name": "string",
        "email": "user@example.com"
      },
      "tenantUser": {
        "id": "string",
        "name": "string",
        "email": "user@example.com"
      }
    }
  ],
  "sharedResources": {
    "count": 0
  }
}
{
  "error": "string",
  "details": "string",
  "code": "string",
  "fieldErrors": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "details": "string",
  "code": "string",
  "fieldErrors": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "details": "string",
  "code": "string",
  "fieldErrors": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "details": "string",
  "code": "string",
  "fieldErrors": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "details": "string",
  "code": "string",
  "fieldErrors": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}