Developer Docs
OverviewGroupsPathways
  • Getting Started
  • Overview
    • API Manager
    • User Privacy
    • Responses
  • Groups
    • Concepts
    • Manage
    • Status
    • Insert
    • Remove
  • Data
    • Overview
    • List
    • Upload
    • Download
    • Delete
    • Insert
    • Remove
  • Pathways
    • Overview
    • Enrolments
      • List
      • Manage
    • Web Tracking
      • Serverless
      • Server-Side Platforms
    • Classroom & Events
      • List
      • Consume
    • Rewards
      • List
      • Consume
    • Webhooks
      • Enrolments
      • Classroom & Events
      • Rewards
    • Logs
      • Activity & Fulfilment Types
      • Activity & User Logs
  • Stories
    • Logs
      • Story Logs
      • User Story Logs
    • Certificates
    • Question Analysis
  • Streams
    • Subscriptions
    • Ratings
  • Analytics
    • Overview
    • Published
    • Realtime
    • Audience
      • Frequency
      • Demographics
      • Locations
      • Retention
    • Reviews
Powered by GitBook
On this page
  • Parameters
  • Example
  • Success Response
  1. Groups

Insert

Add a single user to one or more groups. When new users are added, invites are sent automatically within 1-5 minutes. If the group does not exist, it will automatically be created.

Parameters

Key

Type

groups

Array of Strings

user

User Object (firstname, lastname, email, optional telelphone)

invite

Boolean (defaults to true)

forceSync

Boolean (defaults to false)

Caution

When using forceSync, this will potentially remove users from other groups they may have been manually assigned. You should only use this if it is unlikely the user will be manually assigned to groups.

Example

curl -X POST \
  v1/groups/insert \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d '{
	"groups" : ["Group One","Group Two"],
	"user" : {
	  "firstname" : "Test",
	  "lastname" : "User",
	  "email" : "test@example.com"   
        }
 }'

Success Response

{
    "status": "success",
    "data": [
        {
            "group": "Group One",
            "status": "success",
            "inserts": 1,
            "warnings": 0
        },
        {
            "group": "Group Two",
            "status": "success",
            "inserts": 1,
            "warnings": 0
        }
    ],
    "hash": "15cc3e129ddd0c4ea2e5f0ebc4b18688",
    "response_time": 0.225816011428833
}
PreviousStatusNextRemove

Last updated 1 year ago