Get or Create
Get or Create End User
POST
https://api.explo.co/api/create_end_user/
This endpoint gets or creates an end user. If the provided_id does not exist for the provided end_user_group_id, a new end user will be created and information about the user will be sent back. If the provided_id does exist for the end_user_group_id, the existing user will be returned.
Headers
Explo-Authorization*
string
API authorization token which is unique to your team. You can access this in the Developers tab in your account.
Request Body
provided_id*
string
The ID you use to identify this end user in your databae
email*
string
The email adress of your end user
end_user_group_id*
number
The ID of the end user group the new user should belong to
attributes
json
A json mapping of key values you can use to load user-specific data into your dashboards. Any key value is valid, but header and footer are reserved keys that you can use to load html to display in the header and footer of your email
{
"success": 1,
"end_user": {
"provided_id": 3,
"email": "example@explo.co",
"attributes": "{'name': 'Example', 'header': '<div/>'",
}}
Response field descriptions
Field Name
Type
Description
success
number
Indicates whether the call was successful. 1 if successful, 0 if not.
end_user.provided_id
string
This was the provided_id provided in the request body
end_user.emai
string
This was the email provided in the request body
end_user.attributes
string
This was the set of attributes provided in the request body
Example Request
curl --location --request POST 'https://api.explo.co/api/create_end_user/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
"provided_id": "example_1",
"email": "example@explo.co",
"end_user_group_id": 123
}'
Last updated
Was this helpful?