Skip to main content
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>'
{
  "status": 200,
  "success": true,
  "error": null,
  "snippets": [
    {
      "_id": "<string>",
      "name": "<string>",
      "messageType": "text",
      "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": {
        "type": "button",
        "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": {
          "type": "text",
          "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
}

Authorizations

x-api-key
string
header
required

Your application's unique ID.

x-api-secret
string
header
required

Your application's secret key.

Query Parameters

page
integer
default:1

The page number for pagination.

perPage
integer
default:10

The number of items to return per page.

Search query for snippet name.

messageType
enum<string>

Filter by message type.

Available options:
text,
image,
audio,
document,
video,
sticker,
location,
contacts,
interactive

Response

A paginated list of snippets.

status
integer
Example:

200

success
boolean
Example:

true

error
null
Example:

null

snippets
object[]
totalCount
integer
Example:

100

currentPage
integer
Example:

1

perPage
integer
Example:

10