Roles and Permissions

Create Role

POST /api/organizations/{organizationPk}/groups/

Parameters

Parameter Name
Required
Type
Description

organizationPk

string

A UUID string identifying this Organization ID

Request Body

Request Parameters

Field
Type
Required
Description

name

string

Yes

organization

string (uuid)

No

permissions

array[string]

Yes

Request Structure Example

{
  "name": string
  "organization"?: string (uuid) // optional
  "permissions": [
    string (uuid)
  ]
}

Request Example Value

{
  "name": "Example Name",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "permissions": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}

Code Examples

# Call API Example (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Name",
    "organization": "550e8400-e29b-41d4-a716-446655440000",
    "permissions": [
      "550e8400-e29b-41d4-a716-446655440000"
    ]
  }'

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 201

Response Schema Example

{
  "id": string (uuid)
  "name": string
  "type": 
  {
  }
  "permissions": [
    {
      "id": string (uuid)
      "name": string
      "description"?: string // optional
    }
  ]
  "createdAt": string (timestamp)
}

Response Example Value

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Response String",
  "type": {},
  "permissions": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Response String",
      "description": "Response String"
    }
  ],
  "createdAt": "Response String"
}

Bulk Add Role Members

POST /api/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

organizationPk

string

A UUID string identifying this organization ID

Request Body

Request Parameters

Field
Type
Required
Description

members

array[string]

Yes

Request Structure Example

{
  "members": [
    string (uuid)
  ]
}

Request Example Value

{
  "members": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}

Code Examples

# API Call Example (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-members/bulk-create/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "members": [
      "550e8400-e29b-41d4-a716-446655440000"
    ]
  }'

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 201

Response Schema Example

[
  {
    "id"?: string (uuid) // Role member ID (optional)
    "member"?: { // optional
    {
      "id"?: string (uuid) // Member ID (optional)
      "name"?: string // Member name (optional)
      "email"?: string (email) // Member email (optional)
      "organization"?: { // optional
      {
        "id"?: string (uuid) // Organization ID (optional)
        "name"?: string // Organization name (optional)
        "createdAt"?: string // Organization creation timestamp (optional)
        "usageStatistics"?: { // optional
        {
          "chatbotsCount"?: integer // Number of chatbots (optional)
          "canCreateChatbot"?: boolean // Whether a chatbot can be created (optional)
          "hasCreateChatbotLimit"?: boolean // Whether there is a limit on creating chatbots (optional)
          "currentMonthWordsCountTotal"?: integer // Total word count limit for the current month (optional)
          "currentMonthUsedWordsCountTotal"?: integer // Words used in the current month (optional)
          "currentMonthUsedConversationsCountTotal"?: integer // Conversations used in the current month (optional)
          "availableUploadFilesSizeTotal"?: integer // Total available upload file size (optional)
          "usedUploadFileSizeTotal"?: integer // Total used upload file size (optional)
        }
        }
        "organizationPlan"?: { // optional
        {
          "id"?: string (uuid) // Plan ID (optional)
          "planName"?: string // Plan name (optional)
          "expiredAt"?: string // Plan expiration time (optional)
        }
        }
      }
      }
      "isOwner"?: boolean // Whether is the organization owner (optional)
      "permissions"?: { // optional
      {
        "hasOrganizationAccessPermission"?: boolean // Whether has organization access permission (optional)
        "hasChatAccessPermission"?: boolean // Whether has chat access permission (optional)
        "hasConversationAccessPermission"?: boolean // Whether has conversation access permission (optional)
        "hasChatbotAccessPermission"?: boolean // Whether has chatbot access permission (optional)
        "hasWebChatAccessPermission"?: boolean // Whether has web chat access permission (optional)
      }
      }
      "createdAt"?: string // Member creation timestamp (optional)
    }
    }
    "createdAt"?: string // Role member creation timestamp (optional)
  }
]

Response Example Value

