Rename a group with Node.js continued
Update a group name
Say the group has evolved and needs a better name to describe it. Let's give your group of contacts a different name.
- To update the name of the group, create an additional file in the project called
updateGroup.mdx
.
- Paste the code in the "Update a group name" sample.
- Fill in the
name
parameter with the new name of your group.
Note:
Notice that we are using a different endpoint to update the group. For more update options, see our various code samples in the API reference.
Run the code
- Run the following command in your terminal/command prompt to create a group:
node updateGroup.mjs
Successful Response
A successful response shows the new name of the group.
{
"id": "XXXXX6621VHXXXXX9Z8PMXXXXX",
"name": "Jazzercise 1",
"size": 2,
"created_at": "2022-08-24T14:15:22Z",
"modified_at": "2022-08-24T14:15:22Z",
}
You're an all-star classifier!
Go backNext steps
- Find other useful code samples in our API reference.
- Check out another tutorial.