Invite somebody by email
curl --request POST \
--url http://127.0.0.1:8765/people/invite \
--header 'Content-Type: application/json' \
--header 'x-engine-capability: <x-engine-capability>' \
--data '
{
"email": "jsmith@example.com",
"apps": [
"<string>"
]
}
'import requests
url = "http://127.0.0.1:8765/people/invite"
payload = {
"email": "jsmith@example.com",
"apps": ["<string>"]
}
headers = {
"x-engine-capability": "<x-engine-capability>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-engine-capability': '<x-engine-capability>',
'Content-Type': 'application/json'
},
body: JSON.stringify({email: 'jsmith@example.com', apps: ['<string>']})
};
fetch('http://127.0.0.1:8765/people/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8765",
CURLOPT_URL => "http://127.0.0.1:8765/people/invite",
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([
'email' => 'jsmith@example.com',
'apps' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-engine-capability: <x-engine-capability>"
],
]);
$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 := "http://127.0.0.1:8765/people/invite"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"apps\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-engine-capability", "<x-engine-capability>")
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("http://127.0.0.1:8765/people/invite")
.header("x-engine-capability", "<x-engine-capability>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"apps\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8765/people/invite")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-engine-capability"] = '<x-engine-capability>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"apps\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"status": "pending",
"url": "<string>"
}Sends an invitation naming the apps it grants and their address. The grant is written immediately, so the app is reachable the moment they accept.
Apps must be ones this computer actually serves; anything else is refused rather than quietly dropped. Rate-limited on the same budget as sign-in links — a 429 here is a 429 upstream.
POST
/
people
/
invite
Invite somebody by email
curl --request POST \
--url http://127.0.0.1:8765/people/invite \
--header 'Content-Type: application/json' \
--header 'x-engine-capability: <x-engine-capability>' \
--data '
{
"email": "jsmith@example.com",
"apps": [
"<string>"
]
}
'import requests
url = "http://127.0.0.1:8765/people/invite"
payload = {
"email": "jsmith@example.com",
"apps": ["<string>"]
}
headers = {
"x-engine-capability": "<x-engine-capability>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-engine-capability': '<x-engine-capability>',
'Content-Type': 'application/json'
},
body: JSON.stringify({email: 'jsmith@example.com', apps: ['<string>']})
};
fetch('http://127.0.0.1:8765/people/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8765",
CURLOPT_URL => "http://127.0.0.1:8765/people/invite",
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([
'email' => 'jsmith@example.com',
'apps' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-engine-capability: <x-engine-capability>"
],
]);
$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 := "http://127.0.0.1:8765/people/invite"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"apps\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-engine-capability", "<x-engine-capability>")
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("http://127.0.0.1:8765/people/invite")
.header("x-engine-capability", "<x-engine-capability>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"apps\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8765/people/invite")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-engine-capability"] = '<x-engine-capability>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"apps\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"status": "pending",
"url": "<string>"
}Headers
The capability returned by POST /engine/register. Minted per engine run; one from a previous run is worthless.
Body
application/json
⌘I