curl --request POST \
--url https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"people": [
{
"email": "dev@rallyuxr.com",
"phone": "+1 415 777-7777",
"firstName": "Dev",
"lastName": "Rally",
"isOptedOut": false,
"lastContactDate": "2025-01-01",
"additionalEmails": [
"dev+1@rallyuxr.com"
],
"additionalPhones": [
"+1-555-123-4568"
],
"properties": [
{
"propertyId": "cm0b4eokq000vbbsimwelll3u",
"value": "2025-01-01"
},
{
"name": "Favorite Color",
"propertyType": "STRING",
"value": "Blue"
}
]
}
]
}
'import requests
url = "https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import"
payload = { "people": [
{
"email": "dev@rallyuxr.com",
"phone": "+1 415 777-7777",
"firstName": "Dev",
"lastName": "Rally",
"isOptedOut": False,
"lastContactDate": "2025-01-01",
"additionalEmails": ["dev+1@rallyuxr.com"],
"additionalPhones": ["+1-555-123-4568"],
"properties": [
{
"propertyId": "cm0b4eokq000vbbsimwelll3u",
"value": "2025-01-01"
},
{
"name": "Favorite Color",
"propertyType": "STRING",
"value": "Blue"
}
]
}
] }
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({
people: [
{
email: 'dev@rallyuxr.com',
phone: '+1 415 777-7777',
firstName: 'Dev',
lastName: 'Rally',
isOptedOut: false,
lastContactDate: '2025-01-01',
additionalEmails: ['dev+1@rallyuxr.com'],
additionalPhones: ['+1-555-123-4568'],
properties: [
{propertyId: 'cm0b4eokq000vbbsimwelll3u', value: '2025-01-01'},
{name: 'Favorite Color', propertyType: 'STRING', value: 'Blue'}
]
}
]
})
};
fetch('https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import', 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.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import",
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([
'people' => [
[
'email' => 'dev@rallyuxr.com',
'phone' => '+1 415 777-7777',
'firstName' => 'Dev',
'lastName' => 'Rally',
'isOptedOut' => false,
'lastContactDate' => '2025-01-01',
'additionalEmails' => [
'dev+1@rallyuxr.com'
],
'additionalPhones' => [
'+1-555-123-4568'
],
'properties' => [
[
'propertyId' => 'cm0b4eokq000vbbsimwelll3u',
'value' => '2025-01-01'
],
[
'name' => 'Favorite Color',
'propertyType' => 'STRING',
'value' => 'Blue'
]
]
]
]
]),
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.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import"
payload := strings.NewReader("{\n \"people\": [\n {\n \"email\": \"dev@rallyuxr.com\",\n \"phone\": \"+1 415 777-7777\",\n \"firstName\": \"Dev\",\n \"lastName\": \"Rally\",\n \"isOptedOut\": false,\n \"lastContactDate\": \"2025-01-01\",\n \"additionalEmails\": [\n \"dev+1@rallyuxr.com\"\n ],\n \"additionalPhones\": [\n \"+1-555-123-4568\"\n ],\n \"properties\": [\n {\n \"propertyId\": \"cm0b4eokq000vbbsimwelll3u\",\n \"value\": \"2025-01-01\"\n },\n {\n \"name\": \"Favorite Color\",\n \"propertyType\": \"STRING\",\n \"value\": \"Blue\"\n }\n ]\n }\n ]\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.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"people\": [\n {\n \"email\": \"dev@rallyuxr.com\",\n \"phone\": \"+1 415 777-7777\",\n \"firstName\": \"Dev\",\n \"lastName\": \"Rally\",\n \"isOptedOut\": false,\n \"lastContactDate\": \"2025-01-01\",\n \"additionalEmails\": [\n \"dev+1@rallyuxr.com\"\n ],\n \"additionalPhones\": [\n \"+1-555-123-4568\"\n ],\n \"properties\": [\n {\n \"propertyId\": \"cm0b4eokq000vbbsimwelll3u\",\n \"value\": \"2025-01-01\"\n },\n {\n \"name\": \"Favorite Color\",\n \"propertyType\": \"STRING\",\n \"value\": \"Blue\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import")
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 \"people\": [\n {\n \"email\": \"dev@rallyuxr.com\",\n \"phone\": \"+1 415 777-7777\",\n \"firstName\": \"Dev\",\n \"lastName\": \"Rally\",\n \"isOptedOut\": false,\n \"lastContactDate\": \"2025-01-01\",\n \"additionalEmails\": [\n \"dev+1@rallyuxr.com\"\n ],\n \"additionalPhones\": [\n \"+1-555-123-4568\"\n ],\n \"properties\": [\n {\n \"propertyId\": \"cm0b4eokq000vbbsimwelll3u\",\n \"value\": \"2025-01-01\"\n },\n {\n \"name\": \"Favorite Color\",\n \"propertyType\": \"STRING\",\n \"value\": \"Blue\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"count": 123,
"importId": "<string>"
}{
"errors": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}UnauthorizedForbiddenToo Many RequestsInternal Server ErrorImport participants to a study
Import persons into a study. Supports all import properties within a person and also adds them as a participant. If the person is found then they are updated with any information included in here. Internal properties are on the person object and custom properties can be specified either with the id of the property or an object that contains the name and property type. If a property with that name already exists then it will be used with no modification, if it does not exist then then property will be created before the import begins.
curl --request POST \
--url https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"people": [
{
"email": "dev@rallyuxr.com",
"phone": "+1 415 777-7777",
"firstName": "Dev",
"lastName": "Rally",
"isOptedOut": false,
"lastContactDate": "2025-01-01",
"additionalEmails": [
"dev+1@rallyuxr.com"
],
"additionalPhones": [
"+1-555-123-4568"
],
"properties": [
{
"propertyId": "cm0b4eokq000vbbsimwelll3u",
"value": "2025-01-01"
},
{
"name": "Favorite Color",
"propertyType": "STRING",
"value": "Blue"
}
]
}
]
}
'import requests
url = "https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import"
payload = { "people": [
{
"email": "dev@rallyuxr.com",
"phone": "+1 415 777-7777",
"firstName": "Dev",
"lastName": "Rally",
"isOptedOut": False,
"lastContactDate": "2025-01-01",
"additionalEmails": ["dev+1@rallyuxr.com"],
"additionalPhones": ["+1-555-123-4568"],
"properties": [
{
"propertyId": "cm0b4eokq000vbbsimwelll3u",
"value": "2025-01-01"
},
{
"name": "Favorite Color",
"propertyType": "STRING",
"value": "Blue"
}
]
}
] }
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({
people: [
{
email: 'dev@rallyuxr.com',
phone: '+1 415 777-7777',
firstName: 'Dev',
lastName: 'Rally',
isOptedOut: false,
lastContactDate: '2025-01-01',
additionalEmails: ['dev+1@rallyuxr.com'],
additionalPhones: ['+1-555-123-4568'],
properties: [
{propertyId: 'cm0b4eokq000vbbsimwelll3u', value: '2025-01-01'},
{name: 'Favorite Color', propertyType: 'STRING', value: 'Blue'}
]
}
]
})
};
fetch('https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import', 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.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import",
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([
'people' => [
[
'email' => 'dev@rallyuxr.com',
'phone' => '+1 415 777-7777',
'firstName' => 'Dev',
'lastName' => 'Rally',
'isOptedOut' => false,
'lastContactDate' => '2025-01-01',
'additionalEmails' => [
'dev+1@rallyuxr.com'
],
'additionalPhones' => [
'+1-555-123-4568'
],
'properties' => [
[
'propertyId' => 'cm0b4eokq000vbbsimwelll3u',
'value' => '2025-01-01'
],
[
'name' => 'Favorite Color',
'propertyType' => 'STRING',
'value' => 'Blue'
]
]
]
]
]),
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.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import"
payload := strings.NewReader("{\n \"people\": [\n {\n \"email\": \"dev@rallyuxr.com\",\n \"phone\": \"+1 415 777-7777\",\n \"firstName\": \"Dev\",\n \"lastName\": \"Rally\",\n \"isOptedOut\": false,\n \"lastContactDate\": \"2025-01-01\",\n \"additionalEmails\": [\n \"dev+1@rallyuxr.com\"\n ],\n \"additionalPhones\": [\n \"+1-555-123-4568\"\n ],\n \"properties\": [\n {\n \"propertyId\": \"cm0b4eokq000vbbsimwelll3u\",\n \"value\": \"2025-01-01\"\n },\n {\n \"name\": \"Favorite Color\",\n \"propertyType\": \"STRING\",\n \"value\": \"Blue\"\n }\n ]\n }\n ]\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.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"people\": [\n {\n \"email\": \"dev@rallyuxr.com\",\n \"phone\": \"+1 415 777-7777\",\n \"firstName\": \"Dev\",\n \"lastName\": \"Rally\",\n \"isOptedOut\": false,\n \"lastContactDate\": \"2025-01-01\",\n \"additionalEmails\": [\n \"dev+1@rallyuxr.com\"\n ],\n \"additionalPhones\": [\n \"+1-555-123-4568\"\n ],\n \"properties\": [\n {\n \"propertyId\": \"cm0b4eokq000vbbsimwelll3u\",\n \"value\": \"2025-01-01\"\n },\n {\n \"name\": \"Favorite Color\",\n \"propertyType\": \"STRING\",\n \"value\": \"Blue\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallyuxr.com/api/public/v1/studies/{studyId}/participants/import")
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 \"people\": [\n {\n \"email\": \"dev@rallyuxr.com\",\n \"phone\": \"+1 415 777-7777\",\n \"firstName\": \"Dev\",\n \"lastName\": \"Rally\",\n \"isOptedOut\": false,\n \"lastContactDate\": \"2025-01-01\",\n \"additionalEmails\": [\n \"dev+1@rallyuxr.com\"\n ],\n \"additionalPhones\": [\n \"+1-555-123-4568\"\n ],\n \"properties\": [\n {\n \"propertyId\": \"cm0b4eokq000vbbsimwelll3u\",\n \"value\": \"2025-01-01\"\n },\n {\n \"name\": \"Favorite Color\",\n \"propertyType\": \"STRING\",\n \"value\": \"Blue\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"count": 123,
"importId": "<string>"
}{
"errors": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}UnauthorizedForbiddenToo Many RequestsInternal Server ErrorAuthorizations
Body
Takes an object that contains an array of people to import. Internal properties are on the person object and custom properties can be specified either with the id of the property or an object that contains the name and property type. If a property with that name already exists then it will be used with no modification, if it does not exist then then property will be created before the import begins.