• Tools
Tools
  • Tools
loading...
No Results
  • ActiveCampaign
  • AirDroid Business
    • Index
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a group
    • Get a group id by group name
    • Get a device by name
    • Get a device app by name
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get device info push
    • Get device location report
    • Get device network connection history
    • Get device application usage duration
    • Get device application report
    • Get device online status report
    • Get device remote access report
    • Get data usage overview and trends
    • Get tag ids by tag names
    • Get top 10 apps by usage duration
    • Get top 10 data usage apps
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Set tags
    • Turn off device screen
    • Unenroll a device
    • Update a device name
    • Update a device remark
    • Update a group name
    • Update a group remark
  • Asana
  • AWS-S3
  • AWS Lambda
  • Appstore
  • BambooHR
  • Bitbucket
  • Brevo
  • Coda
  • Code
  • ConvertKit
  • CSV
  • Crypto
  • Clockify
  • Data Shaping
  • Date & Time
  • Delay
  • DingTalk
  • Discourse
  • Discord
  • Dropbox
  • Elastic Security
  • FeiShu
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Gitlab
  • Github
  • Grafana
  • Google Ads
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Harvest
  • HaloPSA
  • Hacker News
  • Hubspot
  • Help Scout
  • Intercom
  • Jira
  • Jenkins
  • Kafka
  • Lemlist
  • MySQL
  • Monday
  • Metabase
  • MailChimp
  • Microsoft Excel
  • Microsoft Outlook
  • Notion
  • Nextcloud
  • Odoo
  • Ortto
  • Okta
  • PayPal
  • Paddle
  • Pipedrive
  • PostHog
  • PostgreSQL
  • Qdrant
  • QRCode
  • QuickBooks
  • Redis
  • Stripe
  • Splunk
  • Shopify
  • Segment
  • ServiceNow
  • Search&Crawl
  • Text
  • Trello
  • Twilio
  • Todoist
  • Wikipedia
  • WordPress
  • WooCommerce
  • Xml
  • YouTube
  • Zulip
  • Zoom
  • Zendesk
  • Zammad
  • Zoho CRM
Home > Tools > AirDroid Business

Create a group

Tool Name: airdroid_business_create_group

Risk Level: 🟠 Medium Risk

Execution Mode: ⚡ Synchronous

Category: Group Management

Quick Start (Copy & Use)

One-liner: Create a new device group; supports creating top-level groups or sub-groups.

You need: GroupName (group name, required), ParentGroupId (parent group ID, optional, defaults to 0 for top-level group)

Success criteria: StatusCode == 200 AND ErrorMessage == "" AND GroupId > 0

What to do next: Use the returned GroupId to call Get a Group for the deploy code, or use Move Devices to a Group to assign devices to the group

Minimum request example:

{
  "GroupName": "Sales Team"
}

Minimum response example:

{
  "GroupId": 12345,
  "StatusCode": 200,
  "ErrorMessage": ""
}

Recipes (Common Recipes)

Recipe 1: Create a top-level group

Scenario: Create a standalone top-level group

{
  "GroupName": "Marketing Department",
  "ParentGroupId": 0
}

Recipe 2: Create a sub-group

Scenario: Create a sub-group under an existing group

Step 1: Get the parent group ID

{
  "GroupName": "Sales Department"
}

Step 2: Create the sub-group

{
  "GroupName": "North Region Sales",
  "ParentGroupId": 100
}

Recipe 3: Create a group then get the deploy code

Scenario: After creating a group, retrieve its deploy code for device enrollment

Step 1: Create the group

{
  "GroupName": "New Store Devices"
}

Response:

{
  "GroupId": 12345,
  "StatusCode": 200,
  "ErrorMessage": ""
}

Step 2: Get group details (including the deploy code)

{
  "GroupId": 12345
}

1. Overview

1.1 Description

Create a new device group in AirDroid Business. Supports creating top-level groups or sub-groups under existing groups for organizing and managing devices.

1.2 When to Use

  • Organization expansion: Create device groups for new departments or regions
  • Project isolation: Create separate groups for different projects for easier device management
  • Hierarchical management: Build layered group structures such as "Region → Store → Device Type"
  • Bulk enrollment: Create a group to obtain a deploy code for batch device registration

1.3 Execution Mode & Response

This is a synchronous operation that returns the new group's GroupId immediately.

  • Return value: GroupId (unique identifier of the newly created group)
  • Typical latency: < 1 second

1.4 Prerequisites

Condition Description How to Check
Unique group name No duplicate names under the same parent group Use Get a Group ID by Group Name to check
Parent group exists If ParentGroupId is specified, the parent group must exist Use Get a Group to verify
Sufficient permissions Account must have permission to create groups -

1.5 Prerequisite Tools

