📘

In earlier API versions "End User Identifier" was referred to as "User GUID"

You may find it useful to partition your API usage data by your end users. If you are offering an unlimited previews facility to your users, we need to be able to identify the number of unique users of your application.

To do this, you can associate emails (and, as a consequence, any previews), with a unique identifier of your choosing—an end_user_id.

🚧

The identifier used must be unique to that user. The identifier should be stored in a unique field within your database and should not change for the life of that user’s account.

This information is never shared with anyone, not even your user. It will only be shown in your billing reports and confirmed in the response to a POST request that provides it.

Do not use a hash of your user’s details unless you can ensure that this will remain unchanged and unique for that user. You'll want to refrain from hashing user details because, by doing so, a hash of their email address could change over time and cause them to be identified twice in one month.

Standard UUIDs make a good choice for this field, but any uniquely identifying string of 64 characters or less may be used.

# An example of identifying an end user when POSTing a new email

$ curl -X "POST" "https://instant-api.litmus.com/v1/emails" \
  -H "Content-Type: application/json" \
  -u "$API_KEY:" \
  -d "{\"plain_text\":\"Hello World\",\"end_user_id\":\"a5725576-07d5-4e28-9e6c-2f1851825c14\"}" -v
> POST /v1/emails HTTP/1.1
> User-Agent: curl/7.37.1
> Host: instant-api.litmus.com
> Accept: */*
> Content-Type: application/json
> Authorization: Basic XXXXXXXXXXXXXXXXXXXXXX
> Content-Length: 28
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 16 Jul 2015 12:35:02 GMT
< Content-Type: application/json;charset=utf-8
< Content-Length: 58
< Connection: keep-alive
< Strict-Transport-Security: max-age=3600;
<
{
  "email_guid": "ce6ba90f-cf28-4772-ab09-30a1d48a5e12",
  "end_user_id": "a5725576-07d5-4e28-9e6c-2f1851825c14"
}