Create SCIM Group
curl --request POST \
--url https://api.attention.tech/v2/scim/Groups \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"displayName": "Sales Team",
"members": [
{
"value": "user-uuid-1",
"display": "jane@example.com"
},
{
"value": "user-uuid-2",
"display": "john@example.com"
}
]
}
'import requests
url = "https://api.attention.tech/v2/scim/Groups"
payload = {
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"displayName": "Sales Team",
"members": [
{
"value": "user-uuid-1",
"display": "jane@example.com"
},
{
"value": "user-uuid-2",
"display": "john@example.com"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemas: ['urn:ietf:params:scim:schemas:core:2.0:Group'],
displayName: 'Sales Team',
members: [
{value: 'user-uuid-1', display: 'jane@example.com'},
{value: 'user-uuid-2', display: 'john@example.com'}
]
})
};
fetch('https://api.attention.tech/v2/scim/Groups', 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.attention.tech/v2/scim/Groups",
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([
'schemas' => [
'urn:ietf:params:scim:schemas:core:2.0:Group'
],
'displayName' => 'Sales Team',
'members' => [
[
'value' => 'user-uuid-1',
'display' => 'jane@example.com'
],
[
'value' => 'user-uuid-2',
'display' => 'john@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/scim/Groups"
payload := strings.NewReader("{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"displayName\": \"Sales Team\",\n \"members\": [\n {\n \"value\": \"user-uuid-1\",\n \"display\": \"jane@example.com\"\n },\n {\n \"value\": \"user-uuid-2\",\n \"display\": \"john@example.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.attention.tech/v2/scim/Groups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"displayName\": \"Sales Team\",\n \"members\": [\n {\n \"value\": \"user-uuid-1\",\n \"display\": \"jane@example.com\"\n },\n {\n \"value\": \"user-uuid-2\",\n \"display\": \"john@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/scim/Groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"displayName\": \"Sales Team\",\n \"members\": [\n {\n \"value\": \"user-uuid-1\",\n \"display\": \"jane@example.com\"\n },\n {\n \"value\": \"user-uuid-2\",\n \"display\": \"john@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"id": "group-uuid-123",
"displayName": "Sales Team",
"members": [
{
"value": "user-uuid-1",
"display": "jane@example.com"
}
]
}{
"code": 401,
"message": "unauthenticated for Invalid API key"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"detail": "The details of the error",
"status": 409
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"detail": "The details of the error",
"status": 409
}Scim
Create SCIM Group
POST
/
scim
/
Groups
Create SCIM Group
curl --request POST \
--url https://api.attention.tech/v2/scim/Groups \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"displayName": "Sales Team",
"members": [
{
"value": "user-uuid-1",
"display": "jane@example.com"
},
{
"value": "user-uuid-2",
"display": "john@example.com"
}
]
}
'import requests
url = "https://api.attention.tech/v2/scim/Groups"
payload = {
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"displayName": "Sales Team",
"members": [
{
"value": "user-uuid-1",
"display": "jane@example.com"
},
{
"value": "user-uuid-2",
"display": "john@example.com"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemas: ['urn:ietf:params:scim:schemas:core:2.0:Group'],
displayName: 'Sales Team',
members: [
{value: 'user-uuid-1', display: 'jane@example.com'},
{value: 'user-uuid-2', display: 'john@example.com'}
]
})
};
fetch('https://api.attention.tech/v2/scim/Groups', 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.attention.tech/v2/scim/Groups",
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([
'schemas' => [
'urn:ietf:params:scim:schemas:core:2.0:Group'
],
'displayName' => 'Sales Team',
'members' => [
[
'value' => 'user-uuid-1',
'display' => 'jane@example.com'
],
[
'value' => 'user-uuid-2',
'display' => 'john@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/scim/Groups"
payload := strings.NewReader("{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"displayName\": \"Sales Team\",\n \"members\": [\n {\n \"value\": \"user-uuid-1\",\n \"display\": \"jane@example.com\"\n },\n {\n \"value\": \"user-uuid-2\",\n \"display\": \"john@example.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.attention.tech/v2/scim/Groups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"displayName\": \"Sales Team\",\n \"members\": [\n {\n \"value\": \"user-uuid-1\",\n \"display\": \"jane@example.com\"\n },\n {\n \"value\": \"user-uuid-2\",\n \"display\": \"john@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/scim/Groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"displayName\": \"Sales Team\",\n \"members\": [\n {\n \"value\": \"user-uuid-1\",\n \"display\": \"jane@example.com\"\n },\n {\n \"value\": \"user-uuid-2\",\n \"display\": \"john@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"id": "group-uuid-123",
"displayName": "Sales Team",
"members": [
{
"value": "user-uuid-1",
"display": "jane@example.com"
}
]
}{
"code": 401,
"message": "unauthenticated for Invalid API key"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"detail": "The details of the error",
"status": 409
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"detail": "The details of the error",
"status": 409
}Authorizations
Body
application/jsonapplication/scim+json
Example:
[
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
Example:
"Marketing"
Show child attributes
Show child attributes
Example:
[
{
"value": "724b985e-5053-4d9d-b8c5-7f2941b60c26",
"display": "okta"
},
{
"value": "8b6109ec-b34c-4343-91ea-f8b0d7dd2616",
"display": "admin"
}
]
Response
User created successfully
Example:
[
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:okta:custom:group:1.0"
]
Example:
"[Attention] Marketing"
Example:
"3ebee315-ef0f-45b8-b5cb-94fb761093d7"
Show child attributes
Show child attributes
Example:
[
{
"value": "724b985e-5053-4d9d-b8c5-7f2941b60c26",
"display": "22john.doe@example.com"
},
{
"value": "8b6109ec-b34c-4343-91ea-f8b0d7dd2616",
"display": "23john.doe@example.com"
}
]
Show child attributes
Show child attributes
Was this page helpful?
⌘I