Skip to main content
Node.js
import { PeriskopeApi } from '@periskope/periskope-client';

const client = new PeriskopeApi({
  authToken: 'YOUR_API_KEY',
});

async function updateAccess() {
  const response = await client.members.updateAccess({
    emails: ['test@example.com'],
    labels: ['Sales'],
    orgPhones: ['918824248940']
  });

  console.log(response);
}

updateAccess();
[
  {
    "created_at": "2025-11-14T07:30:47.873008+00:00",
    "email": "test@example.com",
    "user_id": null,
    "invited_at": "2025-11-14T07:30:47.873008+00:00",
    "invited_by": null,
    "org_id": "03a52dbe-b8af-47c5-9fd1-e5a622680cad",
    "role": "member",
    "member_image": null,
    "member_name": null,
    "is_active": true,
    "member_color": "#DB2777",
    "label_ids": [
      "label-uvzfbjfgwjuphhff"
    ],
    "org_phones": [
      "918824248940@c.us"
    ],
    "is_owner": null,
    "preferences": {
      "left_sidebar_open": false,
      "right_sidepanel_open": true,
      "sync_wa_unread_count": true
    },
    "is_online": null,
    "member_metadata": {}
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
emails
string<email>[]
required
Example:
["test@example.com"]
labels
string[] | null

Label names to grant access to. Null clears access

Example:
["Sales"]
orgPhones
string[] | null

Phone numbers (without @c.us). Null clears access

Example:
["918824248940"]

Response

200 - application/json

200 OK

created_at
string

Timestamp when the member record was created

Example:

"2025-11-14T07:30:47.873008+00:00"

email
string

Email address of the member

Example:

"test@example.com"

user_id
string | null

User ID if the member has accepted the invite

Example:

null

invited_at
string

Timestamp when the member was invited

Example:

"2025-11-14T07:30:47.873008+00:00"

invited_by
string | null

ID of the user who sent the invitation

Example:

null

org_id
string

Organization ID that the member belongs to

Example:

"03a52dbe-b8af-47c5-9fd1-e5a622680cad"

role
string

Role assigned to the member (admin or member)

Example:

"member"

member_image
string | null

Profile image URL of the member

Example:

null

member_name
string | null

Display name of the member

Example:

null

is_active
boolean

Whether the member account is active

Example:

true

member_color
string | null

Color code assigned to the member for UI display

Example:

"#DB2777"

label_ids
string[]

Array of label IDs the member has access to

Example:
["label-uvzfbjfgwjuphhff"]
org_phones
string[]

Array of phone numbers the member has access to

Example:
["918824248940@c.us"]
is_owner
boolean | null

Whether the member is an organization owner

Example:

null

preferences
object

User interface preferences

is_online
boolean | null

Whether the member is currently online

Example:

null

member_metadata
object

Additional custom metadata for the member

Example:
{}