Create a new invite for an existing space. Invitees will be added to the list of members for the space.

URL Parameters

NameDescriptionLocationRequiredDefault Value
spaceIdUnique identifier of the space.pathYes

Body Parameters

NameDescriptionJSON typeRequiredDefault Value
startDateTimeUTC timestamp space start time.stringNo
endDateTimeUTC timestamp space end time.stringNo
inviteesArray of objects describing the members to invite.
  • inviteeType: (string) 'email' (invitee is not a spaces user) or 'userid' (invitee is a user)
  • invitee: (string) the email address (if inviteeType is email) or the userid (if inviteeType is user)
  • role: (string) permission level in space: ('admin', 'member' (default), 'guest')
ObjectYes
informChannel'server' (Spaces will email the invites), 'client' (Spaces will return the html of the invites for the user to send), 'outlook' (Spaces will return special html compatible with Microsoft Outlook)stringNoserver
inviteContentLanguageThe language of invite content in response property inviteContent. If the input language is not supported by spaces, language code 'en-US' is used.stringNoSending user's language setting

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

PERM_TOPIC_UPDATE

Example Request

URL

POST https://spacesapis.zang.io/api/spaces/{spaceId}/invite

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Body

{
  "startDateTime": "2016-01-12T18:45:01.263+0000", //UTC time, Optional
  "endDateTime": "2016-01-12T19:45:01.263+0000",  //UTC time, Optional
  "invitees": [{
      "inviteeType": "email",   // this is a no registered user
      "invitee": "han42@avaya.com",
      "role": "guest"  //optional: 'member', 'admin', 'guest' , empty means 'member';
    },
    {
      "inviteeType": "userId",   // this is a registered user
      "invitee": "5890b1243bab0e18ff044943", // this is the user id
      "role": "member" //optional: 'member', 'admin', 'guest' , empty means 'member';
    }
  ],
  "informChannel": "server"
}

Example Response

{
  "data": [{
    "topicId": "59036b84e2cda45e3bbbfc58",
    "endDateTime": "2017-04-28T17:21:57.659Z",
    "_id": "59036c25e2cda45e3bbbfc5b",// this is the invitation id
    "invitees": [{
      "inviteeType": "email",
      "invitee": "han42@avaya.com",
      "role": "member"
    }],
    "created": "2017-04-28T16:21:57.794Z"
  }]
}