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
Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.
Body
Email addresses of the members to update. Only rows with role member are updated — admins and emails that do not belong to the org are silently skipped.
1["user@example.com"]
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
Id of the organization the member belongs to
"00000000-0000-0000-0000-000000000000"
Email address of the member — the identifier every members endpoint uses to reference them
"user@example.com"
Role of the member. 'admin' members have universal access to every chat and phone in the org; 'member' access is scoped by org_phones and label_ids.
admin, member "member"
Id of the member’s Periskope user account. null while the invite is pending — set once the invitee signs up and joins the org.
"00000000-0000-0000-0000-000000000000"
Display name of the member. null until the member sets one.
"John Doe"
URL of the member’s avatar image. null when not set.
null
Hex color used to represent the member in the dashboard, assigned randomly when the member is added
"#25D366"
Phones the member’s chat access is scoped to, stored with the @c.us suffix. Only meaningful for role member — always null for admins, who can access every phone. null when no phone scoping is configured.
["911111111111@c.us"]
Ids of the chat labels the member’s chat access is scoped to (label-xxxx). Only meaningful for role member — always null for admins. null when no label scoping is configured.
["label-aaaaaaaaaaaa"]
Whether the member is active in the org
true
Whether the member is currently online in the dashboard. null when never tracked.
false
true for the org owner. The owner cannot be removed or modified via the members endpoints. null or false for everyone else.
false
When the member was invited, as an ISO 8601 timestamp. null when unknown.
"2026-01-15T09:30:00.000Z"
Email of the user who invited this member. null when unknown.
"user@example.com"
Free-form JSON metadata attached to the member. null when not set.
null
Dashboard preferences of the member, as a JSON object
{}
When the member row was created, as an ISO 8601 timestamp
"2026-01-15T09:30:00.000Z"
Was this page helpful?