Skip to main content
POST
/
api
/
public
/
v1
/
participants
/
Create Participant
curl --request POST \
  --url https://api.userintuition.ai/api/public/v1/participants/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "study_id": "<string>",
  "email": "jsmith@example.com",
  "silent": false
}
'
import requests

url = "https://api.userintuition.ai/api/public/v1/participants/"

payload = {
"study_id": "<string>",
"email": "jsmith@example.com",
"silent": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({study_id: '<string>', email: 'jsmith@example.com', silent: false})
};

fetch('https://api.userintuition.ai/api/public/v1/participants/', 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://api.userintuition.ai/api/public/v1/participants/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'study_id' => '<string>',
'email' => 'jsmith@example.com',
'silent' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api.userintuition.ai/api/public/v1/participants/"

payload := strings.NewReader("{\n \"study_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"silent\": false\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.userintuition.ai/api/public/v1/participants/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"study_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"silent\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.userintuition.ai/api/public/v1/participants/")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"study_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"silent\": false\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "study_id": "<string>",
  "email": "<string>",
  "panel_status": "<string>",
  "reward_sent": true,
  "reward_sent_at": "2023-11-07T05:31:56Z",
  "sent_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Authenticate with an API key (prefixed ui_sk_) or a JWT token from the dashboard.

Body

application/json
study_id
string
required

The study to invite this participant to

email
string<email> | null
silent
boolean | null
default:false

Skip sending the invitation email

Response

Successful Response

id
string
required
study_id
string | null

The study this participant belongs to

email
string | null
panel_status
string | null

Panel lifecycle status, if a panel participant

reward_sent
boolean | null
reward_sent_at
string<date-time> | null
sent_at
string<date-time> | null
created_at
string<date-time> | null