[
  {
    "id": "c1e54f04-01fc-45e9-b40c-9d8b37bd0ac0",
    "member": {
      "id": "af4e472d-3f9b-446b-bab8-05de4112d086",
      "name": "h",
      "email": "[email protected]",
      "organization": {
        "id": "670e3d30-9d24-47b4-b2cc-6bf224b2f3bb",
        "name": "Updated Org Name",
        "createdAt": "1745288290000",
        "usageStatistics": {
          "chatbotsCount": 1,
          "canCreateChatbot": false,
          "hasCreateChatbotLimit": true,
          "currentMonthWordsCountTotal": 1000000,
          "currentMonthUsedWordsCountTotal": 0,
          "currentMonthUsedConversationsCountTotal": 0,
          "availableUploadFilesSizeTotal": 104857600,
          "usedUploadFileSizeTotal": 0
        },
        "organizationPlan": {
          "id": "16136181-ae0d-4b3f-aaeb-9a6ed251459f",
          "planName": "Free Plan",
          "expiredAt": null
        }
      },
      "isOwner": false,
      "permissions": {
        "hasOrganizationAccessPermission": true,
        "hasChatAccessPermission": false,
        "hasConversationAccessPermission": false,
        "hasChatbotAccessPermission": false,
        "hasWebChatAccessPermission": false
      },
      "createdAt": "1748335331000"
    },
    "createdAt": "1748341252000"
  }
]

Bulk Assign AI Assistants to Roles

POST /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

organizationPk

string

A UUID string identifying this Organization ID

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

Request Body

Request Parameters

Field
Type
Required
Description

chatbots

array[string]

Yes

Request Structure Example

{
  "chatbots": [
    string (uuid)
  ]
}

Request Example Value

{
  "chatbots": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}

Code Examples

# Call API Example (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-chatbots/bulk-create/?page=1&pageSize=1&query=example" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chatbots": [
      "550e8400-e29b-41d4-a716-446655440000"
    ]
  }'

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 201

Response Schema Example

{
  "count": integer
  "next"?: string (uri) // Optional
  "previous"?: string (uri) // Optional
  "results": [
    {
      "id": string (uuid)
      "group": string (uuid)
      "chatbot": { // Adds nested create feature
      {
        "id": string (uuid)
        "name": string // The name of the chatbot. In Agent mode, it has semantic meaning; in other modes, it's just used to differentiate between different chatbots.
        "rag"?: string (uuid) // RAG (Retrieval-Augmented Generation) settings, used to enhance response quality (Optional)
        "largeLanguageModel": string (uuid) // The large language model used by the chatbot to generate responses.
        "embeddingModel"?: string (uuid) // The embedding model used for vectorizing text, an optional field (Optional)
        "rerankerModel"?: string (uuid) // Optional
        "instructions"?: string // The role instructions for the chatbot, used to describe its role and behavior (Optional)
        "knowledgeBases"?: [ // A list of knowledge bases accessible to the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
          }
        ]
        "updatedAt": string (timestamp)
        "organization"?: string (uuid) // The organization the chatbot belongs to. If null, it's a personal chatbot (Optional)
        "builtInWorkflow"?: string (uuid) // Built-in workflow, used for predefined processing flows (Optional)
        "replyMode"?:  // Reply mode: normal reply or streaming reply

* `normal` - Normal
* `template` - Template
* `hybrid` - Hybrid
* `workflow` - Workflow
* `agent` - Agent (Optional)
        {
        }
        "template"?: string // The template used in Template mode and Hybrid mode (Optional)
        "unanswerableTemplate"?: string // The template used when an answer cannot be provided in Template mode and Hybrid mode (Optional)
        "totalWordsCount"?: integer (int64) // Cumulative total word count used (Optional)
        "outputMode"?:  // Output mode: text, table, or custom format

* `text` - Text
* `json_schema` - JSON Schema (Optional)
        {
        }
        "rawOutputFormat"?: object // JSON structure definition for custom output format (Optional)
        "databaseUrl"?: string // Database connection URL (for database query functionality) (Optional)
        "databaseType"?: string // Database type options, including MySQL, PostgreSQL, MSSQL, Oracle (Optional)
        "includeTables"?: object // List of included tables (for database query functionality) (Optional)
        "groups"?: [ // List of groups accessible to the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
          }
        ]
        "toolkits"?: [ // List of toolkits used by the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
            "description": string
            "displayName": string
            "toolType": string
          }
        ]
        "tools"?: [ // List of tools usable by the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
            "description": string
            "displayName": string
            "toolType": string
          }
        ]
        "agentMode"?:  // Agent mode: normal, SQL, or workflow mode

* `normal` - Normal
* `canvas` - Canvas (Optional)
        {
        }
        "numberOfRetrievedChunks"?: integer // The number of retrieved reference chunks, default is 12, minimum is 1 (Optional)
        "enableEvaluation"?: boolean // Optional
        "enableInLineCitations"?: boolean // Enable inline citations, which will insert citation markers in [1][2] format in the response (Optional)
      }
      }
      "createdAt": string (timestamp)
    }
  ]
}

Response Example Value

{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "group": "550e8400-e29b-41d4-a716-446655440000",
      "chatbot": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "string",
        "rag": "550e8400-e29b-41d4-a716-446655440000",
        "largeLanguageModel": "550e8400-e29b-41d4-a716-446655440000",
        "embeddingModel": "550e8400-e29b-41d4-a716-446655440000",
        "rerankerModel": "550e8400-e29b-41d4-a716-446655440000",
        "instructions": "string",
        "knowledgeBases": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "string"
          }
        ],
        "updatedAt": "string",
        "organization": "550e8400-e29b-41d4-a716-446655440000",
        "builtInWorkflow": "550e8400-e29b-41d4-a716-446655440000",
        "replyMode": {},
        "template": "string",
        "unanswerableTemplate": "string",
        "totalWordsCount": 456,
        "outputMode": {},
        "rawOutputFormat": null,
        "databaseUrl": "string",
        "databaseType": "string",
        "includeTables": null,
        "groups": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "string"
          }
        ],
        "toolkits": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "string",
            "description": "string",
            "displayName": "string",
            "toolType": "string"
          }
        ],
        "tools": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "string",
            "description": "string",
            "displayName": "string",
            "toolType": "string"
          }
        ],
        "agentMode": {},
        "numberOfRetrievedChunks": 456,
        "enableEvaluation": false,
        "enableInLineCitations": false
      },
      "createdAt": "string"
    }
  ]
}

List Permissions

GET /api/permissions/

Code Examples

# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/permissions/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

[
  {
    "id": string (uuid)
    "name": string
    "description"?: string // Optional
  }
]

Response Example Value

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Response String",
    "description": "Response String"
  }
]

Get Group List

GET /api/organizations/{organizationPk}/groups/

Parameters

Parameter Name
Required
Type
Description

organizationPk

string

A UUID string identifying this Organization ID

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

Code Examples

# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/?page=1&pageSize=1&query=example" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "count": integer
  "next"?: string (uri) // optional
  "previous"?: string (uri) // optional
  "results": [
    {
      "id": string (uuid)
      "name": string
      "type": 
      {
      }
      "permissions": [
        {
          "id": string (uuid)
          "name": string
          "description"?: string // optional
        }
      ]
      "createdAt": string (timestamp)
    }
  ]
}

Response Example Value

{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Response String",
      "type": {},
      "permissions": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "name": "Response String",
          "description": "Response String"
        }
      ],
      "createdAt": "Response String"
    }
  ]
}

Get Role Details

GET /api/organizations/{organizationPk}/groups/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Group.

organizationPk

string

A UUID string identifying this Organization ID

Code Examples

# Call API Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and check the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "id": string (uuid)
  "name": string
  "type": 
  {
  }
  "permissions": [
    {
      "id": string (uuid)
      "name": string
      "description"?: string // Optional
    }
  ]
  "createdAt": string (timestamp)
}

Response Example Value

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Response String",
  "type": {},
  "permissions": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Response String",
      "description": "Response String"
    }
  ],
  "createdAt": "Response String"
}

Get Role Member List

GET /api/organizations/{organizationPk}/groups/{groupPk}/group-members/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

organizationPk

string

A UUID string identifying this organization ID

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

Code Examples

# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-members/?page=1&pageSize=1&query=example" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "count": integer
  "next"?: string (uri) // Optional
  "previous"?: string (uri) // Optional
  "results": [
    {
      "id": string (uuid)
      "member": {
      {
        "id": string (uuid)
        "name": string
        "email": string
        "isOwner": boolean // Check if the member is the organization owner (via OWNER Group)
        "permissions": object
        "createdAt": string (timestamp)
      }
      }
      "createdAt": string (timestamp)
    }
  ]
}

Response Example Value

{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "member": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Response String",
        "email": "Response String",
        "isOwner": false,
        "permissions": {
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "name": "Example Response Name",
          "description": "Example Response Description"
        },
        "createdAt": "Response String"
      },
      "createdAt": "Response String"
    }
  ]
}

View a Specific Role Member

GET /api/organizations/{organizationPk}/groups/{groupPk}/group-members/{id}/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

id

string

A UUID string identifying this Group Member.

organizationPk

string

A UUID string identifying this Organization ID

