Skip to main content

Instance Groups

Create groups containing multiple instances and use them as if they were a single WhatsApp number.

Instance Group

Mainly used for message sending distribution, where the instance group will evenly distribute the load and use only active instances, minimizing the risk of instance blocks.

Create New Group

Group creation is limited to the system interface. Access the Instance Groups menu to register a new instance group.

Group Status

Commandhttps://apidb.witi.me/witime/group/getstatus.aspx?gid=GROUP_ID
MethodGET
Response

Group information:

{
"Resultado": {
"CodigoResultado": 0,
"Mensagem": "10 instances. Connected=7, canRestore=2, disconnected=1",
"Chave": "7bd11041-196e-3a38-bc26-4aa81437cd38",
"Cobrado": false,
"ValorCobrado": 0.0,
"ElapsedTimeMS": 0
},
"Info": {
"GID": "a1e9e5d7-0f8e-4aa4-bae1-b50e13577079",
"WIDs": [],
"APIURL": null,
"Status": 1,
"instancias": []
}
}

Shut Down Instance Group

Commandhttps://apidb.witi.me/witime/group/End.aspx?gid=GROUP_ID
MethodGET
Response
{
"CodigoResultado": 0,
"Mensagem": "GID a1e9e5d7-0f8e-4aa4-bae1-b50e13577079 successfully terminated",
"Chave": "7bd11041-196e-3a38-bc26-4aa81437cd38",
"Cobrado": false,
"ValorCobrado": 0.0,
"ElapsedTimeMS": 4480
}

Start Instance Group

Commandhttps://apidb.witi.me/witime/group/Start.aspx?gid=GROUP_ID
MethodGET
Response
{
"CodigoResultado": 0,
"Mensagem": "GID a1e9e5d7-0f8e-4aa4-bae1-b50e13577079 started successfully. 1 wids",
"Chave": "7bd11041-196e-3a38-bc26-4aa81437cd38",
"Cobrado": false,
"ValorCobrado": 0.0,
"ElapsedTimeMS": 18
}

Profile Query

Distributes profile queries among the group's instances.

Commandhttps://apidb.witi.me/witime/group/query_profile.aspx?gid=GROUP_ID
MethodPOST
Body
{ 
"number" : ["551198765432@s.whatsapp.net","551191234567@s.whatsapp.net", ...],
"queryPicture" : true // optional
}
Response
{
"Resultado": {
"CodigoResultado": 0,
"Mensagem": "2 profiles queried. {\"200\":2}",
"Chave": "7bd11041-196e-3a38-bc26-4aa81437cd38",
"Cobrado": false,
"ValorCobrado": 0.0,
"ElapsedTimeMS": 289
},
"Profiles": [
{
"Status": 200,
"Contato": {
"name": "José Maria",
"picture": "",
"Lastupdate": "0001-01-01T00:00:00-02:00",
"LastMessageTime": 1683549454,
"biz": false,
"status": 200,
"tag": null,
"Count": 27,
"Mute": false,
"Spam": false,
"Archive": false,
"isGroup": false,
"jid": "551198765432@s.whatsapp.net"
},
"JID": "551198765432@c.us",
"Picture": null
},
...
]
}

Send Message

Distributes message sending among the group's instances, randomly and according to instance availability.

Commandhttps://apidb.witi.me/witime/group/SendMessage.aspx?gid=GROUP_ID
MethodPOST
Body
{ 
"number": "551199887766@s.whatsapp.net",
"message": "Hello! This is a test via the witi.me API!",
"sms_delivery_uniqueid": "" // optional
}
Response

Group information:

{
"Resultado": {
"CodigoResultado": 0,
"Mensagem": "Message sent successfully",
"Chave": "04f18780-6c03-4699-9277-8fad93708a2a",
"Cobrado": false,
"ValorCobrado": 0.0,
"ElapsedTimeMS": 5857
},
"Mensagem": {
"JidSource": "551198765421@s.whatsapp.net",
"JidDestiny": "551199887766@s.whatsapp.net",
"JidChatName": null,
"Status": 1,
"_event_id_hash": 77880376,
"Type": null,
"DateSent": "2023-05-08T15:54:26.0212253-03:00",
"TextMessage": "Hello! This is a test via the witi.me API!",
"From_me": false,
"Forwarded": false,
"Json_event": null,
"EventIdRef": null,
"UniqueIdRef": "",
"MensagemRef": null,
"EventId": "F19E8B61600CA75224D8E5453550D8C4"
}
}