cURL
curl --request POST \
--url https://api-dev.messagefy.io/api/v1/message/SendMessage \
--header 'Content-Type: application/json; v=1.0' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"packageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"correlationId": "<string>",
"originPackageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationName": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountName": "<string>",
"content": {
"text": "<string>",
"to": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"type": "TEXT",
"from": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"messageId": "<string>",
"isFromMe": true,
"isGroupMessage": true,
"deliveryStrategy": 123,
"priority": 3,
"deliveryDeadline": "2023-11-07T05:31:56Z",
"isForwarded": true,
"isStatusMessage": true,
"isHistoryMessage": true,
"isNewsletter": true,
"isBroadcast": true,
"isAnnounceGroup": true,
"isCommunityNotices": true,
"quotedMessage": {
"messageId": "<string>",
"participant": "<string>",
"body": "<string>",
"type": "<string>",
"thumbnail": "<string>",
"isStatusReply": true
},
"metaReferralAds": {
"sourceUrl": "<string>",
"sourceType": "<string>",
"sourceId": "<string>",
"headline": "<string>",
"body": "<string>",
"mediaType": "<string>",
"imageUrl": "<string>",
"videoUrl": "<string>",
"thumbnailUrl": "<string>",
"ctwaClid": "<string>"
},
"timestamp": "2023-11-07T05:31:56Z"
},
"timestamp": "2023-11-07T05:31:56Z",
"echoMessage": true,
"providerMetadata": {}
}
'import requests
url = "https://api-dev.messagefy.io/api/v1/message/SendMessage"
payload = {
"packageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"correlationId": "<string>",
"originPackageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationName": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountName": "<string>",
"content": {
"text": "<string>",
"to": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"type": "TEXT",
"from": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"messageId": "<string>",
"isFromMe": True,
"isGroupMessage": True,
"deliveryStrategy": 123,
"priority": 3,
"deliveryDeadline": "2023-11-07T05:31:56Z",
"isForwarded": True,
"isStatusMessage": True,
"isHistoryMessage": True,
"isNewsletter": True,
"isBroadcast": True,
"isAnnounceGroup": True,
"isCommunityNotices": True,
"quotedMessage": {
"messageId": "<string>",
"participant": "<string>",
"body": "<string>",
"type": "<string>",
"thumbnail": "<string>",
"isStatusReply": True
},
"metaReferralAds": {
"sourceUrl": "<string>",
"sourceType": "<string>",
"sourceId": "<string>",
"headline": "<string>",
"body": "<string>",
"mediaType": "<string>",
"imageUrl": "<string>",
"videoUrl": "<string>",
"thumbnailUrl": "<string>",
"ctwaClid": "<string>"
},
"timestamp": "2023-11-07T05:31:56Z"
},
"timestamp": "2023-11-07T05:31:56Z",
"echoMessage": True,
"providerMetadata": {}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json; v=1.0"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json; v=1.0'},
body: JSON.stringify({
packageId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
correlationId: '<string>',
originPackageId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
organizationID: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
organizationName: '<string>',
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
accountName: '<string>',
content: {
text: '<string>',
to: {type: 'EMAIL', email: '<string>', name: '<string>'},
type: 'TEXT',
from: {type: 'EMAIL', email: '<string>', name: '<string>'},
messageId: '<string>',
isFromMe: true,
isGroupMessage: true,
deliveryStrategy: 123,
priority: 3,
deliveryDeadline: '2023-11-07T05:31:56Z',
isForwarded: true,
isStatusMessage: true,
isHistoryMessage: true,
isNewsletter: true,
isBroadcast: true,
isAnnounceGroup: true,
isCommunityNotices: true,
quotedMessage: {
messageId: '<string>',
participant: '<string>',
body: JSON.stringify('<string>'),
type: '<string>',
thumbnail: '<string>',
isStatusReply: true
},
metaReferralAds: {
sourceUrl: '<string>',
sourceType: '<string>',
sourceId: '<string>',
headline: '<string>',
body: JSON.stringify('<string>'),
mediaType: '<string>',
imageUrl: '<string>',
videoUrl: '<string>',
thumbnailUrl: '<string>',
ctwaClid: '<string>'
},
timestamp: '2023-11-07T05:31:56Z'
},
timestamp: '2023-11-07T05:31:56Z',
echoMessage: true,
providerMetadata: {}
})
};
fetch('https://api-dev.messagefy.io/api/v1/message/SendMessage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.messagefy.io/api/v1/message/SendMessage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'packageId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'correlationId' => '<string>',
'originPackageId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'organizationID' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'organizationName' => '<string>',
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'accountName' => '<string>',
'content' => [
'text' => '<string>',
'to' => [
'type' => 'EMAIL',
'email' => '<string>',
'name' => '<string>'
],
'type' => 'TEXT',
'from' => [
'type' => 'EMAIL',
'email' => '<string>',
'name' => '<string>'
],
'messageId' => '<string>',
'isFromMe' => true,
'isGroupMessage' => true,
'deliveryStrategy' => 123,
'priority' => 3,
'deliveryDeadline' => '2023-11-07T05:31:56Z',
'isForwarded' => true,
'isStatusMessage' => true,
'isHistoryMessage' => true,
'isNewsletter' => true,
'isBroadcast' => true,
'isAnnounceGroup' => true,
'isCommunityNotices' => true,
'quotedMessage' => [
'messageId' => '<string>',
'participant' => '<string>',
'body' => '<string>',
'type' => '<string>',
'thumbnail' => '<string>',
'isStatusReply' => true
],
'metaReferralAds' => [
'sourceUrl' => '<string>',
'sourceType' => '<string>',
'sourceId' => '<string>',
'headline' => '<string>',
'body' => '<string>',
'mediaType' => '<string>',
'imageUrl' => '<string>',
'videoUrl' => '<string>',
'thumbnailUrl' => '<string>',
'ctwaClid' => '<string>'
],
'timestamp' => '2023-11-07T05:31:56Z'
],
'timestamp' => '2023-11-07T05:31:56Z',
'echoMessage' => true,
'providerMetadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json; v=1.0",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.messagefy.io/api/v1/message/SendMessage"
payload := strings.NewReader("{\n \"packageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"correlationId\": \"<string>\",\n \"originPackageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationID\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationName\": \"<string>\",\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accountName\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"to\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"type\": \"TEXT\",\n \"from\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"messageId\": \"<string>\",\n \"isFromMe\": true,\n \"isGroupMessage\": true,\n \"deliveryStrategy\": 123,\n \"priority\": 3,\n \"deliveryDeadline\": \"2023-11-07T05:31:56Z\",\n \"isForwarded\": true,\n \"isStatusMessage\": true,\n \"isHistoryMessage\": true,\n \"isNewsletter\": true,\n \"isBroadcast\": true,\n \"isAnnounceGroup\": true,\n \"isCommunityNotices\": true,\n \"quotedMessage\": {\n \"messageId\": \"<string>\",\n \"participant\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"thumbnail\": \"<string>\",\n \"isStatusReply\": true\n },\n \"metaReferralAds\": {\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"mediaType\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"ctwaClid\": \"<string>\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"echoMessage\": true,\n \"providerMetadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json; v=1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-dev.messagefy.io/api/v1/message/SendMessage")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json; v=1.0")
.body("{\n \"packageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"correlationId\": \"<string>\",\n \"originPackageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationID\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationName\": \"<string>\",\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accountName\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"to\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"type\": \"TEXT\",\n \"from\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"messageId\": \"<string>\",\n \"isFromMe\": true,\n \"isGroupMessage\": true,\n \"deliveryStrategy\": 123,\n \"priority\": 3,\n \"deliveryDeadline\": \"2023-11-07T05:31:56Z\",\n \"isForwarded\": true,\n \"isStatusMessage\": true,\n \"isHistoryMessage\": true,\n \"isNewsletter\": true,\n \"isBroadcast\": true,\n \"isAnnounceGroup\": true,\n \"isCommunityNotices\": true,\n \"quotedMessage\": {\n \"messageId\": \"<string>\",\n \"participant\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"thumbnail\": \"<string>\",\n \"isStatusReply\": true\n },\n \"metaReferralAds\": {\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"mediaType\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"ctwaClid\": \"<string>\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"echoMessage\": true,\n \"providerMetadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.messagefy.io/api/v1/message/SendMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json; v=1.0'
request.body = "{\n \"packageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"correlationId\": \"<string>\",\n \"originPackageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationID\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationName\": \"<string>\",\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accountName\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"to\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"type\": \"TEXT\",\n \"from\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"messageId\": \"<string>\",\n \"isFromMe\": true,\n \"isGroupMessage\": true,\n \"deliveryStrategy\": 123,\n \"priority\": 3,\n \"deliveryDeadline\": \"2023-11-07T05:31:56Z\",\n \"isForwarded\": true,\n \"isStatusMessage\": true,\n \"isHistoryMessage\": true,\n \"isNewsletter\": true,\n \"isBroadcast\": true,\n \"isAnnounceGroup\": true,\n \"isCommunityNotices\": true,\n \"quotedMessage\": {\n \"messageId\": \"<string>\",\n \"participant\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"thumbnail\": \"<string>\",\n \"isStatusReply\": true\n },\n \"metaReferralAds\": {\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"mediaType\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"ctwaClid\": \"<string>\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"echoMessage\": true,\n \"providerMetadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Mensagens
Enviar Mensagem
Envia uma mensagem para um canal
POST
/
api
/
v1
/
message
/
SendMessage
cURL
curl --request POST \
--url https://api-dev.messagefy.io/api/v1/message/SendMessage \
--header 'Content-Type: application/json; v=1.0' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"packageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"correlationId": "<string>",
"originPackageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationName": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountName": "<string>",
"content": {
"text": "<string>",
"to": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"type": "TEXT",
"from": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"messageId": "<string>",
"isFromMe": true,
"isGroupMessage": true,
"deliveryStrategy": 123,
"priority": 3,
"deliveryDeadline": "2023-11-07T05:31:56Z",
"isForwarded": true,
"isStatusMessage": true,
"isHistoryMessage": true,
"isNewsletter": true,
"isBroadcast": true,
"isAnnounceGroup": true,
"isCommunityNotices": true,
"quotedMessage": {
"messageId": "<string>",
"participant": "<string>",
"body": "<string>",
"type": "<string>",
"thumbnail": "<string>",
"isStatusReply": true
},
"metaReferralAds": {
"sourceUrl": "<string>",
"sourceType": "<string>",
"sourceId": "<string>",
"headline": "<string>",
"body": "<string>",
"mediaType": "<string>",
"imageUrl": "<string>",
"videoUrl": "<string>",
"thumbnailUrl": "<string>",
"ctwaClid": "<string>"
},
"timestamp": "2023-11-07T05:31:56Z"
},
"timestamp": "2023-11-07T05:31:56Z",
"echoMessage": true,
"providerMetadata": {}
}
'import requests
url = "https://api-dev.messagefy.io/api/v1/message/SendMessage"
payload = {
"packageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"correlationId": "<string>",
"originPackageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationName": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountName": "<string>",
"content": {
"text": "<string>",
"to": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"type": "TEXT",
"from": {
"type": "EMAIL",
"email": "<string>",
"name": "<string>"
},
"messageId": "<string>",
"isFromMe": True,
"isGroupMessage": True,
"deliveryStrategy": 123,
"priority": 3,
"deliveryDeadline": "2023-11-07T05:31:56Z",
"isForwarded": True,
"isStatusMessage": True,
"isHistoryMessage": True,
"isNewsletter": True,
"isBroadcast": True,
"isAnnounceGroup": True,
"isCommunityNotices": True,
"quotedMessage": {
"messageId": "<string>",
"participant": "<string>",
"body": "<string>",
"type": "<string>",
"thumbnail": "<string>",
"isStatusReply": True
},
"metaReferralAds": {
"sourceUrl": "<string>",
"sourceType": "<string>",
"sourceId": "<string>",
"headline": "<string>",
"body": "<string>",
"mediaType": "<string>",
"imageUrl": "<string>",
"videoUrl": "<string>",
"thumbnailUrl": "<string>",
"ctwaClid": "<string>"
},
"timestamp": "2023-11-07T05:31:56Z"
},
"timestamp": "2023-11-07T05:31:56Z",
"echoMessage": True,
"providerMetadata": {}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json; v=1.0"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json; v=1.0'},
body: JSON.stringify({
packageId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
correlationId: '<string>',
originPackageId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
organizationID: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
organizationName: '<string>',
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
accountName: '<string>',
content: {
text: '<string>',
to: {type: 'EMAIL', email: '<string>', name: '<string>'},
type: 'TEXT',
from: {type: 'EMAIL', email: '<string>', name: '<string>'},
messageId: '<string>',
isFromMe: true,
isGroupMessage: true,
deliveryStrategy: 123,
priority: 3,
deliveryDeadline: '2023-11-07T05:31:56Z',
isForwarded: true,
isStatusMessage: true,
isHistoryMessage: true,
isNewsletter: true,
isBroadcast: true,
isAnnounceGroup: true,
isCommunityNotices: true,
quotedMessage: {
messageId: '<string>',
participant: '<string>',
body: JSON.stringify('<string>'),
type: '<string>',
thumbnail: '<string>',
isStatusReply: true
},
metaReferralAds: {
sourceUrl: '<string>',
sourceType: '<string>',
sourceId: '<string>',
headline: '<string>',
body: JSON.stringify('<string>'),
mediaType: '<string>',
imageUrl: '<string>',
videoUrl: '<string>',
thumbnailUrl: '<string>',
ctwaClid: '<string>'
},
timestamp: '2023-11-07T05:31:56Z'
},
timestamp: '2023-11-07T05:31:56Z',
echoMessage: true,
providerMetadata: {}
})
};
fetch('https://api-dev.messagefy.io/api/v1/message/SendMessage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.messagefy.io/api/v1/message/SendMessage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'packageId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'correlationId' => '<string>',
'originPackageId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'organizationID' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'organizationName' => '<string>',
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'accountName' => '<string>',
'content' => [
'text' => '<string>',
'to' => [
'type' => 'EMAIL',
'email' => '<string>',
'name' => '<string>'
],
'type' => 'TEXT',
'from' => [
'type' => 'EMAIL',
'email' => '<string>',
'name' => '<string>'
],
'messageId' => '<string>',
'isFromMe' => true,
'isGroupMessage' => true,
'deliveryStrategy' => 123,
'priority' => 3,
'deliveryDeadline' => '2023-11-07T05:31:56Z',
'isForwarded' => true,
'isStatusMessage' => true,
'isHistoryMessage' => true,
'isNewsletter' => true,
'isBroadcast' => true,
'isAnnounceGroup' => true,
'isCommunityNotices' => true,
'quotedMessage' => [
'messageId' => '<string>',
'participant' => '<string>',
'body' => '<string>',
'type' => '<string>',
'thumbnail' => '<string>',
'isStatusReply' => true
],
'metaReferralAds' => [
'sourceUrl' => '<string>',
'sourceType' => '<string>',
'sourceId' => '<string>',
'headline' => '<string>',
'body' => '<string>',
'mediaType' => '<string>',
'imageUrl' => '<string>',
'videoUrl' => '<string>',
'thumbnailUrl' => '<string>',
'ctwaClid' => '<string>'
],
'timestamp' => '2023-11-07T05:31:56Z'
],
'timestamp' => '2023-11-07T05:31:56Z',
'echoMessage' => true,
'providerMetadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json; v=1.0",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.messagefy.io/api/v1/message/SendMessage"
payload := strings.NewReader("{\n \"packageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"correlationId\": \"<string>\",\n \"originPackageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationID\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationName\": \"<string>\",\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accountName\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"to\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"type\": \"TEXT\",\n \"from\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"messageId\": \"<string>\",\n \"isFromMe\": true,\n \"isGroupMessage\": true,\n \"deliveryStrategy\": 123,\n \"priority\": 3,\n \"deliveryDeadline\": \"2023-11-07T05:31:56Z\",\n \"isForwarded\": true,\n \"isStatusMessage\": true,\n \"isHistoryMessage\": true,\n \"isNewsletter\": true,\n \"isBroadcast\": true,\n \"isAnnounceGroup\": true,\n \"isCommunityNotices\": true,\n \"quotedMessage\": {\n \"messageId\": \"<string>\",\n \"participant\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"thumbnail\": \"<string>\",\n \"isStatusReply\": true\n },\n \"metaReferralAds\": {\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"mediaType\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"ctwaClid\": \"<string>\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"echoMessage\": true,\n \"providerMetadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json; v=1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-dev.messagefy.io/api/v1/message/SendMessage")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json; v=1.0")
.body("{\n \"packageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"correlationId\": \"<string>\",\n \"originPackageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationID\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationName\": \"<string>\",\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accountName\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"to\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"type\": \"TEXT\",\n \"from\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"messageId\": \"<string>\",\n \"isFromMe\": true,\n \"isGroupMessage\": true,\n \"deliveryStrategy\": 123,\n \"priority\": 3,\n \"deliveryDeadline\": \"2023-11-07T05:31:56Z\",\n \"isForwarded\": true,\n \"isStatusMessage\": true,\n \"isHistoryMessage\": true,\n \"isNewsletter\": true,\n \"isBroadcast\": true,\n \"isAnnounceGroup\": true,\n \"isCommunityNotices\": true,\n \"quotedMessage\": {\n \"messageId\": \"<string>\",\n \"participant\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"thumbnail\": \"<string>\",\n \"isStatusReply\": true\n },\n \"metaReferralAds\": {\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"mediaType\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"ctwaClid\": \"<string>\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"echoMessage\": true,\n \"providerMetadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.messagefy.io/api/v1/message/SendMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json; v=1.0'
request.body = "{\n \"packageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"correlationId\": \"<string>\",\n \"originPackageId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationID\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"organizationName\": \"<string>\",\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accountName\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"to\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"type\": \"TEXT\",\n \"from\": {\n \"type\": \"EMAIL\",\n \"email\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"messageId\": \"<string>\",\n \"isFromMe\": true,\n \"isGroupMessage\": true,\n \"deliveryStrategy\": 123,\n \"priority\": 3,\n \"deliveryDeadline\": \"2023-11-07T05:31:56Z\",\n \"isForwarded\": true,\n \"isStatusMessage\": true,\n \"isHistoryMessage\": true,\n \"isNewsletter\": true,\n \"isBroadcast\": true,\n \"isAnnounceGroup\": true,\n \"isCommunityNotices\": true,\n \"quotedMessage\": {\n \"messageId\": \"<string>\",\n \"participant\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"thumbnail\": \"<string>\",\n \"isStatusReply\": true\n },\n \"metaReferralAds\": {\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"mediaType\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"ctwaClid\": \"<string>\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n },\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"echoMessage\": true,\n \"providerMetadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Chave de API fornecida pelo painel administrativo do MessageFy. Enviada no header de cada requisição. O gateway APISIX valida a chave e injeta os headers X-Consumer-* automaticamente.
Body
application/json; v=1.0text/json; v=1.0application/*+json; v=1.0
- Texto
- Template
- Reação
- Localização
- Localização ao Vivo
- Contato
- Lista de Contatos
- Pedido
- Interativo
- Endereço
- Documento
- Imagem
- Sticker
- Vídeo
- Áudio
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK