cURL
curl --request POST \
--url https://api.flare.io/firework/v2/organizations/{organization_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"surname": "<string>",
"email": "<string>",
"organization_member_permissions": {},
"user_permissions": {},
"memberships": [
{
"tenant_id": 123,
"is_readonly": true,
"role": "viewer"
}
],
"send_welcome_email": true
}
'import requests
url = "https://api.flare.io/firework/v2/organizations/{organization_id}/members"
payload = {
"name": "<string>",
"surname": "<string>",
"email": "<string>",
"organization_member_permissions": {},
"user_permissions": {},
"memberships": [
{
"tenant_id": 123,
"is_readonly": True,
"role": "viewer"
}
],
"send_welcome_email": 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({
name: '<string>',
surname: '<string>',
email: '<string>',
organization_member_permissions: {},
user_permissions: {},
memberships: [{tenant_id: 123, is_readonly: true, role: 'viewer'}],
send_welcome_email: true
})
};
fetch('https://api.flare.io/firework/v2/organizations/{organization_id}/members', 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.flare.io/firework/v2/organizations/{organization_id}/members",
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([
'name' => '<string>',
'surname' => '<string>',
'email' => '<string>',
'organization_member_permissions' => [
],
'user_permissions' => [
],
'memberships' => [
[
'tenant_id' => 123,
'is_readonly' => true,
'role' => 'viewer'
]
],
'send_welcome_email' => 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://api.flare.io/firework/v2/organizations/{organization_id}/members"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"email\": \"<string>\",\n \"organization_member_permissions\": {},\n \"user_permissions\": {},\n \"memberships\": [\n {\n \"tenant_id\": 123,\n \"is_readonly\": true,\n \"role\": \"viewer\"\n }\n ],\n \"send_welcome_email\": 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://api.flare.io/firework/v2/organizations/{organization_id}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"email\": \"<string>\",\n \"organization_member_permissions\": {},\n \"user_permissions\": {},\n \"memberships\": [\n {\n \"tenant_id\": 123,\n \"is_readonly\": true,\n \"role\": \"viewer\"\n }\n ],\n \"send_welcome_email\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flare.io/firework/v2/organizations/{organization_id}/members")
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 \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"email\": \"<string>\",\n \"organization_member_permissions\": {},\n \"user_permissions\": {},\n \"memberships\": [\n {\n \"tenant_id\": 123,\n \"is_readonly\": true,\n \"role\": \"viewer\"\n }\n ],\n \"send_welcome_email\": true\n}"
response = http.request(request)
puts response.read_body{
"member": {
"user": {
"id": 123,
"name": "<string>",
"surname": "<string>",
"email": "<string>",
"organization_member_permissions": {
"*": {}
},
"is_disabled": true,
"registered_at": "2023-11-07T05:31:56Z",
"urn": "<string>"
},
"tenant_count": 123
}
}{
"message": "<string>",
"code": "<string>"
}Organization Members
Create Organization Member
POST
/
firework
/
v2
/
organizations
/
{organization_id}
/
members
cURL
curl --request POST \
--url https://api.flare.io/firework/v2/organizations/{organization_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"surname": "<string>",
"email": "<string>",
"organization_member_permissions": {},
"user_permissions": {},
"memberships": [
{
"tenant_id": 123,
"is_readonly": true,
"role": "viewer"
}
],
"send_welcome_email": true
}
'import requests
url = "https://api.flare.io/firework/v2/organizations/{organization_id}/members"
payload = {
"name": "<string>",
"surname": "<string>",
"email": "<string>",
"organization_member_permissions": {},
"user_permissions": {},
"memberships": [
{
"tenant_id": 123,
"is_readonly": True,
"role": "viewer"
}
],
"send_welcome_email": 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({
name: '<string>',
surname: '<string>',
email: '<string>',
organization_member_permissions: {},
user_permissions: {},
memberships: [{tenant_id: 123, is_readonly: true, role: 'viewer'}],
send_welcome_email: true
})
};
fetch('https://api.flare.io/firework/v2/organizations/{organization_id}/members', 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.flare.io/firework/v2/organizations/{organization_id}/members",
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([
'name' => '<string>',
'surname' => '<string>',
'email' => '<string>',
'organization_member_permissions' => [
],
'user_permissions' => [
],
'memberships' => [
[
'tenant_id' => 123,
'is_readonly' => true,
'role' => 'viewer'
]
],
'send_welcome_email' => 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://api.flare.io/firework/v2/organizations/{organization_id}/members"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"email\": \"<string>\",\n \"organization_member_permissions\": {},\n \"user_permissions\": {},\n \"memberships\": [\n {\n \"tenant_id\": 123,\n \"is_readonly\": true,\n \"role\": \"viewer\"\n }\n ],\n \"send_welcome_email\": 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://api.flare.io/firework/v2/organizations/{organization_id}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"email\": \"<string>\",\n \"organization_member_permissions\": {},\n \"user_permissions\": {},\n \"memberships\": [\n {\n \"tenant_id\": 123,\n \"is_readonly\": true,\n \"role\": \"viewer\"\n }\n ],\n \"send_welcome_email\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flare.io/firework/v2/organizations/{organization_id}/members")
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 \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"email\": \"<string>\",\n \"organization_member_permissions\": {},\n \"user_permissions\": {},\n \"memberships\": [\n {\n \"tenant_id\": 123,\n \"is_readonly\": true,\n \"role\": \"viewer\"\n }\n ],\n \"send_welcome_email\": true\n}"
response = http.request(request)
puts response.read_body{
"member": {
"user": {
"id": 123,
"name": "<string>",
"surname": "<string>",
"email": "<string>",
"organization_member_permissions": {
"*": {}
},
"is_disabled": true,
"registered_at": "2023-11-07T05:31:56Z",
"urn": "<string>"
},
"tenant_count": 123
}
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I