Dependency Tool Purpose Necessity
Get a Group ID by Group Name Check if group name already exists Recommended
Get a Group ID by Group Name Get parent group ID (when creating sub-groups) If creating sub-groups

2. Inputs

2.1 Parameter List

Parameter Type Required Default Description
GroupName string ✅ Yes - Name of the new group
ParentGroupId number No 0 Parent group ID; 0 means top-level group

2.2 Parameter Details

`GroupName`

Name of the new group, used to identify the group in the system.

  • Type: string
  • Format requirements:
    • Maximum length: 35 characters
    • Cannot be empty or contain only spaces
    • Prohibited special characters: / \ : * < > | ? ' " = ; , &
  • Source: User-specified or obtained from a business system
  • How to fill in a GI node:
    • Constant value: Enter a string directly, e.g. "Sales Team"
    • Upstream output reference: Get the group name from an upstream node
  • Example:
"Sales Team"

Important: It is recommended to check whether a group with the same name already exists using Get a Group ID by Group Name before creating.

`ParentGroupId`

ID of the parent group, used to create nested group structures.

  • Type: number (integer)
  • Format requirements:
    • 0 = create a top-level group (default)
    • Positive integer > 0 = create a sub-group under the specified parent group
  • Source:

How to obtain:

  1. Use Get a Group ID by Group Name to look up by parent group name
  2. Use the id field from the Get a Group response
  3. Use the GroupId returned by Create a Group
  • How to fill in a GI node:
    • Constant value: Enter a number directly, e.g. 0 or 100
    • Upstream output reference: Get from Get a Group ID by Group Name output GroupIds[0]
  • Example:
0

or

100

2.3 Parameter Combination Logic

  • ParentGroupId = 0 (or omitted): Creates a top-level group
  • ParentGroupId > 0: Creates a sub-group under the specified parent group; the parent group must exist

3. Outputs

3.1 Response Examples

Success response:

{
  "GroupId": 12345,
  "StatusCode": 200,
  "ErrorMessage": ""
}

Error response (group name already exists):

{
  "GroupId": 0,
  "StatusCode": 200,
  "ErrorMessage": "Group name already exists"
}

Error response (parameter error):

{
  "GroupId": 0,
  "StatusCode": -1,
  "ErrorMessage": "Invalid group_name."
}

3.2 Field Descriptions

Field Path Type Description
StatusCode number Status code. See 5.1 AB Three-Layer Error Codes
ErrorMessage string Error message. Empty string on success
GroupId number Unique identifier of the newly created group. 0 on failure

Subsequent usage: The returned GroupId can be used with:

  • Get a Group: Retrieve group details and deploy code
  • Move Devices to a Group: Move devices into this group
  • Update a Group Name: Modify the group name
  • Update a Group Remark: Add a group remark

4. Examples

4.1 Basic Example: Create a top-level group

Request parameters:

{
  "GroupName": "Sales Team",
  "ParentGroupId": 0
}

Response:

{
  "GroupId": 12345,
  "StatusCode": 200,
  "ErrorMessage": ""
}

4.2 Advanced Example: Create a nested sub-group

Request parameters:

{
  "GroupName": "North Region",
  "ParentGroupId": 100
}

Response:

{
  "GroupId": 12346,
  "StatusCode": 200,
  "ErrorMessage": ""
}

4.3 Error Example: Group name already exists

Request parameters:

{
  "GroupName": "Sales Team",
  "ParentGroupId": 0
}

Response:

{
  "GroupId": 0,
  "StatusCode": 200,
  "ErrorMessage": "Group name already exists"
}

4.4 Error Example: Contains illegal characters

Request parameters:

{
  "GroupName": "Sales/Marketing",
  "ParentGroupId": 0
}

Response:

{
  "GroupId": 0,
  "StatusCode": -1,
  "ErrorMessage": "Invalid group_name."
}

5. Error Handling

5.1 AB Three-Layer Error Codes

Core principle: AB uses a three-layer error code strategy. The Agent should decide its handling approach based on the StatusCode.

StatusCode Meaning Scenario Agent Action
-1 Parameter validation error Group name is empty or contains illegal characters ❌ Do not retry; fix parameters and call again
200 Business success or business error HTTP request succeeded; check ErrorMessage Empty ErrorMessage = success; non-empty = business error
500 Network/request exception Timeout, connection failure ⚠️ Retry up to 2 times with 5-second intervals

5.2 Common Errors

StatusCode ErrorMessage Example Cause Fix
-1 Invalid group_name. Group name is empty or contains illegal characters Check the name and remove special characters
200 Group name already exists A group with the same name already exists Use a different name or delete the existing group first
200 Parent group not found Parent group does not exist Verify ParentGroupId is correct
200 access_token is invalid. Token is invalid or expired Refresh the AccessToken
500 Request timeout after 60 seconds. Request timed out Retry later

