Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt

Use this file to discover all available pages before exploring further.

The groups API covers the full lifecycle of WhatsApp group management. You can create groups, update their name and description, manage participants and admin roles, generate and revoke invite links, and join groups via invite codes — all through the session that owns or participates in the group.

Group object

id
string
Group JID (e.g. [email protected]).
name
string
Group name (subject).
description
string
Group description text.
ownerLid
string
LID of the group owner or creator.
createdAt
integer
Unix timestamp when the group was created.
participants
object[]
List of group members.

Create a group

curl -X POST https://api.example.com/api/sessions/default/groups \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "session": "default",
    "name": "Team Announcements",
    "participants": [
      "[email protected]",
      "[email protected]"
    ]
  }'
POST /api/sessions/{session}/groups Creates a new WhatsApp group with the given participants. The session account becomes the super admin.
session
string
required
Session name.
session
string
required
Session name (also required in the request body).
name
string
required
Group name (subject). Maximum 25 characters.
participants
string[]
required
JIDs of the initial group members. Maximum 256 participants per action.
{
  "data": {
    "id": "[email protected]",
    "name": "Team Announcements",
    "ownerLid": "12345678@lid",
    "createdAt": 1705315200,
    "participants": [
      { "phoneNumber": "+5511999999999", "isAdmin": false, "isSuperAdmin": false }
    ]
  }
}

List groups

curl https://api.example.com/api/sessions/default/groups \
  -H "Authorization: Bearer titan_..."
GET /api/sessions/{session}/groups Returns all groups the session account is a member of.
session
string
required
Session name.

Get a group

curl https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us \
  -H "Authorization: Bearer titan_..."
GET /api/sessions/{session}/groups/{groupId} Returns full group info including participants.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded), e.g. 120363012345678901%40g.us.

Update group subject

curl -X PUT https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/subject \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{"session": "default", "value": "New Group Name"}'
PUT /api/sessions/{session}/groups/{groupId}/subject Updates the group name. Requires admin privileges.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
session
string
required
Session name (required in body).
value
string
required
New group name.

Update group description

curl -X PUT https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/description \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{"session": "default", "value": "Updates for the whole team."}'
PUT /api/sessions/{session}/groups/{groupId}/description Updates the group description. Requires admin privileges.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
session
string
required
Session name (required in body).
value
string
required
New group description.

Set group profile picture

curl -X PUT https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/picture \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/group-photo.jpg"}'
PUT /api/sessions/{session}/groups/{groupId}/picture Sets the group profile picture. Requires admin privileges.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
url
string
HTTPS URL of the new profile picture. Required if base64 is not provided.
base64
string
Base64-encoded image data. Required if url is not provided.

Leave a group

curl -X POST https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/leave \
  -H "Authorization: Bearer titan_..."
POST /api/sessions/{session}/groups/{groupId}/leave Leaves the group. The session account is removed from the participant list.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).

Delete a group

curl -X DELETE https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us \
  -H "Authorization: Bearer titan_..."
DELETE /api/sessions/{session}/groups/{groupId} Deletes the group. Only the super admin can delete a group.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).

List participants

curl https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/participants \
  -H "Authorization: Bearer titan_..."
GET /api/sessions/{session}/groups/{groupId}/participants Returns the current participant list for the group.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).

Add participants

curl -X POST https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/participants \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "session": "default",
    "participants": ["[email protected]"]
  }'
POST /api/sessions/{session}/groups/{groupId}/participants Adds one or more participants to the group. Requires admin privileges. Maximum 256 participants per request.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
session
string
required
Session name (required in body).
participants
string[]
required
JIDs of the participants to add.

Remove participants

curl -X DELETE https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/participants \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "session": "default",
    "participants": ["[email protected]"]
  }'
DELETE /api/sessions/{session}/groups/{groupId}/participants Removes one or more participants from the group. Requires admin privileges.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
session
string
required
Session name (required in body).
participants
string[]
required
JIDs of the participants to remove.

Promote participants to admin

curl -X POST https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/participants/promote \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "session": "default",
    "participants": ["[email protected]"]
  }'
POST /api/sessions/{session}/groups/{groupId}/participants/promote Promotes participants to group admin. Only a super admin can promote others.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
session
string
required
Session name (required in body).
participants
string[]
required
JIDs of the participants to promote.

Demote participants from admin

curl -X POST https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/participants/demote \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "session": "default",
    "participants": ["[email protected]"]
  }'
POST /api/sessions/{session}/groups/{groupId}/participants/demote Demotes admin participants back to regular members. Only a super admin can demote admins.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
session
string
required
Session name (required in body).
participants
string[]
required
JIDs of the admins to demote.

curl https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/invite \
  -H "Authorization: Bearer titan_..."
GET /api/sessions/{session}/groups/{groupId}/invite Returns the current invite link code for the group.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).
{
  "data": {
    "code": "ABcDeFgHiJkLmN"
  }
}

curl -X DELETE https://api.example.com/api/sessions/default/groups/120363012345678901%40g.us/invite \
  -H "Authorization: Bearer titan_..."
DELETE /api/sessions/{session}/groups/{groupId}/invite Revokes the current invite link and generates a new one. Anyone with the old link can no longer join the group.
session
string
required
Session name.
groupId
string
required
Group JID (URL-encoded).

Join a group via invite code

curl -X POST https://api.example.com/api/sessions/default/groups/join \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{"code": "ABcDeFgHiJkLmN"}'
POST /api/sessions/{session}/groups/join Joins a group using an invite code. The invite code is the last segment of a WhatsApp invite URL (e.g. from https://chat.whatsapp.com/ABcDeFgHiJkLmN, the code is ABcDeFgHiJkLmN).
session
string
required
Session name.
code
string
required
Group invite code.

Preview a group invite

curl "https://api.example.com/api/sessions/default/groups/join?inviteCode=ABcDeFgHiJkLmN" \
  -H "Authorization: Bearer titan_..."
GET /api/sessions/{session}/groups/join Returns preview information about a group invite without joining. Use this to show group details to the user before they join.
session
string
required
Session name.
inviteCode
string
required
Group invite code to preview.
id
string
Group JID.
subject
string
Group name.
size
integer
Current number of members.
createdAt
integer
Unix timestamp when the group was created.
creatorLid
string
LID of the user who created the invite.
participants
object[]
Current member list.
{
  "data": {
    "id": "[email protected]",
    "subject": "Team Announcements",
    "size": 25,
    "createdAt": 1705315200,
    "creatorLid": "12345678@lid",
    "participants": []
  }
}