The article explains how to create or update guest records in the Stampede CRM via an API request. Using the POST method to the specified URL, a guest's existence is determined by their email address. Required JSON fields include email and privacy preferences, while optional fields include first and last names, gender, and phone number. The response returns various identifiers and timestamps. Examples demonstrate how to initially create a record with minimum data and how to update existing records by modifying the JSON payload, such as changing marketing preferences.
This request will create a new guest record in the Stampede CRM for the organisation you are authorised to access via the API. When updating guests, we use the same method as creating a new record. Our system will recognise if the guest exists based on the email address.
Request
Method: POST
URL: https://global.stampede.ai/v1/guests/
Auth: Bearer token
The following values may be sent as JSON in the body of the request.
Name | Type | Required | Description |
---|---|---|---|
String | Yes | The guest email address inb a valid format | |
first | String | No | The first name of the guest |
last | String | No | The last name of the guest |
privacy.data | Boolean | Yes | Is the user opted in to sharing their data |
privacy.marketing.email | Boolean | Yes | Is the user opted in to email marketing |
privacy.marketing.sms | Boolean | Yes | Is the user opted in to SMS marketing |
gender | "m" | "f" | "o" | No | The gender of the guest |
phone | E.164 | No | The phone number for the guest in E.164 format |
Response
{ id: string; organization_id: string; profile_id: number; last_interacted_at: string; created_at: string; data_opt_in_at: string; sms_opt_in_at: string; email_opt_in_at: string; user_profile: { first: string | null; last: string | null; email: string; id: number; }; };
Examples
When creating a new guest record, we do need at the very least their email and privacy choices. The JSON payload below is the bare minimum that can be sent:
{ "email": "email@domain.com", "first": "Fred", "last": "Flintstone", "privacy": { "data": true, "marketing":{ "email": true, "sms": true } } }
Once a guest record exists, sending the same payload structure will result in an update to the existing record identified by the email address. So if a guest unsubscribes from email marketing but retains SMS permissions, the payload would change to:
{ "email": "email@domain.com", "first": "Fred", "last": "Flintstone", "privacy": { "data": true, "marketing":{ "email": false, "sms": true } } }
The same applies to other fields such as name or phone number.
Comments
0 comments
Please sign in to leave a comment.