cURL
curl --request PATCH \
--url https://api.interacto.io/group/{id}/image \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"imageUrl": "https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA"
}
'import requests
url = "https://api.interacto.io/group/{id}/image"
payload = { "imageUrl": "https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
imageUrl: 'https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA'
})
};
fetch('https://api.interacto.io/group/{id}/image', 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.interacto.io/group/{id}/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'imageUrl' => 'https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.interacto.io/group/{id}/image"
payload := strings.NewReader("{\n \"imageUrl\": \"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.patch("https://api.interacto.io/group/{id}/image")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"imageUrl\": \"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.interacto.io/group/{id}/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"imageUrl\": \"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA\"\n}"
response = http.request(request)
puts response.read_body{
"id": "66c266130c991c46299dedf8",
"wpId": "120363321438738644@g.us",
"instanceId": "66a09db606fd14660c8fc1d0",
"name": "My Cool Group",
"image": "",
"participants": [
"551199999999",
"551188888888"
],
"admins": []
}{
"error": 123,
"message": "<string>"
}Endpoints
Alterar imagem do grupo
O endpoint /group/{id}/image permite alterar a imagem de um grupo existente. Este endpoint requer o ID do grupo e a nova imagem a ser associada ao grupo.
PATCH
/
group
/
{id}
/
image
cURL
curl --request PATCH \
--url https://api.interacto.io/group/{id}/image \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"imageUrl": "https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA"
}
'import requests
url = "https://api.interacto.io/group/{id}/image"
payload = { "imageUrl": "https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
imageUrl: 'https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA'
})
};
fetch('https://api.interacto.io/group/{id}/image', 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.interacto.io/group/{id}/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'imageUrl' => 'https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.interacto.io/group/{id}/image"
payload := strings.NewReader("{\n \"imageUrl\": \"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.patch("https://api.interacto.io/group/{id}/image")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"imageUrl\": \"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.interacto.io/group/{id}/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"imageUrl\": \"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA\"\n}"
response = http.request(request)
puts response.read_body{
"id": "66c266130c991c46299dedf8",
"wpId": "120363321438738644@g.us",
"instanceId": "66a09db606fd14660c8fc1d0",
"name": "My Cool Group",
"image": "",
"participants": [
"551199999999",
"551188888888"
],
"admins": []
}{
"error": 123,
"message": "<string>"
}Authorizations
API Key needed to access the endpoints
Path Parameters
Body
application/json
URL of the image
Example:
"https://fastly.picsum.photos/id/821/200/300.jpg?hmac=-CLZlHMcIt8hXlUFZ4-3AvLYDsUJSwUeTri-zHDlnoA"
Response
Busca todos os grupos que voce tem
Unique identifier for the created group
Example:
"66c266130c991c46299dedf8"
Id do seu grupo no Whatsapp
Example:
"120363321438738644@g.us"
Id da instancia onde o seu grupo foi criado
Example:
"66a09db606fd14660c8fc1d0"
Nome que voce deu ao seu grupo
Example:
"My Cool Group"
Url da imagem do seu grupo
Example:
""
Participantes que estao no seu grupo
Example:
["551199999999", "551188888888"]
Admistradores que voce delegou
Example:
[]
⌘I