import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.members.updateMemberAccess({
emails: [
'user@example.com',
],
});
console.log(response);
}
main();curl -X PATCH 'https://api.periskope.app/v1/members/access' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"emails": [
"user@example.com"
]
}'[
{
"org_id": "00000000-0000-0000-0000-000000000000",
"email": "user@example.com",
"role": "member",
"user_id": "00000000-0000-0000-0000-000000000000",
"member_name": "John Doe",
"member_image": null,
"member_color": "#25D366",
"org_phones": [
"911111111111@c.us"
],
"label_ids": [
"label-aaaaaaaaaaaa"
],
"is_active": true,
"is_online": false,
"is_owner": false,
"invited_at": "2026-01-15T09:30:00.000Z",
"invited_by": "user@example.com",
"member_metadata": null,
"preferences": {},
"created_at": "2026-01-15T09:30:00.000Z"
}
]{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Update Member Access
Replaces the chat access scope (labels and orgPhones) of members with role member. Both dimensions are written on every call — an omitted or null dimension is cleared, not left unchanged.
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.members.updateMemberAccess({
emails: [
'user@example.com',
],
});
console.log(response);
}
main();curl -X PATCH 'https://api.periskope.app/v1/members/access' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"emails": [
"user@example.com"
]
}'[
{
"org_id": "00000000-0000-0000-0000-000000000000",
"email": "user@example.com",
"role": "member",
"user_id": "00000000-0000-0000-0000-000000000000",
"member_name": "John Doe",
"member_image": null,
"member_color": "#25D366",
"org_phones": [
"911111111111@c.us"
],
"label_ids": [
"label-aaaaaaaaaaaa"
],
"is_active": true,
"is_online": false,
"is_owner": false,
"invited_at": "2026-01-15T09:30:00.000Z",
"invited_by": "user@example.com",
"member_metadata": null,
"preferences": {},
"created_at": "2026-01-15T09:30:00.000Z"
}
]{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Authorizations
Body
Names (not ids) of chat labels to scope the members’ chat access to, matched case-insensitively against the org’s existing chat labels — unknown names reject the request. Replaces the members’ current label scoping as a whole — send the complete desired list, not just additions. Pass null to clear the label scoping; omitting the field leaves it unchanged.
["Support"]
Phone numbers to scope the members’ chat access to, as country code + number without symbols or spaces (the @c.us suffix is optional). Every phone must already exist in the org, otherwise the request is rejected. Replaces the members’ current phone scoping as a whole — send the complete desired list, not just additions. Pass null to clear the phone scoping; omitting the field leaves it unchanged.
["911111111111"]
Response
The member rows that were updated
Was this page helpful?