import requests
url = "https://app.langwatch.ai/api/scim/v2/Users"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.langwatch.ai/api/scim/v2/Users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/scim/v2/Users \
--header 'Authorization: Bearer <token>'{
"schemas": [
"<string>"
],
"id": "<string>",
"userName": "jsmith@example.com",
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"emails": [
{
"value": "jsmith@example.com",
"primary": true,
"type": "<string>"
}
],
"active": true,
"meta": {
"resourceType": "<string>",
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z"
}
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}Provision a user
Adds a member to the organization, creating the LangWatch account when the email is new. Someone who already has an account is added and reactivated rather than refused, which is what lets a directory sync be re-run without special-casing the people it already knows. New members join with the MEMBER role at organization scope. costCenter on the enterprise user extension assigns their department, creating that department on first use.
import requests
url = "https://app.langwatch.ai/api/scim/v2/Users"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.langwatch.ai/api/scim/v2/Users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/scim/v2/Users \
--header 'Authorization: Bearer <token>'{
"schemas": [
"<string>"
],
"id": "<string>",
"userName": "jsmith@example.com",
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"emails": [
{
"value": "jsmith@example.com",
"primary": true,
"type": "<string>"
}
],
"active": true,
"meta": {
"resourceType": "<string>",
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z"
}
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}{
"schemas": [
"<string>"
],
"status": "<string>",
"detail": "<string>"
}Authorizations
SCIM token for one organization's directory connection, created with POST /api/scim-tokens or in Settings > SCIM. It authenticates provisioning calls only, and stops working if the organization's Enterprise plan lapses.
Response
The provisioned user.
The SCIM schema URNs this resource conforms to.
The LangWatch user id. Use it as the resource id in later calls, and as a member value on a group.
The member's email address, which is their login.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
False once the account is deactivated.
Show child attributes
Show child attributes
Was this page helpful?