Code Examples

# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-members/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "id": string (uuid)
  "member": {
  {
    "id": string (uuid)
    "name": string
    "email": string
    "isOwner": boolean // Check if the member is the organization owner (via OWNER Group)
    "permissions": object
    "createdAt": string (timestamp)
  }
  }
  "createdAt": string (timestamp)
}

Response Example Value

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "member": {
    "id": "5e8400-e29b-41d4-a716-446655440000",
    "name": "Response String",
    "email": "Response String",
    "isOwner": false,
    "permissions": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Response Sample Name",
      "description": "Response Sample Description"
    },
    "createdAt": "Response String"
  },
  "createdAt": "Response String"
}

Get Role's AI Assistant List

GET /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

organizationPk

string

A UUID string identifying this Organization ID

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

Code Examples

# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-chatbots/?page=1&pageSize=1&query=example" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "count": integer
  "next"?: string (uri) // Optional
  "previous"?: string (uri) // Optional
  "results": [
    {
      "id": string (uuid)
      "group": string (uuid)
      "chatbot": { // Adds nested create feature
      {
        "id": string (uuid)
        "name": string // The name of the chatbot. In Agent mode, it has semantic meaning; in other modes, it's just used to differentiate between different chatbots.
        "rag"?: string (uuid) // RAG (Retrieval-Augmented Generation) settings, used to enhance response quality (Optional)
        "largeLanguageModel": string (uuid) // The large language model used by the chatbot to generate responses.
        "embeddingModel"?: string (uuid) // The embedding model used for vectorizing text, an optional item (Optional)
        "rerankerModel"?: string (uuid) // Optional
        "instructions"?: string // The role instructions for the chatbot, used to describe its role and behavior (Optional)
        "knowledgeBases"?: [ // A list of knowledge bases accessible to the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
          }
        ]
        "updatedAt": string (timestamp)
        "organization"?: string (uuid) // The organization the chatbot belongs to. If null, it's a personal chatbot (Optional)
        "builtInWorkflow"?: string (uuid) // Built-in workflow for predefined processing flows (Optional)
        "replyMode"?:  // Reply mode: normal reply or streaming reply

* `normal` - Normal
* `template` - Template
* `hybrid` - Hybrid
* `workflow` - Workflow
* `agent` - Agent (Optional)
        {
        }
        "template"?: string // The template used in template mode and hybrid mode (Optional)
        "unanswerableTemplate"?: string // The template used when template mode or hybrid mode cannot provide an answer (Optional)
        "totalWordsCount"?: integer (int64) // Cumulative total word count used (Optional)
        "outputMode"?:  // Output mode: text, table, or custom format

* `text` - Text
* `json_schema` - JSON Schema (Optional)
        {
        }
        "rawOutputFormat"?: object // JSON structure definition for custom output format (Optional)
        "databaseUrl"?: string // Database connection URL (for database query functionality) (Optional)
        "databaseType"?: string // Database type options, including MySQL, PostgreSQL, MSSQL, Oracle (Optional)
        "includeTables"?: object // List of included tables (for database query functionality) (Optional)
        "groups"?: [ // List of groups accessible to the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
          }
        ]
        "toolkits"?: [ // List of toolkits used by the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
            "description": string
            "displayName": string
            "toolType": string
          }
        ]
        "tools"?: [ // List of tools usable by the chatbot (Optional)
          {
            "id": string (uuid)
            "name": string
            "description": string
            "displayName": string
            "toolType": string
          }
        ]
        "agentMode"?:  // Agent mode: normal, SQL, or workflow mode

* `normal` - Normal
* `canvas` - Canvas (Optional)
        {
        }
        "numberOfRetrievedChunks"?: integer // The number of retrieved reference chunks, default is 12, minimum is 1 (Optional)
        "enableEvaluation"?: boolean // Optional
        "enableInLineCitations"?: boolean // Enable inline citations, which will insert citation markers in [1][2] format in the response (Optional)
      }
      }
      "createdAt": string (timestamp)
    }
  ]
}

Response Example Value

