Go To Top

Invitation API

This API endpoint triggers an email invitation. Use the redirect parameter to pass in a product review invitation link. preferredSendTime must be in UTC if specified.

POST
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/invitations
Parameters
businessUnitId, Required String.
The ID of the business unit.
Example: …/v1/private/business-units/507f191e810c19729de860ea/invitations

Request
{
  "referenceId": "inv00001",
  "tags": [
    "tag1",
    "tag2"
  ],
  "locale": "en-US",
  "recipientEmail": "john.doe@trustpilot.com",
  "senderEmail": "john.doe@trustpilot.com",
  "templateId": "507f191e810c19729de860ea",
  "replyTo": "john.doe@trustpilot.com",
  "recipientName": "John Doe",
  "preferredSendTime": "2013-09-07T13:37:00",
  "senderName": "John Doe",
  "redirectUri": "http://trustpilot.com"
}
Response
{
  "status": "success",
  "referenceId": "inv00001",
  "businessUnitId": "507f191e810c19729de860ea",
  "tags": [
    "tag1",
    "tag2"
  ],
  "locale": "en-US",
  "sentTime": "2013-09-07T13:37:00",
  "redirectUri": "http://trustpilot.com",
  "replyTo": "john.doe@trustpilot.com",
  "source": "kickstart",
  "businessUserId": "507f191e810c19729de860ea",
  "templateId": "507f191e810c19729de860ea",
  "createdTime": "2013-09-07T13:37:00",
  "preferredSendTime": "2013-09-07T13:37:00",
  "recipient": {
    "name": "John Doe",
    "email": "john.doe@trustpilot.com"
  },
  "id": "507f191e810c19729de860ea",
  "sender": {
    "email": "john.doe@trustpilot.com",
    "name": "John Doe"
  }
}

Generate a unique invitation link that can be sent to a consumer by email or website. Use the request parameter called redirectURI to take the user to a product review link after the user has left a service review.

POST
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/invitation-links
Parameters
businessUnitId, Required String.
The ID of the business unit.
Example: …/v1/private/business-units/507f191e810c19729de860ea/invitation-links

Request
{
  "referenceId": "inv00001",
  "name": "John Doe",
  "tags": [
    "tag1",
    "tag2"
  ],
  "locale": "en-US",
  "email": "john.doe@trustpilot.com",
  "redirectUri": "http://trustpilot.com"
}
Response
{
  "url": "https://www.trustpilot.com/evaluate/www.trustpilot.com",
  "id": "507f191e810c19729de860ea"
}

Returns a list of ID and Names of the templates available to be used in invitations. Includes both standard and custom templates.

GET
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/templates
Parameters
businessUnitId, Required String.
The ID of the business unit.
Example: …/v1/private/business-units/507f191e810c19729de860ea/templates

Response
{
  "templates": [
    {
      "isDefaultTemplate": true,
      "id": "507f191e810c19729de860ea",
      "name": "Standard template for English"
    }
  ]
}

Uses a specific template to render a preview of the email content for the invitation request

GET
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/templates/custom/{templateId}/preview
Parameters
businessUnitId, Required String.
The ID of the business unit.
Example: …/v1/private/business-units/507f191e810c19729de860ea/templates/custom/{templateId}/preview

templateId, Required String.
The ID of the template.
Example: …/v1/private/business-units/{businessUnitId}/templates/custom/507f191e810c19729de860ea/preview

customerName, Required String.
The name of the customer.
Example: ?customerName=John Snow

customerEmail, Required String.
The email of the customer
Example: ?customerEmail=customer@email.com

tld, Required String.
The Tld of the BusinessUnit
Example: ?tld=Tld

domainName, Required String.
The DomainName of the BusinessUnit
Example: ?domainName=www.business.com

language, Required String.
The language
Example: ?language=en-US

orderref, Required String.
The OrderReference number
Example: ?orderref=00044562

Response
{
  "body": "<html>...</html>",
  "isHtml": "true",
  "subject": "Trustpilot review invitation"
}