5.3 Agent Self-Healing Decision Table

StatusCode Auto-Retry Retry Strategy Requires Manual Intervention
-1 ❌ - Fix parameters and call again
200 (non-empty ErrorMessage) ❌ - Fix based on error message
500 ⚠️ Retry up to 2 times with 5-second intervals Escalate if failures persist

6. Best Practices

6.1 Performance Optimization

  • Batch creation: For creating multiple groups, call the tool multiple times in parallel
  • Pre-check: Check whether the group name already exists before creating to avoid invalid calls

6.2 Security Considerations

🟡 Write operation: This operation creates a new resource in the system.

  • Naming conventions: Establish group naming conventions for easier management
  • Hierarchy control: Avoid creating excessively deep group hierarchies; recommend no more than 3 levels
  • Permission management: Ensure only authorized personnel can create groups

6.3 Idempotency

Idempotency of this operation: Not idempotent.

  • Calling with the same parameters multiple times will fail (group name already exists)
  • It is recommended to check whether the group exists using Get a Group ID by Group Name before creating
  • If you need "ensure the group exists" logic, query first and then decide whether to create

7. Related Tools

7.1 Prerequisite Tools

Tool Name Purpose
Get a Group ID by Group Name Check if group name already exists; get parent group ID

7.2 Follow-up Tools

Tool Name Purpose
Get a Group Retrieve detailed information and deploy code for the new group
Update a Group Remark Add a remark to the new group
Move Devices to a Group Move devices into the newly created group

7.3 Similar Tools Comparison

Tool Name Use Case Difference
Create a Group Create a new group Creates a resource; returns GroupId
Delete Groups Delete groups Deletes a resource; high-risk operation requiring confirmation

8. Tool Chains

8.1 Safe Group Creation (Avoid Duplicates)

Scenario: Ensure the group exists; create it only if it does not

Tool chain:

Get a Group ID by Group Name → [Conditional] → Create a Group

Steps:

  1. Call Get a Group ID by Group Name to check if the group exists
  2. If GroupIds is empty, call Create a Group to create it
  3. If GroupIds is not empty, use the existing GroupId directly

8.2 Create Nested Group Structure

Scenario: Create a multi-level group structure (e.g., Region → Store)

Tool chain:

Get a Group ID by Group Name → Create a Group → Create a Group (sub-group)

Steps:

  1. Check if the parent group exists
  2. If it does not exist, create the parent group first
  3. Use the parent group's GroupId as ParentGroupId to create the sub-group

8.3 Create a Group and Configure It

Scenario: Add a remark after creating a group

Tool chain:

Create a Group → Update a Group Remark

Steps:

  1. Call Create a Group to create the new group
  2. Use the returned GroupId to call Update a Group Remark to add a remark

8.4 Create a Group and Get the Deploy Code

Scenario: Retrieve the deploy code for batch device enrollment after creating a group

Tool chain:

Create a Group → Get a Group

Steps:

  1. Call Create a Group to create the new group
  2. Use the returned GroupId to call Get a Group
  3. Retrieve deploy_code from the response for device enrollment
Updated on: Feb 13, 2026
Was This Page Helpful?
Prev Clear app data and cache
Next Delete groups
Discussion

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
On this page
  • Quick Start (Copy & Use)
  • Recipes (Common Recipes)
    • Recipe 1: Create a top-level group
    • Recipe 2: Create a sub-group
    • Recipe 3: Create a group then get the deploy code
  • 1. Overview
    • 1.1 Description
    • 1.2 When to Use
    • 1.3 Execution Mode & Response
    • 1.4 Prerequisites
    • 1.5 Prerequisite Tools
  • 2. Inputs
    • 2.1 Parameter List
    • 2.2 Parameter Details
    • 2.3 Parameter Combination Logic
  • 3. Outputs
    • 3.1 Response Examples
    • 3.2 Field Descriptions
  • 4. Examples
    • 4.1 Basic Example: Create a top-level group
    • 4.2 Advanced Example: Create a nested sub-group
    • 4.3 Error Example: Group name already exists
    • 4.4 Error Example: Contains illegal characters
  • 5. Error Handling
    • 5.1 AB Three-Layer Error Codes
    • 5.2 Common Errors
    • 5.3 Agent Self-Healing Decision Table
  • 6. Best Practices
    • 6.1 Performance Optimization
    • 6.2 Security Considerations
    • 6.3 Idempotency
  • 7. Related Tools
    • 7.1 Prerequisite Tools
    • 7.2 Follow-up Tools
    • 7.3 Similar Tools Comparison
  • 8. Tool Chains
    • 8.1 Safe Group Creation (Avoid Duplicates)
    • 8.2 Create Nested Group Structure
    • 8.3 Create a Group and Configure It
    • 8.4 Create a Group and Get the Deploy Code
loading...
No Results