Invite user to a teamspace
import requests
url = "https://api.datagrid.com/v1/organization/teamspaces/{teamspace_id}/invites"
payload = {
"email": "jsmith@example.com",
"permissions": { "agent_ids": ["<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({email: 'jsmith@example.com', permissions: {agent_ids: ['<string>']}})
};
fetch('https://api.datagrid.com/v1/organization/teamspaces/{teamspace_id}/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/organization/teamspaces/{teamspace_id}/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"permissions": {
"agent_ids": [
"<string>"
]
}
}
'{
"id": "<string>",
"email": "jsmith@example.com",
"permissions": {
"role": "admin",
"agent_ids": [
"<string>"
]
},
"status": "pending",
"accepted_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Teamspace Invites
Invite user to a teamspace
Invite a user to join the teamspace. This will send an invitation email. If the user already exists, the invite will be automatically accepted.
POST
/
organization
/
teamspaces
/
{teamspace_id}
/
invites
Invite user to a teamspace
import requests
url = "https://api.datagrid.com/v1/organization/teamspaces/{teamspace_id}/invites"
payload = {
"email": "jsmith@example.com",
"permissions": { "agent_ids": ["<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({email: 'jsmith@example.com', permissions: {agent_ids: ['<string>']}})
};
fetch('https://api.datagrid.com/v1/organization/teamspaces/{teamspace_id}/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/organization/teamspaces/{teamspace_id}/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"permissions": {
"agent_ids": [
"<string>"
]
}
}
'{
"id": "<string>",
"email": "jsmith@example.com",
"permissions": {
"role": "admin",
"agent_ids": [
"<string>"
]
},
"status": "pending",
"accepted_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the teamspace
Body
application/json
Response
User invited successfully
Represents a invite for a user in a teamspace
The ID of the invite. Only present if the invite is pending.
The email address of the user invited
Represents the permissions assigned to a user in a teamspace
Show child attributes
Show child attributes
Whether the user has accepted the invite
Available options:
pending, accepted The date and time the user accepted the invite. Only present if the invite is accepted.