Send Message to Group by Group ID
POSThttps://api.whatspie.com/groups/495/send
Send Message to Group by Group ID
Request
- application/json
Body
required
message stringrequired
type stringrequired
params objectrequired
Responses
- 200
- 403
- 404
- 422
OK
Response Headers
- application/json; charset=utf-8
- Schema
- Example (from schema)
- Example
Schema
status int32required
message stringrequired
data objectrequired
{
"status": 200,
"message": "OK",
"data": {
"id": "7637842",
"device_id": "5",
"from_number": "6281776521626",
"to_number": "6285156055377-1607992695",
"type": "chat",
"msg_type": "outgoing",
"body": "Hello",
"status": "PENDING",
"file_url": null,
"file_caption": "Hello",
"created_at": "2022-05-23T21:49:41.000Z",
"params": null,
"wa_id": null,
"retry": 0,
"failed_reason": null,
"file_name": null,
"file_size": null,
"file_mime": null,
"updated_at": null
}
}
{
"status": 200,
"message": "OK",
"data": {
"id": "7637842",
"device_id": "5",
"from_number": "6281776521626",
"to_number": "6285156055377-1607992695",
"type": "chat",
"msg_type": "outgoing",
"body": "Hello",
"status": "PENDING",
"file_url": null,
"file_caption": "Hello",
"created_at": "2022-05-23T21:49:41.000Z",
"params": null,
"wa_id": null,
"retry": 0,
"failed_reason": null,
"file_name": null,
"file_size": null,
"file_mime": null,
"updated_at": null
}
}
General Forbidden Error Response
- application/json
- Schema
- Example (from schema)
Schema
status integer
Forbidden
message string
HTTP Status Message
{
"status": 403,
"message": "Forbidden"
}
General Not Found Error Response
- application/json
- Schema
- Example (from schema)
Schema
status integer
Not Found
message string
HTTP Status Message
{
"status": 404,
"message": "Not Found"
}
General Validation Error Response
- application/json
- Schema
- Example (from schema)
Schema
status integer
HTTP Status Code
message string
HTTP Status Message
errors string[]
{
"status": 422,
"message": "Validation Error ",
"errors": [
"string"
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://api.whatspie.com/groups/495/send' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json; charset=utf-8' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"message": "Hello",
"type": "chat",
"params": {
"text": "Hello @62856123456",
"mentions": [
"62856123456@s.whatsapp.net"
]
}
}'
ResponseClear