Invite users via the API

Learn how to invite users to connect their work accounts.

Overview

While it is possible to invite users via the Argyle Console, you can also utilize the Argyle API to invite users programmatically via email and/or phone.

The invite template consists of three components:

  • text message
  • email
  • landing page

A user can be invited by either a text message, or an email, or both. When a user clicks on the call-to-action link in the text message or button in the email, they are directed to a dedicated landing page.

Create a template

To start off, you will need to create an invite template with the following payload:

Text message

You can define the contents of the text message by editing the sms_body parameter.

Email

You can define the following parameters within the email:

sender
required
string

The "From" field of the invitation email.

subject
required
string

The email subject of the invitation email.

logo_url
required
string

A link to the logo to be used in the invitation email.

header
required
string

The title header of the invitation email.

email_body
required
string

The text content of the email that to be sent as part of the invitation.

button
required
string

The call-to-action button label within the email.

Landing page

You can define the following parameters within the landing page:

logo_url
required
string

A link to the logo to be used in the invitation email.

page_heading
required
string

The heading 1 of the landing page.

page_description
required
string

The text content of the landing page.

page_button
required
string

The call-to-action button label on the landing page to initiate Argyle Link.

Success page

After the user successfully connects, they will be directed to the success page. You can define the following parameters:

logo_url
required
string

A link to the logo to be used in the invitation email. Logo dimensions: 120x120.

page_config.page_success_heading
required
string

The heading 1 of the success page.

page_config.page_success_description
required
string

The text content of the success page.

page_config.page_success_button
required
string

The call-to-action button label on the success page.

It is required when page_success_show_button = true.

page_config.page_success_show_button
required
boolean

Denotes if the action button on the success page is shown.

If true, the page_success_button is required.

Placeholder texts

Placeholders like [Company], [Name], etc. can be used within the text message, email, or the landing page. For a full list of placeholders, please refer to the API reference.

Send an invite

You can invite users by using the send an invite endpoint. As previously mentioned, you can send a text message and/or email. You control this by providing a phone_number and/or email argument in the payload.

Once you send out an invite, the status will become invited.

Resend an invite

You can resend a previously sent-out invite. The invited_at attribute will reflect the time of the latest resend.

Revoke an invite

You can revoke a previously sent-out invite.

Once you revoke an invite, the status will become revoked and the revoked_at field will be filled.