Skip to main content
GET
/
v1
/
user
/
{distinct_id}
/
Fetch User by id
curl --request GET \
  --url https://hub.suprsend.com/v1/user/{distinct_id}/ \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://hub.suprsend.com/v1/user/{distinct_id}/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://hub.suprsend.com/v1/user/{distinct_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://hub.suprsend.com/v1/user/{distinct_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://hub.suprsend.com/v1/user/{distinct_id}/"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://hub.suprsend.com/v1/user/{distinct_id}/")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://hub.suprsend.com/v1/user/{distinct_id}/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "distinct_id": "_distinct_id_",
  "properties": {
    "$locale": "en_GB",
    "$timezone": "America/New_York"
  },
  "created_at": "2025-04-04T21:37:36.712496+00:00",
  "updated_at": "2025-04-04T21:37:36.743167+00:00",
  "$email": [
    {
      "value": "john@example.com",
      "status": "active",
      "perma_status": "active"
    }
  ],
  "$inbox": [
    {
      "value": "4nlPk4t4kurG5kChOELB8Q1LcDI9DHzHQ70st2E2C24",
      "id_provider": "suprsend",
      "status": "active",
      "perma_status": "active"
    }
  ]
}
{
"code": 400,
"message": "invalid_request_error"
}

Authorizations

Authorization
string
header
required

Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.

Path Parameters

distinct_id
string
required

Unique identifier of the user in your system

Response

200

distinct_id
string

Unique identifier of the user.

Example:

"_distinct_id_"

properties
object

all user properties in key-value pair. SuprSend reserved properties start with $

created_at
string<date-time>

Timestamp when the user was created.

Example:

"2025-04-04T09:55:12.397Z"

updated_at
string<date-time>

Timestamp when the user was last updated.

Example:

"2025-04-04T09:55:12.422Z"

$<channel>
object[]

List of active communication channels for the user.