Adding many users to groups via API

2 Kommentare

  • Dave Dyson
    Community Moderator

    Hi Karan, I think you'd need to use the Search Users API endpoint, with the email address as the query, e.g. query="email:jdoe@example.com" in order to return the user record for each user, which would include that user's user id. You could do that for each user you want to look up, and collect the user ids for use in the Create Many Group Memberships API endpoint you want to use above.

     

    0
  • karan sharma
    Since this is the only way to add many users to group how can we also place email id of the user what will be the format?
     
     
     
    -X POST -d '{"group_memberships": [{"user_id": 72, "group_id": 88}, {"user_id": 73, "group_id": 88}]}' \
    -H "Content-Type: application/json" -v -u {email_address}:{password}
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk