import requests
url = "https://app.langwatch.ai/api/scim/v2/Users"
payload = {
"schemas": ["<string>"],
"userName": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/scim+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/scim+json'},
body: JSON.stringify({schemas: ['<string>'], userName: 'jsmith@example.com'})
};
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>' \
--header 'Content-Type: application/scim+json' \
--data '
{
"schemas": [
"<string>"
],
"userName": "jsmith@example.com"
}
'{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "<string>",
"userName": "<string>",
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"emails": [
{
"primary": true,
"value": "<string>",
"type": "<string>"
}
],
"active": true,
"meta": {
"resourceType": "User",
"created": "<string>",
"lastModified": "<string>"
},
"externalId": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<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"
payload = {
"schemas": ["<string>"],
"userName": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/scim+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/scim+json'},
body: JSON.stringify({schemas: ['<string>'], userName: 'jsmith@example.com'})
};
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>' \
--header 'Content-Type: application/scim+json' \
--data '
{
"schemas": [
"<string>"
],
"userName": "jsmith@example.com"
}
'{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "<string>",
"userName": "<string>",
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"emails": [
{
"primary": true,
"value": "<string>",
"type": "<string>"
}
],
"active": true,
"meta": {
"resourceType": "User",
"created": "<string>",
"lastModified": "<string>"
},
"externalId": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<string>"
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"detail": "<string>",
"scimType": "<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.
Body
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
The provisioned user.
Was this page helpful?