{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "group": "550e8400-e29b-41d4-a716-446655440000",
      "chatbot": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Response string",
        "rag": "550e8400-e29b-41d4-a716-446655440000",
        "largeLanguageModel": "550e8400-e29b-41d4-a716-446655440000",
        "embeddingModel": "550e8400-e29b-41d4-a716-446655440000",
        "rerankerModel": "550e8400-e29b-41d4-a716-446655440000",
        "instructions": "Response string",
        "knowledgeBases": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "Response string"
          }
        ],
        "updatedAt": "Response string",
        "organization": "550e8400-e29b-41d4-a716-446655440000",
        "builtInWorkflow": "550e8400-e29b-41d4-a716-446655440000",
        "replyMode": {},
        "template": "Response string",
        "unanswerableTemplate": "Response string",
        "totalWordsCount": 456,
        "outputMode": {},
        "rawOutputFormat": null,
        "databaseUrl": "Response string",
        "databaseType": "Response string",
        "includeTables": null,
        "groups": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "Response string"
          }
        ],
        "toolkits": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "Response string",
            "description": "Response string",
            "displayName": "Response string",
            "toolType": "Response string"
          }
        ],
        "tools": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "Response string",
            "description": "Response string",
            "displayName": "Response string",
            "toolType": "Response string"
          }
        ],
        "agentMode": {},
        "numberOfRetrievedChunks": 456,
        "enableEvaluation": false,
        "enableInLineCitations": false
      },
      "createdAt": "Response string"
    }
  ]
}

Update Role Permissions

PUT /api/organizations/{organizationPk}/groups/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Group.

organizationPk

string

A UUID string identifying this Organization ID

Request Body

Request Parameters

Field
Type
Required
Description

name

string

Yes

organization

string (uuid)

No

permissions

array[string]

Yes

Request Structure Example

{
  "name": string
  "organization"?: string (uuid) // Optional
  "permissions": [
    string (uuid)
  ]
}

Request Example Value

{
  "name": "Example Name",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "permissions": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}

Code Examples

# API Call Example (Shell)
curl -X PUT "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Name",
    "organization": "550e8400-e29b-41d4-a716-446655440000",
    "permissions": [
      "550e8400-e29b-41d4-a716-446655440000"
    ]
  }'

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "id": string (uuid)
  "name": string
  "type": 
  {
  }
  "permissions": [
    {
      "id": string (uuid)
      "name": string
      "description"?: string // optional
    }
  ]
  "createdAt": string (timestamp)
}

Response Example Value

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Response String",
  "type": {},
  "permissions": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Response String",
      "description": "Response String"
    }
  ],
  "createdAt": "Response String"
}

Partially Update Role Permissions

PATCH /api/organizations/{organizationPk}/groups/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Group.

organizationPk

string

A UUID string identifying this Organization ID

Request Body

Request Parameters

Field
Type
Required
Description

name

string

No

organization

string (uuid)

No

permissions

array[string]

No

Request Structure Example

{
  "name"?: string // Optional
  "organization"?: string (uuid) // Optional
  "permissions"?: [ // Optional
    string (uuid)
  ]
}

Request Example Value

{
  "name": "Example Name",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "permissions": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}

Code Examples

# Call API Example (Shell)
curl -X PATCH "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Name",
    "organization": "550e8400-e29b-41d4-a716-446655440000",
    "permissions": [
      "550e8400-e29b-41d4-a716-446655440000"
    ]
  }'

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

{
  "id": string (uuid)
  "name": string
  "type": 
  {
  }
  "permissions": [
    {
      "id": string (uuid)
      "name": string
      "description"?: string // optional
    }
  ]
  "createdAt": string (timestamp)
}

Response Example Value

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Response String",
  "type": {},
  "permissions": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Response String",
      "description": "Response String"
    }
  ],
  "createdAt": "Response String"
}

Delete Role

DELETE /api/organizations/{organizationPk}/groups/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Group.

organizationPk

string

A UUID string identifying this Organization ID

Code Examples

# API Call Example (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response

Status Code
Description

204

No response body


Remove Role Member

DELETE /api/organizations/{organizationPk}/groups/{groupPk}/group-members/{id}/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

id

string

A UUID string identifying this Group Member.

organizationPk

string

A UUID string identifying this Organization ID

Code Examples

# API Call Example (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-members/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code
Description

204

No response body


Remove AI Assistant from Role

DELETE /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/{id}/

Parameters

Parameter Name
Required
Type
Description

groupPk

string

id

string

A UUID string identifying this Group Chatbot.

organizationPk

string

A UUID string identifying this Organization ID

Code Examples

# API Call Example (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/groups/550e8400-e29b-41d4-a716-446655440000/group-chatbots/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code
Description

204

No response body


Last updated

Was this helpful?