Education Library
External Webhook
We expose Lead API Endpoint to send data to our system, which is available here:POST https://portal.redspotinteractive.com/api/v2/leads/webhookThe endpoint accepts JSON data as shown in the example below:
{
"campaignId": 12389,
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"email": "johndoe@example.com",
"birthDate": "01-01-1990",
"phone": "1234567890",
"zipCode": "12345",
"message": "This is a message",
"location": "New York",
"provider": "ABC Provider",
"procedure": "XYZ Procedure",
// we can also capture UTM tags for lead
"utmCampaign": "campaign123",
"utmSource": "facebook",
"utmMedium": "social",
"utmContent": "awesome content",
"utmTerm": "this is a term",
// if Lead came from Google Ad we can capture gclid (GoogleClickId) to import conversion from RSI
"googleClickId": "1234qwerty",
// additional optional property which allows to identify the webform where the lead was submitted from
"formName": "ContactUsForm",
// you can send attachments with lead if needed
"attachments": [
{
"fileName": "test.pdf",
"mimeType": "application/pdf",
"base64Content": "file content as base 64 string"
}
]
}
Required properties:
CampaignId – campaign ID generated in the RSI platform in the Campaign Manager
FirstName – required if FullName is not provided
and
LastName – required if FullName is not provided
or
FullName – required if FirstName and LastName are not provided
Email – required if Phone is not provided
or
Phone – required if Email is not provided.
Note: RSI will only accept 10-digit phone number formats. Country codes must be removed otherwise the last digits of the phone number will be cut off.
The full list of RSI Webhook Payload Fields are as follows:
RSI_WebhookPayloadFieldReferenceTable
Attachment mime types can be found here https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
Security
The POST request must include the following HTTP headers:- X-RSI-API-KEY – this is the API key, and will be the same for all Clients. Now we can use this value:
rHIgSeRBQLr3kJzVgeRDFkI4y4kqvFNH7DAWqAtTkiVMOJqPYP3W8ygUUkhW0FUH
- X-RSI-CLIENT-ID – RSI Client Id identification. Provided by RSI team
- X-RSI-SIGNATURE – this is a hexadecimal representation of the hash computed with SHA-512 having RSI string as the secret key. The value is constant – once generated you can use one for different sources.
RSI Request Signature Generation
To generate a valid RSI Signature you need:- Obtain you ClientId and ClientRsiApiSignatureToken from the RSI customer success team.
- Combine them together in one string separated with a colon.
- Use SHA-512 hash generator to compute hash with the ‘RSI’ string as the secret key and combined string above as body.
int clientId = <USE_YOUR_CLIENT_ID>;
string clientSignatureToken = <USE_YOUR_SIGNATURE_TOKEN>;
string hashBody = $"{clientId}:{clientSignatureToken}";
string computedSignature = SHA512Hasher.ComputeHexHash(hashBody, "RSI");
Every language has its own libraries to work with SHA-512, so the code above will be easily replicated.
As an alternative, you can use online generation tools such as https://www.freeformatter.com/hmac-generator.html#before-output
The value which you will get once you click to Compute HMAC should be used as the X-RSI-SIGNATURE http header. The value is static and should be generated only ONCE.















