Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Docker:** `evoapicloud/evolution-go:0.7.1`

### 🆕 New Features
- **Send Event endpoint** — new `POST /send/event` creates and sends a WhatsApp Event (group agenda). Body supports `name`, `description`, `startTime`/`endTime` (ISO 8601 with timezone or epoch seconds), optional `location`, `hasReminder`/`reminderOffsetSec` (e.g. `900`=15min, `3600`=1h, `86400`=1 day), `isScheduleCall`, `extraGuestsAllowed`, `isCanceled`, `mentionAll`/`mentionedJid`, and an optional `text` delivered as a leading message right before the event card (caption-style). The flag booleans are always sent explicitly (the WhatsApp client requires them present) and a 32-byte `MessageContextInfo` secret is set so the event's going/not-going responses decrypt. Note: `joinLink` only accepts WhatsApp call links (`call.whatsapp.com`); external URLs (site/YouTube) should go in `description`. Requires the matching event-stanza support in the bundled `whatsmeow` (`type=event` + `<meta event_type="creation">`).
- **Test-send modal in Manager** — new modal in the embedded manager UI to test message sending directly from the panel, covering text, media and interactive message types. Useful for validating an instance right after pairing without leaving the manager.

### 🔧 Improvements / CI
Expand Down
27 changes: 27 additions & 0 deletions Evolution GO.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,33 @@
},
"response": []
},
{
"name": "Send Event",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"number\": \"120363000000000000@g.us\",\r\n \"name\": \"Sales meeting\",\r\n \"description\": \"Monthly alignment. External links (site/YouTube) go in this field.\",\r\n \"text\": \"📢 Reminder! Confirm your presence in the event below 👇\",\r\n \"startTime\": \"2026-06-25T20:00:00-03:00\",\r\n \"endTime\": \"2026-06-25T21:00:00-03:00\",\r\n \"location\": {\r\n \"name\": \"HQ\",\r\n \"latitude\": -16.6869,\r\n \"longitude\": -49.2648,\r\n \"address\": \"Av. Principal, 1000\"\r\n },\r\n \"hasReminder\": true,\r\n \"reminderOffsetSec\": 3600,\r\n \"mentionAll\": true\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/send/event",
"host": [
"{{host}}"
],
"path": [
"send",
"event"
]
}
},
"response": []
},
{
"name": "Send Contact",
"request": {
Expand Down
162 changes: 162 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,52 @@ const docTemplate = `{
}
}
},
"/send/event": {
"post": {
"description": "Create and send a WhatsApp Event (group agenda). startTime/endTime accept an ISO 8601 (RFC3339) timestamp with timezone or epoch seconds. Typically sent to a group JID, e.g. 1203...@g.us.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Send Message"
],
"summary": "Send a WhatsApp event message",
"parameters": [
{
"description": "Event data",
"name": "message",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventStruct"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"$ref": "#/definitions/gin.H"
}
},
"400": {
"description": "Error on validation",
"schema": {
"$ref": "#/definitions/gin.H"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gin.H"
}
}
}
}
},
"/send/link": {
"post": {
"description": "Send a link message",
Expand Down Expand Up @@ -4351,6 +4397,122 @@ const docTemplate = `{
}
}
},
"github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventLocationStruct": {
"type": "object",
"properties": {
"address": {
"type": "string",
"example": "Av. Principal, 1000"
},
"latitude": {
"type": "number",
"example": -16.6869
},
"longitude": {
"type": "number",
"example": -49.2648
},
"name": {
"type": "string",
"example": "Sede Grupo Mirandas"
}
}
},
"github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventStruct": {
"type": "object",
"properties": {
"delay": {
"description": "Typing delay (milliseconds) before sending.",
"type": "integer"
},
"description": {
"description": "Optional long description.",
"type": "string"
},
"endTime": {
"description": "Optional event end. ISO 8601 with timezone or epoch seconds.",
"type": "string"
},
"extraGuestsAllowed": {
"description": "Allow guests to invite extra guests.",
"type": "boolean"
},
"formatJid": {
"description": "If false, skips JID formatting/validation of ` + "`" + `number` + "`" + `.",
"type": "boolean"
},
"hasReminder": {
"description": "Enable a reminder for the event.",
"type": "boolean"
},
"id": {
"description": "Optional custom message ID.",
"type": "string"
},
"isCanceled": {
"description": "Cancel a previously created event.",
"type": "boolean"
},
"isScheduleCall": {
"description": "Whether this event is a scheduled call.",
"type": "boolean"
},
"joinLink": {
"description": "Optional call link (Meet, Zoom, etc.).",
"type": "string"
},
"location": {
"description": "Optional location (name + coordinates + address).",
"allOf": [
{
"$ref": "#/definitions/github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventLocationStruct"
}
]
},
"mentionAll": {
"description": "Mention every participant (groups only).",
"type": "boolean"
},
"mentionedJid": {
"description": "JIDs to mention inside the event.",
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"description": "Event title (required).",
"type": "string",
"example": "Reuniao de vendas"
},
"number": {
"description": "Destination JID (typically a group, e.g. 1203...@g.us).",
"type": "string",
"example": "120363000000000000@g.us"
},
"quoted": {
"description": "Quoted (reply-to) context.",
"allOf": [
{
"$ref": "#/definitions/github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.QuotedStruct"
}
]
},
"reminderOffsetSec": {
"description": "Seconds before startTime to fire the reminder (requires hasReminder).",
"type": "integer"
},
"startTime": {
"description": "Event start (required). ISO 8601 with timezone or epoch seconds.",
"type": "string",
"example": "2026-06-25T20:00:00-03:00"
},
"text": {
"description": "Optional text message sent right before the event card (acts like a\ncaption). The WhatsApp event has no caption field, so when set this is\ndelivered as a separate text message first, then the event card. Respects\nmentionAll/mentionedJid/delay.",
"type": "string"
}
}
},
"github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.LinkStruct": {
"type": "object",
"properties": {
Expand Down
162 changes: 162 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2567,6 +2567,52 @@
}
}
},
"/send/event": {
"post": {
"description": "Create and send a WhatsApp Event (group agenda). startTime/endTime accept an ISO 8601 (RFC3339) timestamp with timezone or epoch seconds. Typically sent to a group JID, e.g. 1203...@g.us.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Send Message"
],
"summary": "Send a WhatsApp event message",
"parameters": [
{
"description": "Event data",
"name": "message",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventStruct"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"$ref": "#/definitions/gin.H"
}
},
"400": {
"description": "Error on validation",
"schema": {
"$ref": "#/definitions/gin.H"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gin.H"
}
}
}
}
},
"/send/link": {
"post": {
"description": "Send a link message",
Expand Down Expand Up @@ -4343,6 +4389,122 @@
}
}
},
"github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventLocationStruct": {
"type": "object",
"properties": {
"address": {
"type": "string",
"example": "Av. Principal, 1000"
},
"latitude": {
"type": "number",
"example": -16.6869
},
"longitude": {
"type": "number",
"example": -49.2648
},
"name": {
"type": "string",
"example": "Sede Grupo Mirandas"
}
}
},
"github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventStruct": {
"type": "object",
"properties": {
"delay": {
"description": "Typing delay (milliseconds) before sending.",
"type": "integer"
},
"description": {
"description": "Optional long description.",
"type": "string"
},
"endTime": {
"description": "Optional event end. ISO 8601 with timezone or epoch seconds.",
"type": "string"
},
"extraGuestsAllowed": {
"description": "Allow guests to invite extra guests.",
"type": "boolean"
},
"formatJid": {
"description": "If false, skips JID formatting/validation of `number`.",
"type": "boolean"
},
"hasReminder": {
"description": "Enable a reminder for the event.",
"type": "boolean"
},
"id": {
"description": "Optional custom message ID.",
"type": "string"
},
"isCanceled": {
"description": "Cancel a previously created event.",
"type": "boolean"
},
"isScheduleCall": {
"description": "Whether this event is a scheduled call.",
"type": "boolean"
},
"joinLink": {
"description": "Optional call link (Meet, Zoom, etc.).",
"type": "string"
},
"location": {
"description": "Optional location (name + coordinates + address).",
"allOf": [
{
"$ref": "#/definitions/github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.EventLocationStruct"
}
]
},
"mentionAll": {
"description": "Mention every participant (groups only).",
"type": "boolean"
},
"mentionedJid": {
"description": "JIDs to mention inside the event.",
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"description": "Event title (required).",
"type": "string",
"example": "Reuniao de vendas"
},
"number": {
"description": "Destination JID (typically a group, e.g. 1203...@g.us).",
"type": "string",
"example": "120363000000000000@g.us"
},
"quoted": {
"description": "Quoted (reply-to) context.",
"allOf": [
{
"$ref": "#/definitions/github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.QuotedStruct"
}
]
},
"reminderOffsetSec": {
"description": "Seconds before startTime to fire the reminder (requires hasReminder).",
"type": "integer"
},
"startTime": {
"description": "Event start (required). ISO 8601 with timezone or epoch seconds.",
"type": "string",
"example": "2026-06-25T20:00:00-03:00"
},
"text": {
"description": "Optional text message sent right before the event card (acts like a\ncaption). The WhatsApp event has no caption field, so when set this is\ndelivered as a separate text message first, then the event card. Respects\nmentionAll/mentionedJid/delay.",
"type": "string"
}
}
},
"github_com_EvolutionAPI_evolution-go_pkg_sendMessage_service.LinkStruct": {
"type": "object",
"properties": {
Expand Down
Loading