ChatsGroup Chats

Group Chats

Create and manage iMessage group conversations.

Create a Group Chat

curl -X POST https://api.textbubbles.com/v1/chats/groups \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": ["+14155551234", "+14155559876"],
    "name": "Project Team"
  }'

Get Chat Details

curl https://api.textbubbles.com/v1/chats/CHAT_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Rename a Group

curl -X PUT https://api.textbubbles.com/v1/chats/CHAT_ID/name \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Group Name"
  }'

Add a Participant

curl -X POST https://api.textbubbles.com/v1/chats/CHAT_ID/participants \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "+14155557777"
  }'

Remove a Participant

curl -X DELETE https://api.textbubbles.com/v1/chats/CHAT_ID/participants/PARTICIPANT_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Leave a Group

curl -X POST https://api.textbubbles.com/v1/chats/CHAT_ID/leave \
  -H "Authorization: Bearer YOUR_API_KEY"

Send a Message to a Group

Use the standard Send Messages endpoint with the chat ID:

curl -X POST https://api.textbubbles.com/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "CHAT_ID",
    "content": { "text": "Hello team!" }
  }'

Endpoints

MethodPathDescription
POST/v1/chats/groupsCreate group chat
GET/v1/chats/:chatIdGet chat details
PUT/v1/chats/:chatId/nameRename group
POST/v1/chats/:chatId/participantsAdd participant
DELETE/v1/chats/:chatId/participants/:idRemove participant
POST/v1/chats/:chatId/leaveLeave group