Invites

The Invites APIs allow you to manage and send invitations to your end-users directly from your website or application, without the need to access the Smile Developer Portal manual functionality. This facilitates an automated process and experience for your end users.

The API also makes use of predefined Invite Templates that you can use in order to customize the content of the invite email sent to your user.

Sending Invites

To send an invite via the API, you need the following information:

AttributeTypeDescription
fullNamestringThe full name of the person to be invited. Required
firstNamestringThe first name of the person to be invited
lastNamestringThe last name of the person to be invited
emailstringThe email address the invite should be send to. Required
templateIdstringThe invite template ID to use, usually in the format tpl-123abc456def789abc123def456abc78. Required
winkTemplateIdstringThe Wink Widget template ID to use, usually in the format wtpl-123abc456def789abc123def456abc78

You may manage your email invite templates via the Invite Templates API.

See the Create Invite endpoint for more information on creating and sending invites via API.

Fallback Methods

If you cannot use the Invites API to create automated emails sent to your end users, you may also access the Smile Developer Portal to send invites manually via the Users section. Note that you must be on Production mode to use this functionality.

The Invites object

AttributeTypeDescription
idstringUnique ID of the invite sent on the Smile Network
createdAtdatetimeDate and time the invite was created
fullNamestringThe full name of the person to be invited. Required
firstNamestringThe first name of the person to be invited
lastNamestringThe last name of the person to be invited
emailstringThe email address the invite should be send to. Required
templateIdstringThe invite template ID to use, usually in the format tpl-123abc456def789abc123def456abc78. Required
winkTemplateIdstringThe Wink Widget template ID to use, usually in the format wtpl-123abc456def789abc123def456abc78
userIdstringThe invitee's Smile Network unique user ID, created when the invite is sent
statusstringStatus of the invite. Possible values: INVITED, LINKED
updatedAtdatetimeDate and time the invite was last updated
invitedAtdatetimeDate and time the invite was sent
linkedAtdatetimeDate and time the invited user has linked an account
inviteLandingPageUrlstringURL of the unique landing page for the invited user to connect their accounts

Sample Invites data

{
    "id": "iv-123abc456def789abc123def456abc78",
    "createdAt": "2023-02-02T02:35:01Z",
    "fullName": "George Palomero Jr",
    "firstName": "George",
    "lastName": "Palomero",
    "email": "[email protected]",
    "templateId": "tpl-123abc456def789abc123def456abc78",
    "winkTemplateId": "wtpl-123abc456def789abc123def456abc78",
    "userId": "tenantId-123abc456def789abc123def456abc78",
    "status": "INVITED",
    "updatedAt": "2023-02-02T02:35:01Z",
    "invitedAt": "2023-02-02T02:35:01Z",
    "linkedAt": null
}

Endpoints

Endpoint
List all inviitesGET /invites
Create and send an invitePOST /invites
Retrieve one inviteGET /invites/{id}

Webhooks

INVITE_INVITED

Sent when an invitation is sent out to a user successfully.

{
  "id": "et-123abc456def789abc123def456abc78",
  "version": 1,
  "type": "INVITE_INVITED",
  "createdAt": "2021-04-14T09:30:24Z",
  "data": {
    "userId": "tenantId-123abc456def789abc123def456abc78",
    "inviteId": "iv-123abc456def789abc123def456abc78"
  }
}

INVITE_LINKED

Sent when a user that has been sent an invitation is able to link their work account successfully.

{
  "id": "et-123abc456def789abc123def456abc78",
  "version": 1,
  "type": "INVITE_LINKED",
  "createdAt": "2021-04-14T09:30:24Z",
  "data": {
    "userId": "tenantId-123abc456def789abc123def456abc78",
    "inviteId": "iv-123abc456def789abc123def456abc78"
  }
}