Upload Accounts
curl --request POST \
--url https://api.lumos.com/v1/accounts:upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
{
"email": "jane.doe@example.com",
"entitlements": [
{
"name": "Admin",
"type": "Role",
"unique_identifier": "role-admin"
}
],
"first_name": "Jane",
"last_name": "Doe",
"status": "active",
"unique_identifier": "jane.doe@example.com"
}
],
"app_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890"
}
'import requests
url = "https://api.lumos.com/v1/accounts:upload"
payload = {
"accounts": [
{
"email": "jane.doe@example.com",
"entitlements": [
{
"name": "Admin",
"type": "Role",
"unique_identifier": "role-admin"
}
],
"first_name": "Jane",
"last_name": "Doe",
"status": "active",
"unique_identifier": "jane.doe@example.com"
}
],
"app_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890"
}
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({
accounts: [
{
email: 'jane.doe@example.com',
entitlements: [{name: 'Admin', type: 'Role', unique_identifier: 'role-admin'}],
first_name: 'Jane',
last_name: 'Doe',
status: 'active',
unique_identifier: 'jane.doe@example.com'
}
],
app_id: '1a2b3c4d-5e6f-7890-abcd-ef1234567890'
})
};
fetch('https://api.lumos.com/v1/accounts:upload', 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.lumos.com/v1/accounts:upload",
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([
'accounts' => [
[
'email' => 'jane.doe@example.com',
'entitlements' => [
[
'name' => 'Admin',
'type' => 'Role',
'unique_identifier' => 'role-admin'
]
],
'first_name' => 'Jane',
'last_name' => 'Doe',
'status' => 'active',
'unique_identifier' => 'jane.doe@example.com'
]
],
'app_id' => '1a2b3c4d-5e6f-7890-abcd-ef1234567890'
]),
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.lumos.com/v1/accounts:upload"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"email\": \"jane.doe@example.com\",\n \"entitlements\": [\n {\n \"name\": \"Admin\",\n \"type\": \"Role\",\n \"unique_identifier\": \"role-admin\"\n }\n ],\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"status\": \"active\",\n \"unique_identifier\": \"jane.doe@example.com\"\n }\n ],\n \"app_id\": \"1a2b3c4d-5e6f-7890-abcd-ef1234567890\"\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.lumos.com/v1/accounts:upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n {\n \"email\": \"jane.doe@example.com\",\n \"entitlements\": [\n {\n \"name\": \"Admin\",\n \"type\": \"Role\",\n \"unique_identifier\": \"role-admin\"\n }\n ],\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"status\": \"active\",\n \"unique_identifier\": \"jane.doe@example.com\"\n }\n ],\n \"app_id\": \"1a2b3c4d-5e6f-7890-abcd-ef1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumos.com/v1/accounts:upload")
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 \"accounts\": [\n {\n \"email\": \"jane.doe@example.com\",\n \"entitlements\": [\n {\n \"name\": \"Admin\",\n \"type\": \"Role\",\n \"unique_identifier\": \"role-admin\"\n }\n ],\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"status\": \"active\",\n \"unique_identifier\": \"jane.doe@example.com\"\n }\n ],\n \"app_id\": \"1a2b3c4d-5e6f-7890-abcd-ef1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"operation": {
"id": "<string>",
"done": true,
"result": {},
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
},
"metadata": {}
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Accounts
Upload Accounts
Uploads accounts to an app. The upload runs asynchronously: the request returns 202 Accepted with an operation. Poll GET /v1/operations/{id} until done is true to follow its status. Uploaded accounts whose email matches no user are still ingested; GET /v1/accounts lists them with a null user_id.
POST
/
v1
/
accounts:upload
Upload Accounts
curl --request POST \
--url https://api.lumos.com/v1/accounts:upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
{
"email": "jane.doe@example.com",
"entitlements": [
{
"name": "Admin",
"type": "Role",
"unique_identifier": "role-admin"
}
],
"first_name": "Jane",
"last_name": "Doe",
"status": "active",
"unique_identifier": "jane.doe@example.com"
}
],
"app_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890"
}
'import requests
url = "https://api.lumos.com/v1/accounts:upload"
payload = {
"accounts": [
{
"email": "jane.doe@example.com",
"entitlements": [
{
"name": "Admin",
"type": "Role",
"unique_identifier": "role-admin"
}
],
"first_name": "Jane",
"last_name": "Doe",
"status": "active",
"unique_identifier": "jane.doe@example.com"
}
],
"app_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890"
}
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({
accounts: [
{
email: 'jane.doe@example.com',
entitlements: [{name: 'Admin', type: 'Role', unique_identifier: 'role-admin'}],
first_name: 'Jane',
last_name: 'Doe',
status: 'active',
unique_identifier: 'jane.doe@example.com'
}
],
app_id: '1a2b3c4d-5e6f-7890-abcd-ef1234567890'
})
};
fetch('https://api.lumos.com/v1/accounts:upload', 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.lumos.com/v1/accounts:upload",
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([
'accounts' => [
[
'email' => 'jane.doe@example.com',
'entitlements' => [
[
'name' => 'Admin',
'type' => 'Role',
'unique_identifier' => 'role-admin'
]
],
'first_name' => 'Jane',
'last_name' => 'Doe',
'status' => 'active',
'unique_identifier' => 'jane.doe@example.com'
]
],
'app_id' => '1a2b3c4d-5e6f-7890-abcd-ef1234567890'
]),
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.lumos.com/v1/accounts:upload"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"email\": \"jane.doe@example.com\",\n \"entitlements\": [\n {\n \"name\": \"Admin\",\n \"type\": \"Role\",\n \"unique_identifier\": \"role-admin\"\n }\n ],\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"status\": \"active\",\n \"unique_identifier\": \"jane.doe@example.com\"\n }\n ],\n \"app_id\": \"1a2b3c4d-5e6f-7890-abcd-ef1234567890\"\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.lumos.com/v1/accounts:upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n {\n \"email\": \"jane.doe@example.com\",\n \"entitlements\": [\n {\n \"name\": \"Admin\",\n \"type\": \"Role\",\n \"unique_identifier\": \"role-admin\"\n }\n ],\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"status\": \"active\",\n \"unique_identifier\": \"jane.doe@example.com\"\n }\n ],\n \"app_id\": \"1a2b3c4d-5e6f-7890-abcd-ef1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumos.com/v1/accounts:upload")
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 \"accounts\": [\n {\n \"email\": \"jane.doe@example.com\",\n \"entitlements\": [\n {\n \"name\": \"Admin\",\n \"type\": \"Role\",\n \"unique_identifier\": \"role-admin\"\n }\n ],\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"status\": \"active\",\n \"unique_identifier\": \"jane.doe@example.com\"\n }\n ],\n \"app_id\": \"1a2b3c4d-5e6f-7890-abcd-ef1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"operation": {
"id": "<string>",
"done": true,
"result": {},
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
},
"metadata": {}
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
202 response body for endpoints that launch an operation.
The launched operation.
Show child attributes
Show child attributes
Was this page helpful?