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

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

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

  console.log(response);
}

inviteMembers();
{
  "addedMembers": [
    {
      "created_at": "2025-11-18T05:09:07.481252+00:00",
      "email": "test@example.com",
      "user_id": null,
      "invited_at": "2025-11-18T05:09:07.481252+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": "#25D366",
      "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": {}
    },
    {
      "created_at": "2025-11-16T11:38:10.43923+00:00",
      "email": "test1@example.com",
      "user_id": null,
      "invited_at": "2025-11-16T11:38:10.43923+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": "#FA6533",
      "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": {}
    },
    {
      "created_at": "2025-11-16T11:38:10.43923+00:00",
      "email": "test2@example.com",
      "user_id": null,
      "invited_at": "2025-11-16T11:38:10.43923+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": "#06CF9C",
      "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": {}
    }
  ],
  "errors": []
}

Authorizations

Authorization
string
header
required

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

Body

application/json
emails
string[]
required

Array of email addresses to invite

Example:
[
"michael@dundermifflin.com",
"dwight@dundermifflin.com"
]
role
string

Role for invited users. Allowed values are admin or member. Defaults to member.

Example:

"member"

labels
string[] | null

Label names to grant access to a member(applies to member role). You can provide the value as null if you want to give access to all labels.

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

Phone numbers (without @c.us) to grant access to a member(applies to member role). You can provide the value as null if you want to give access to all phone numbers.

Example:
["918824248940"]

Response

200 - application/json

200 OK

addedMember
object[]

The list of added members