List Snippets
curl --request GET \
--url https://app.adsera.in/api/pub/wa/snippet/list \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://app.adsera.in/api/pub/wa/snippet/list"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://app.adsera.in/api/pub/wa/snippet/list', 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.adsera.in/api/pub/wa/snippet/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <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"
"net/http"
"io"
)
func main() {
url := "https://app.adsera.in/api/pub/wa/snippet/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.adsera.in/api/pub/wa/snippet/list")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adsera.in/api/pub/wa/snippet/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"error": null,
"snippets": [
{
"_id": "<string>",
"name": "<string>",
"text": {
"body": "<string>",
"preview_url": true
},
"image": {
"link": "<string>",
"caption": "<string>"
},
"video": {
"link": "<string>",
"caption": "<string>"
},
"audio": {
"link": "<string>"
},
"document": {
"link": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"sticker": {
"link": "<string>"
},
"location": {
"longitude": 123,
"latitude": 123,
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"name": {
"formatted_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"suffix": "<string>",
"prefix": "<string>"
},
"addresses": [
{
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"country_code": "<string>",
"type": "<string>"
}
],
"birthday": "<string>",
"phones": [
{
"phone": "<string>",
"type": "<string>",
"wa_id": "<string>"
}
],
"emails": [
{
"email": "<string>",
"type": "<string>"
}
],
"org": {
"company": "<string>",
"department": "<string>",
"title": "<string>"
},
"urls": [
{
"url": "<string>",
"type": "<string>"
}
]
}
],
"interactive": {
"action": {
"buttons": [
{
"type": "<unknown>",
"reply": {
"title": "<string>",
"id": "<string>"
}
}
],
"button": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"product_items": [
{
"product_retailer_id": "<string>"
}
]
}
],
"catalog_id": "<string>",
"product_retailer_id": "<string>",
"name": "<string>",
"parameters": {}
},
"header": {
"text": "<string>",
"video": {
"link": "<string>",
"caption": "<string>"
},
"image": {
"link": "<string>",
"caption": "<string>"
},
"document": {
"link": "<string>",
"caption": "<string>",
"filename": "<string>"
}
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 100,
"currentPage": 1,
"perPage": 10
}{
"status": 401,
"success": false,
"error": "Unauthorized: Please provide valid API credentials."
}{
"status": 500,
"success": false,
"error": "Internal Server Error!"
}Snippets
List Snippets
Retrieves a paginated list of snippets.
GET
/
api
/
pub
/
wa
/
snippet
/
list
List Snippets
curl --request GET \
--url https://app.adsera.in/api/pub/wa/snippet/list \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://app.adsera.in/api/pub/wa/snippet/list"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://app.adsera.in/api/pub/wa/snippet/list', 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.adsera.in/api/pub/wa/snippet/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <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"
"net/http"
"io"
)
func main() {
url := "https://app.adsera.in/api/pub/wa/snippet/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.adsera.in/api/pub/wa/snippet/list")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adsera.in/api/pub/wa/snippet/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"error": null,
"snippets": [
{
"_id": "<string>",
"name": "<string>",
"text": {
"body": "<string>",
"preview_url": true
},
"image": {
"link": "<string>",
"caption": "<string>"
},
"video": {
"link": "<string>",
"caption": "<string>"
},
"audio": {
"link": "<string>"
},
"document": {
"link": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"sticker": {
"link": "<string>"
},
"location": {
"longitude": 123,
"latitude": 123,
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"name": {
"formatted_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"suffix": "<string>",
"prefix": "<string>"
},
"addresses": [
{
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"country_code": "<string>",
"type": "<string>"
}
],
"birthday": "<string>",
"phones": [
{
"phone": "<string>",
"type": "<string>",
"wa_id": "<string>"
}
],
"emails": [
{
"email": "<string>",
"type": "<string>"
}
],
"org": {
"company": "<string>",
"department": "<string>",
"title": "<string>"
},
"urls": [
{
"url": "<string>",
"type": "<string>"
}
]
}
],
"interactive": {
"action": {
"buttons": [
{
"type": "<unknown>",
"reply": {
"title": "<string>",
"id": "<string>"
}
}
],
"button": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"product_items": [
{
"product_retailer_id": "<string>"
}
]
}
],
"catalog_id": "<string>",
"product_retailer_id": "<string>",
"name": "<string>",
"parameters": {}
},
"header": {
"text": "<string>",
"video": {
"link": "<string>",
"caption": "<string>"
},
"image": {
"link": "<string>",
"caption": "<string>"
},
"document": {
"link": "<string>",
"caption": "<string>",
"filename": "<string>"
}
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 100,
"currentPage": 1,
"perPage": 10
}{
"status": 401,
"success": false,
"error": "Unauthorized: Please provide valid API credentials."
}{
"status": 500,
"success": false,
"error": "Internal Server Error!"
}Authorizations
Your application's unique ID.
Your application's secret key.
Query Parameters
The page number for pagination.
The number of items to return per page.
Search query for snippet name.
Filter by message type.
Available options:
text, image, audio, document, video, sticker, location, contacts, interactive Was this page helpful?
⌘I