---
title: "GET /connections/{phoneNumber}/group-invite-code"
method: GET
path: "/connections/{phoneNumber}/group-invite-code"
tags: ["Connections"]
---

# GET /connections/{phoneNumber}/group-invite-code

`GET /connections/{phoneNumber}/group-invite-code`

Get the invite code for a group

## Path parameters

- `phoneNumber` string, required

## Query parameters

- `jid` string, required

## Response `200`

Disconnected

- object
  - `data` object, required
    - `key` object, required
      - `id` string
      - `remoteJid` string
      - `fromMe` boolean
      - `participant` string
    - `messageTimestamp` string, required
    - `jid` string — WhatsApp JID of the phone number
    - `profilePictureUrl` string, nullable
    - `isActive` boolean — Whether the reach-out time-lock is currently enforced
    - `timeEnforcementEnds` string, date-time, nullable — When the current enforcement window ends
    - `enforcementType` string — Reason/type of enforcement. 'DEFAULT' means no restriction.
    - `total_quota` number — Total new-chat messages allowed in the current cycle
    - `used_quota` number — New-chat messages already used in the current cycle
    - `cycle_start_timestamp` string, nullable — Unix timestamp of the cycle start
    - `cycle_end_timestamp` string, nullable — Unix timestamp of the cycle end
    - `server_sent_timestamp` string, nullable — Unix timestamp when WhatsApp produced this snapshot
    - `ote_status` string, nullable — One-time-engagement cap status (NOT_ELIGIBLE, ELIGIBLE, ACTIVE_IN_CURRENT_CYCLE, EXHAUSTED)
    - `mv_status` string, nullable — Multi-vertical cap status (NOT_ELIGIBLE, NOT_ACTIVE, ACTIVE, ACTIVE_UPGRADE_AVAILABLE)
    - `capping_status` string, nullable — Overall capping status (NONE, FIRST_WARNING, SECOND_WARNING, CAPPED)
    - `inviteCode` string, nullable
    - `groupJid` string, nullable
    - `revoked` boolean
  - `wid` string — WhatsApp ID of the business
  - `description` string — Business description
  - `email` string, nullable — Business email
  - `website` string[] — Business websites
  - `category` string, nullable — Business category
  - `address` string, nullable — Business address
  - `business_hours` object — Business hours configuration
    - `timezone` string — Timezone of the business
    - `config` object[]
      - `day_of_week` string
      - `mode` string
      - `open_time` number
      - `close_time` number
  - `id` string — Group JID
  - `addressingMode` string — Addressing mode of the group
  - `subject` string — Group name/subject
  - `subjectOwner` string — JID of the user who set the subject
  - `subjectOwnerPn` string — Phone number JID of the subject owner
  - `subjectTime` number — Timestamp when subject was set
  - `size` number — Number of participants in the group
  - `creation` number — Timestamp when the group was created
  - `owner` string — JID of the group owner
  - `ownerPn` string — Phone number JID of the group owner
  - `owner_country_code` string — Country code of the group owner
  - `desc` string, nullable — Group description
  - `descId` string, nullable — Description ID
  - `descOwner` string, nullable — JID of the user who set the description
  - `descTime` number, nullable — Timestamp when description was set
  - `restrict` boolean — Whether only admins can change group settings
  - `announce` boolean — Whether only admins can send messages
  - `isCommunity` boolean — Whether the group is a community
  - `isCommunityAnnounce` boolean — Whether the group is a community announcement group
  - `joinApprovalMode` boolean — Whether join requests require admin approval
  - `memberAddMode` boolean — Whether members can add other members
  - `participants` object[] — List of group participants
    - `id` string — Participant JID
    - `phoneNumber` string — Participant phone number JID
    - `admin` string, nullable — Admin status: 'superadmin', 'admin', or null
  - `ephemeralDuration` number, nullable — Duration in seconds for disappearing messages

## Other responses

- `403` — Forbidden — the API key does not own this connection. Returned when a connection is bound to a different API key.
- `404` — Phone number not found
- `409` — Message is already being processed
- `421` — Misdirected Request — in cluster mode, this instance does not own the connection. The owning instance id is in the x-baileys-owner header; a proxy re-routes the request there. Not returned for POST /connections/{phoneNumber} (explicit takeover).
- `500` — Message not edited

---

[API](https://skmtc.net/fazer-ai/apis/fazer-ai-baileys-api.md) · [All operations](https://skmtc.net/fazer-ai/apis/fazer-ai-baileys-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fazer-ai/fazer-ai-baileys-api/versions/da89554d2e38/schema)
