Ruby
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse('https://app.tatango.com/api/v2/lists/ID/messages')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth("emailaddress@mydomain.com", "my_api_key")
request['Accept'] = 'application/json'
request['Content-Type'] = 'application/json'
request.body = {"message" => {"content" => "Hello from Tatango!", "send_at" => "2023-12-01T10:00:00Z"}}.to_json
response = http.request(request)curl --request POST \
--url https://app.tatango.com/api/v2/lists/{ID}/messages \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"content": "Your message content here"
}
}
'import requests
url = "https://app.tatango.com/api/v2/lists/{ID}/messages"
payload = { "message": { "content": "Your message content here" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: {content: 'Your message content here'}})
};
fetch('https://app.tatango.com/api/v2/lists/{ID}/messages', 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://app.tatango.com/api/v2/lists/{ID}/messages",
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([
'message' => [
'content' => 'Your message content here'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://app.tatango.com/api/v2/lists/{ID}/messages"
payload := strings.NewReader("{\n \"message\": {\n \"content\": \"Your message content here\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.tatango.com/api/v2/lists/{ID}/messages")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"content\": \"Your message content here\"\n }\n}")
.asString();{
"status": "OK",
"message": {
"id": 4
}
}Messaging
Send Message to Entire List
This endpoint sends a message.
POST
/
api
/
v2
/
lists
/
{ID}
/
messages
Ruby
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse('https://app.tatango.com/api/v2/lists/ID/messages')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth("emailaddress@mydomain.com", "my_api_key")
request['Accept'] = 'application/json'
request['Content-Type'] = 'application/json'
request.body = {"message" => {"content" => "Hello from Tatango!", "send_at" => "2023-12-01T10:00:00Z"}}.to_json
response = http.request(request)curl --request POST \
--url https://app.tatango.com/api/v2/lists/{ID}/messages \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"content": "Your message content here"
}
}
'import requests
url = "https://app.tatango.com/api/v2/lists/{ID}/messages"
payload = { "message": { "content": "Your message content here" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: {content: 'Your message content here'}})
};
fetch('https://app.tatango.com/api/v2/lists/{ID}/messages', 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://app.tatango.com/api/v2/lists/{ID}/messages",
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([
'message' => [
'content' => 'Your message content here'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://app.tatango.com/api/v2/lists/{ID}/messages"
payload := strings.NewReader("{\n \"message\": {\n \"content\": \"Your message content here\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.tatango.com/api/v2/lists/{ID}/messages")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"content\": \"Your message content here\"\n }\n}")
.asString();{
"status": "OK",
"message": {
"id": 4
}
}Request URL
POST https://app.tatango.com/api/v2/lists/{ID}/messages
Authorizations
The momoGood Messaging API v2 authenticates requests by validating an API key passed via HTTP Basic Authentication. Use your login email as the username and your API key as the password.
Path Parameters
ID of the list
Body
application/json
Show child attributes
Show child attributes