Create invites for employees and contractors
curl --request POST \
--url https://b2b-api.dev-riseworks.io/v2/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nanoid": "<string>",
"invites": [
{
"email": "jsmith@example.com"
}
],
"anonymous": true
}
'import requests
url = "https://b2b-api.dev-riseworks.io/v2/invites"
payload = {
"nanoid": "<string>",
"invites": [{ "email": "jsmith@example.com" }],
"anonymous": True
}
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({nanoid: '<string>', invites: [{email: 'jsmith@example.com'}], anonymous: true})
};
fetch('https://b2b-api.dev-riseworks.io/v2/invites', 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://b2b-api.dev-riseworks.io/v2/invites",
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([
'nanoid' => '<string>',
'invites' => [
[
'email' => 'jsmith@example.com'
]
],
'anonymous' => true
]),
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://b2b-api.dev-riseworks.io/v2/invites"
payload := strings.NewReader("{\n \"nanoid\": \"<string>\",\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"anonymous\": true\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://b2b-api.dev-riseworks.io/v2/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nanoid\": \"<string>\",\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"anonymous\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b-api.dev-riseworks.io/v2/invites")
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 \"nanoid\": \"<string>\",\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"anonymous\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"nanoids": [
"<string>"
]
}
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}B2B Invites
Create invites for employees and contractors
Create invites/warm invites for employees and contractors. This is used to invite users to team.
POST
/
v2
/
invites
Create invites for employees and contractors
curl --request POST \
--url https://b2b-api.dev-riseworks.io/v2/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nanoid": "<string>",
"invites": [
{
"email": "jsmith@example.com"
}
],
"anonymous": true
}
'import requests
url = "https://b2b-api.dev-riseworks.io/v2/invites"
payload = {
"nanoid": "<string>",
"invites": [{ "email": "jsmith@example.com" }],
"anonymous": True
}
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({nanoid: '<string>', invites: [{email: 'jsmith@example.com'}], anonymous: true})
};
fetch('https://b2b-api.dev-riseworks.io/v2/invites', 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://b2b-api.dev-riseworks.io/v2/invites",
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([
'nanoid' => '<string>',
'invites' => [
[
'email' => 'jsmith@example.com'
]
],
'anonymous' => true
]),
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://b2b-api.dev-riseworks.io/v2/invites"
payload := strings.NewReader("{\n \"nanoid\": \"<string>\",\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"anonymous\": true\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://b2b-api.dev-riseworks.io/v2/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nanoid\": \"<string>\",\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"anonymous\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b-api.dev-riseworks.io/v2/invites")
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 \"nanoid\": \"<string>\",\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"anonymous\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"nanoids": [
"<string>"
]
}
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Identifier of a Rise team (a workspace below a company). 15-character nanoid prefixed with te-.
Required string length:
15Pattern:
^te-.*Show child attributes
Show child attributes
Available options:
contractor, team_employee, aor_contractor ⌘I
