import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.members.inviteMembers({
emails: [
'user@example.com',
'user@example.com',
],
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/members/invite' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"emails": [
"user@example.com",
"user@example.com"
]
}'{
"addedMembers": [
{
"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"
}
],
"errors": [
{
"email": "user@example.com",
"error": {
"message": "User user@example.com already exists"
}
}
]
}{
"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
}Invite Members
Invites people to the org by email. New emails become pending members and receive an invite email; existing members are unchanged.
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.members.inviteMembers({
emails: [
'user@example.com',
'user@example.com',
],
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/members/invite' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"emails": [
"user@example.com",
"user@example.com"
]
}'{
"addedMembers": [
{
"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"
}
],
"errors": [
{
"email": "user@example.com",
"error": {
"message": "User user@example.com already exists"
}
}
]
}{
"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 to invite. Emails that already belong to the org are skipped and reported in the errors array of the response instead of failing the request.
1["user@example.com", "user@example.com"]
Role given to every invitee. Defaults to 'member'. Admins have universal access, so labels and orgPhones are not applied to admin invites.
admin, member "member"
Names (not ids) of chat labels to scope the new members’ chat access to. Matched case-insensitively against the org’s existing chat labels — unknown names reject the whole request, create the labels first. Applied only when role is member.
["Support"]
Phone numbers to scope the new members’ chat access to, as country code + number without symbols or spaces (e.g. 911111111111) — the @c.us suffix is optional. Every phone must already exist in the org, otherwise the whole request is rejected. Applied only when role is member.
["911111111111"]
Response
The added members and any per-email failures
The newly created member rows, with label_ids and org_phones already reflecting any labels/orgPhones passed in the request (member invites only). Empty when every email already existed or the user limit was reached.
Show child attributes
Show child attributes
Per-email failures: emails that already belong to the org, invite emails that could not be sent, or a single email: null entry when the org’s user limit was reached (in which case nobody is added)
Show child attributes
Show child attributes
Was this page helpful?