Create Users
POST
https://example.com/scim/v2/Users
Body Parameters
- bodyBaseUserDescription
- idstringDescription
- schemasstring[]Description
- externalIdstringDescription
- userNamestringDescription
- nameNameExample
{ "givenName": "Anna", "familyName": "Svensson", "formatted": "Anna Svensson" }Description- givenNamestringDescription
- familyNamestringDescription
- formattedstringDescription
- emailsobject[]
- valuestringDescription
- primarybooleanDescription
- activebooleanDescription
Responses
201
409
curl
curl --request POST \
--url https://example.com/scim/v2/Users \
--header 'accept: application/json'go
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/scim/v2/Users"
method := "POST"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("accept", "application/json")
req.Header.Add("content-type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}python
import requests
import json
url = "https://example.com/scim/v2/Users"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://example.com/scim/v2/Users", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://example.com/scim/v2/Users")
.method("POST", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();201
// Created
409
// Conflict
Create a new user. The username must be unique, otherwise the object will not be created.