Skip to main content
GET
/
api
/
canned-replies
canned-replies
curl --request GET \
  --url https://swiftchats.axis96.xyz/api/canned-replies \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://swiftchats.axis96.xyz/api/canned-replies"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://swiftchats.axis96.xyz/api/canned-replies', 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://swiftchats.axis96.xyz/api/canned-replies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://swiftchats.axis96.xyz/api/canned-replies"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://swiftchats.axis96.xyz/api/canned-replies")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://swiftchats.axis96.xyz/api/canned-replies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": 1,
      "uuid": "80552ad3-ae00-4047-8937-ddeb8513d513",
      "organization_id": 7,
      "name": "Hello Reply",
      "trigger": "Hello",
      "match_criteria": "exact match",
      "metadata": "{\"type\":\"text\",\"data\":{\"text\":\"Hello there, how can I help you?\"}}",
      "created_by": 5,
      "deleted_by": null,
      "deleted_at": null,
      "created_at": "2024-04-06 20:11:44",
      "updated_at": "2024-04-06 20:11:44"
    },
    {
      "id": 3,
      "uuid": "cc505ae6-4dca-4312-b75e-1c78db6ab8d4",
      "organization_id": 7,
      "name": "Service Response",
      "trigger": "what are your services?",
      "match_criteria": "contains",
      "metadata": "{\"type\":\"text\",\"data\":{\"text\":\"We are involved in litigation, tax and business consultancy.\"}}",
      "created_by": 5,
      "deleted_by": null,
      "deleted_at": null,
      "created_at": "2024-04-09 13:12:38",
      "updated_at": "2024-04-09 13:12:38"
    },
    {
      "id": 4,
      "uuid": "e08a0135-3175-4a66-96f4-cc941e383161",
      "organization_id": 7,
      "name": "About Us",
      "trigger": "what do you do?",
      "match_criteria": "contains",
      "metadata": "{\"type\":\"text\",\"data\":{\"text\":\"We sell shoes\"}}",
      "created_by": 0,
      "deleted_by": null,
      "deleted_at": null,
      "created_at": "2024-04-09 13:49:57",
      "updated_at": "2024-04-09 13:49:57"
    },
    {
      "id": 5,
      "uuid": "412779bb-95d7-4a39-ae78-9f8d720f6c93",
      "organization_id": 7,
      "name": "About Us",
      "trigger": "what do you do?",
      "match_criteria": "contains",
      "metadata": "{\"type\":\"text\",\"data\":{\"text\":\"We sell shoes\"}}",
      "created_by": 0,
      "deleted_by": null,
      "deleted_at": null,
      "created_at": "2024-04-09 13:50:27",
      "updated_at": "2024-04-09 13:50:27"
    },
    {
      "id": 6,
      "uuid": "9d3015ba-2532-4817-b892-0835e16817f4",
      "organization_id": 7,
      "name": "About Us",
      "trigger": "what do you do?",
      "match_criteria": "contains",
      "metadata": "{\"type\":\"text\",\"data\":{\"text\":\"We sell shoes and clothes\"}}",
      "created_by": 0,
      "deleted_by": null,
      "deleted_at": null,
      "created_at": "2024-04-09 13:51:24",
      "updated_at": "2024-04-09 13:52:39"
    }
  ],
  "links": {
    "first": "http://whatsappsender.test/api/canned-replies?page=1",
    "last": "http://whatsappsender.test/api/canned-replies?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "http://whatsappsender.test/api/canned-replies?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "active": false
      }
    ],
    "path": "http://whatsappsender.test/api/canned-replies",
    "per_page": 10,
    "to": 5,
    "total": 5
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json

OK

The response is of type object.