Python
import requests
url = "https://app.langwatch.ai/api/organization/invites"
payload = { "invites": [
{
"email": "jsmith@example.com",
"teams": [
{
"teamId": "<string>",
"customRoleId": "<string>"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invites: [
{
email: 'jsmith@example.com',
teams: [{teamId: '<string>', customRoleId: '<string>'}]
}
]
})
};
fetch('https://app.langwatch.ai/api/organization/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/organization/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invites": [
{
"email": "jsmith@example.com",
"teams": [
{
"teamId": "<string>",
"customRoleId": "<string>"
}
]
}
]
}
'{
"invites": [
{
"id": "<string>",
"email": "<string>",
"status": "<string>",
"expiration": "<string>",
"inviteCode": "<string>",
"inviteUrl": "<string>",
"teams": [
{
"teamId": "<string>",
"role": "<string>",
"customRoleId": "<string>"
}
],
"createdAt": "<string>",
"emailNotSent": true
}
]
}Invites
Create invites
Create up to 50 invites in one batch, each with team assignments that may carry a custom role. Validation is strict: a team or custom role that cannot be assigned refuses the batch rather than silently granting less than was asked. emailNotSent reports, per invite, whether the invite email could be delivered.
POST
/
api
/
organization
/
invites
Python
import requests
url = "https://app.langwatch.ai/api/organization/invites"
payload = { "invites": [
{
"email": "jsmith@example.com",
"teams": [
{
"teamId": "<string>",
"customRoleId": "<string>"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invites: [
{
email: 'jsmith@example.com',
teams: [{teamId: '<string>', customRoleId: '<string>'}]
}
]
})
};
fetch('https://app.langwatch.ai/api/organization/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/organization/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invites": [
{
"email": "jsmith@example.com",
"teams": [
{
"teamId": "<string>",
"customRoleId": "<string>"
}
]
}
]
}
'{
"invites": [
{
"id": "<string>",
"email": "<string>",
"status": "<string>",
"expiration": "<string>",
"inviteCode": "<string>",
"inviteUrl": "<string>",
"teams": [
{
"teamId": "<string>",
"role": "<string>",
"customRoleId": "<string>"
}
],
"createdAt": "<string>",
"emailNotSent": true
}
]
}Authorizations
Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.
Body
application/json
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
201 - application/json
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I