Add channel members
import requests
url = "https://api.datagrid.com/v1/channels/{channel_id}/members"
payload = { "actors": [{ "id": "<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({actors: [{id: '<string>'}]})
};
fetch('https://api.datagrid.com/v1/channels/{channel_id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/channels/{channel_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actors": [
{
"id": "<string>"
}
]
}
'{
"object": "list",
"data": [
{
"object": "channel.member",
"id": "<string>",
"channel_id": "<string>",
"actor": {
"id": "<string>",
"type": "user",
"name": "<string>",
"email": "<string>"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true
}Channels
Add channel members
POST
/
channels
/
{channel_id}
/
members
Add channel members
import requests
url = "https://api.datagrid.com/v1/channels/{channel_id}/members"
payload = { "actors": [{ "id": "<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({actors: [{id: '<string>'}]})
};
fetch('https://api.datagrid.com/v1/channels/{channel_id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/channels/{channel_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actors": [
{
"id": "<string>"
}
]
}
'{
"object": "list",
"data": [
{
"object": "channel.member",
"id": "<string>",
"channel_id": "<string>",
"actor": {
"id": "<string>",
"type": "user",
"name": "<string>",
"email": "<string>"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Show child attributes
Show child attributes