Create a customer organization
curl --request POST \
--url https://eu.sequencehq.com/api/customer-organizations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerId": "50af5191-05a3-42a5-802a-6b59091157af",
"memberIds": [
"e309e948-088e-4d77-b654-cd85498f1555",
"50af5191-05a3-42a5-802a-6b59091157af"
]
}
'import requests
url = "https://eu.sequencehq.com/api/customer-organizations"
payload = {
"ownerId": "50af5191-05a3-42a5-802a-6b59091157af",
"memberIds": ["e309e948-088e-4d77-b654-cd85498f1555", "50af5191-05a3-42a5-802a-6b59091157af"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ownerId: '50af5191-05a3-42a5-802a-6b59091157af',
memberIds: ['e309e948-088e-4d77-b654-cd85498f1555', '50af5191-05a3-42a5-802a-6b59091157af']
})
};
fetch('https://eu.sequencehq.com/api/customer-organizations', 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://eu.sequencehq.com/api/customer-organizations",
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([
'ownerId' => '50af5191-05a3-42a5-802a-6b59091157af',
'memberIds' => [
'e309e948-088e-4d77-b654-cd85498f1555',
'50af5191-05a3-42a5-802a-6b59091157af'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://eu.sequencehq.com/api/customer-organizations"
payload := strings.NewReader("{\n \"ownerId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"memberIds\": [\n \"e309e948-088e-4d77-b654-cd85498f1555\",\n \"50af5191-05a3-42a5-802a-6b59091157af\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://eu.sequencehq.com/api/customer-organizations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"ownerId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"memberIds\": [\n \"e309e948-088e-4d77-b654-cd85498f1555\",\n \"50af5191-05a3-42a5-802a-6b59091157af\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/customer-organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ownerId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"memberIds\": [\n \"e309e948-088e-4d77-b654-cd85498f1555\",\n \"50af5191-05a3-42a5-802a-6b59091157af\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "c0dc4e79-ec52-4811-8cf5-addb2527915c",
"owner": {
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
},
"members": [
{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"name": "Fintech Payment Processing"
},
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "Fintech Lending Services"
}
]
}This response has no body data.This response has no body data.This response has no body data.Organizations
Create a customer organization
Create a customer organization to manage parent-child relationships for your customers.
POST
/
customer-organizations
Create a customer organization
curl --request POST \
--url https://eu.sequencehq.com/api/customer-organizations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerId": "50af5191-05a3-42a5-802a-6b59091157af",
"memberIds": [
"e309e948-088e-4d77-b654-cd85498f1555",
"50af5191-05a3-42a5-802a-6b59091157af"
]
}
'import requests
url = "https://eu.sequencehq.com/api/customer-organizations"
payload = {
"ownerId": "50af5191-05a3-42a5-802a-6b59091157af",
"memberIds": ["e309e948-088e-4d77-b654-cd85498f1555", "50af5191-05a3-42a5-802a-6b59091157af"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ownerId: '50af5191-05a3-42a5-802a-6b59091157af',
memberIds: ['e309e948-088e-4d77-b654-cd85498f1555', '50af5191-05a3-42a5-802a-6b59091157af']
})
};
fetch('https://eu.sequencehq.com/api/customer-organizations', 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://eu.sequencehq.com/api/customer-organizations",
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([
'ownerId' => '50af5191-05a3-42a5-802a-6b59091157af',
'memberIds' => [
'e309e948-088e-4d77-b654-cd85498f1555',
'50af5191-05a3-42a5-802a-6b59091157af'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://eu.sequencehq.com/api/customer-organizations"
payload := strings.NewReader("{\n \"ownerId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"memberIds\": [\n \"e309e948-088e-4d77-b654-cd85498f1555\",\n \"50af5191-05a3-42a5-802a-6b59091157af\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://eu.sequencehq.com/api/customer-organizations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"ownerId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"memberIds\": [\n \"e309e948-088e-4d77-b654-cd85498f1555\",\n \"50af5191-05a3-42a5-802a-6b59091157af\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/customer-organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ownerId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"memberIds\": [\n \"e309e948-088e-4d77-b654-cd85498f1555\",\n \"50af5191-05a3-42a5-802a-6b59091157af\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "c0dc4e79-ec52-4811-8cf5-addb2527915c",
"owner": {
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
},
"members": [
{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"name": "Fintech Payment Processing"
},
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "Fintech Lending Services"
}
]
}This response has no body data.This response has no body data.This response has no body data.Headers
Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
Available options:
2024-07-30 Body
application/json
ID of the customer that will own the organization.
Example:
"50af5191-05a3-42a5-802a-6b59091157af"
IDs of the customers who are members of this organization, excluding the owner. These are the children in a parent-child relationship. You can pass an empty array if they are not yet known.
Example:
[
"e309e948-088e-4d77-b654-cd85498f1555",
"50af5191-05a3-42a5-802a-6b59091157af"
]
Response
Created
Organization ID
Example:
"c0dc4e79-ec52-4811-8cf5-addb2527915c"
ID of the customer that will own the organization.
Show child attributes
Show child attributes
Example:
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
}
Members of the customer organization, excluding the owner. These are the children in a parent-child relationship.
Show child attributes
Show child attributes
Example:
[
{
"id": "e06f36e2-0a44-404d-bdbc-b66a292609b0",
"name": "FinTech Wealth Management"
}
]
⌘I