Create groups tutorial continued

To organize your groups into categories, we'll create parent groups.

Create a parent group

  1. Gather the id of each group that will go into this new parent group. The groups we just created will now become children of this parent group.
  2. Replace the body of the index.mjs file with something similar to this payload:
      body: JSON.stringify({
        name: 'Axe Throwers',
        child_groups: [
  3. Paste in the group id for each of the groups you created under child_groups.
  4. Save your file.
  5. Run the code again.
    node index.mjs

Successful response

A successful response will show the new parent id as well as the child groups that parent group contains.

  name: 'Axe Throwers',
  size: 0,
  created_at: '2022-04-13T18:43:58.525Z',
  modified_at: '2022-04-13T18:43:58.525Z',

That's it! You've organized your SMS groups into a parent group.

List all groups

Once you get the ball rolling on your grouping, use the GET List Groups method from the API reference to list all of your groups.

Go back

Next steps

Was this page helpful?