Skip to main content

UserInvite

Invite Users

Description

  • Uninvited users can join the workspace.
  • Before executing this API, users must be added to the workspace with the AddUser API.
  • If you would like to use a Sendgrid email template specific to your system, please contact Hexabase in advance. By specifying the email_templates_id issued by Hexabase, you can use your own Sendgrid email template.
  • If you want to handle email services other than Sendgrid, please refer here.

Method

POST

Request URL Format

/api/v0/userinvite

Request URL Sample

POST https://api.xxx.com/api/v0/userinvite

Use Sendgrid for mail service (standard)

Payload

Content-Type : application/json

{
"users": [
{
"email": "[email protected]"
},
{
"email": "[email protected]",
"exclusive_w_id": "624bea3a879f4e8d8b5dcc6c" // Specify the same workspace ID to add as a workspace-only user in AddUser
}
],
"domain": "app.xxx.com",
"sender_address": "[email protected]" // Specify if you want to change "from" to any value when sending invitation mail
"invitation_path": "Path to verify invited users", // Optional (default: 'confirm_email')
"email_templates_id" : "5fb205b03545feade82dxxxx", // (Optional) Set this option if you wish to use the Sendgrid template for customers when sending invitation emails. Please contact Hexabase in advance and specify the Hexabase email setup ID issued. If omitted, Hexabase's default password change screen will be used.

Response Sample

If the user specified in payload exists and the email is sent, stats: 200 will be returned

[
{
"email": "[email protected]",
"stats": 200
},
{
"email": "[email protected]",
"stats": 200
}
]
  • If the user specified in payload does not exist, stats: 400 will be returned.
  • Please note that it is necessary to specify exclusive_w_id especially if you want to invite workspace-only users.
[
{
"email": "[email protected]",
"stats": 400
}
]

Using a non-Sendgrid mail service

The no_confirm_email flag can be specified to prevent standard outgoing mail from being sent.

Payload

Content-Type : application/json

{
"users": [
{
"email": "[email protected]"
},
{
"email": "[email protected]",
"exclusive_w_id": "624bea3a879f4e8d8b5dcc6c" // Specify the same workspace ID to add as a workspace-only user in AddUser.
}
],
"no_confirm_email": true // If true, Hexabase standard Sendgrid mail will not be sent.
}

Response Sample

  • no_confirm_email: if true, the confirmation_id for the invited user will be returned.
  • The returned confirmation_id can be used in RegisterUser.
[
{
"confirmation_id": "62rcbd9j0p0ejlnpna589lpfu5pj9u8wzd9oi5libsmpzq710gb4ekow6sikrlw2lpejax2b71dd3pxt67yy7qjz994ypcbg7xnl",
"email": "[email protected]"
},
{
"confirmation_id": "8c8buoxpyf0gqcyoxn2tb3czvnsbsud8ipcemh12e9cgslgu0mmcsnxfq0p4z9aat3dqagt4sttvb423fo3kdspvnckzs6ycgp1w",
"email": "[email protected]"
}
]