Skip to main content
POST
/
customer-organizations
/
{id}
/
members
Add a customer to a customer organization
curl --request POST \
  --url https://eu.sequencehq.com/api/customer-organizations/{id}/members \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerIds": [
    "e06f36e2-0a44-404d-bdbc-b66a292609b0"
  ]
}
'
import requests

url = "https://eu.sequencehq.com/api/customer-organizations/{id}/members"

payload = { "customerIds": ["e06f36e2-0a44-404d-bdbc-b66a292609b0"] }
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({customerIds: ['e06f36e2-0a44-404d-bdbc-b66a292609b0']})
};

fetch('https://eu.sequencehq.com/api/customer-organizations/{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://eu.sequencehq.com/api/customer-organizations/{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([
'customerIds' => [
'e06f36e2-0a44-404d-bdbc-b66a292609b0'
]
]),
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/{id}/members"

payload := strings.NewReader("{\n \"customerIds\": [\n \"e06f36e2-0a44-404d-bdbc-b66a292609b0\"\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/{id}/members")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customerIds\": [\n \"e06f36e2-0a44-404d-bdbc-b66a292609b0\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eu.sequencehq.com/api/customer-organizations/{id}/members")

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 \"customerIds\": [\n \"e06f36e2-0a44-404d-bdbc-b66a292609b0\"\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"
    },
    {
      "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0",
      "name": "FinTech Wealth Management"
    }
  ]
}
This response has no body data.
This response has no body data.
This response has no body data.

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

sequence-version
enum<string>

Use this header to select an API version

Available options:
2024-07-30

Path Parameters

id
string
required

Customer organisation ID

Body

application/json
customerIds
string[]
required

IDs of customers to add to an existing organization.

Example:
["e06f36e2-0a44-404d-bdbc-b66a292609b0"]

Response

OK

id
string
required

Organization ID

Example:

"c0dc4e79-ec52-4811-8cf5-addb2527915c"

owner
object
required

ID of the customer that will own the organization.

Example:
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
}
members
object[]
required

Members of the customer organization, excluding the owner. These are the children in a parent-child relationship.

Example:
[
{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"name": "Fintech Payment Processing"
},
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "Fintech Lending Services"
},
{
"id": "e06f36e2-0a44-404d-bdbc-b66a292609b0",
"name": "FinTech Wealth Management"
}
]