Admin list FAQs
curl --request GET \
--url https://api.example.com/api/v1/admin/faqsimport requests
url = "https://api.example.com/api/v1/admin/faqs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/admin/faqs', 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.example.com/api/v1/admin/faqs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/api/v1/admin/faqs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/admin/faqs")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/faqs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyFAQs
Admin list FAQs
List all FAQs (published and drafts) for the admin FAQs manager.
GET
/
api
/
v1
/
admin
/
faqs
Admin list FAQs
curl --request GET \
--url https://api.example.com/api/v1/admin/faqsimport requests
url = "https://api.example.com/api/v1/admin/faqs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/admin/faqs', 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.example.com/api/v1/admin/faqs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/api/v1/admin/faqs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/admin/faqs")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/faqs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOverview
Returns every FAQ — published and drafts — ordered byorder ascending, for the admin panel’s FAQs manager. The public GET /faqs endpoint serves only the published rows.
Authentication
Bearer <accessToken> with scope: 'admin' required (requireAdmin). Any admin role may list.
Response — 200 OK
{
"items": [
{
"id": "665f0a1b2c3d4e5f60718293",
"question": "How does Swappr work?",
"answer": "You create a profile, upload details and photos of your home…",
"order": 1,
"isPublished": true,
"createdAt": "2026-06-14T10:00:00.000Z",
"updatedAt": "2026-06-14T10:00:00.000Z"
}
]
}
| Field | Type | Notes |
|---|---|---|
items[].id | string | 24-char Mongo ObjectId. |
items[].question | string | The question text. |
items[].answer | string | The answer text. |
items[].order | integer | Display order (ascending). |
items[].isPublished | boolean | false rows are hidden from the public endpoint. |
items[].createdAt | string | ISO 8601 timestamp. |
items[].updatedAt | string | ISO 8601 timestamp. |
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, expired, or non-admin-scope token. |
| 403 | FORBIDDEN | Token is not admin-scoped. |
See also
curl
curl "https://api.swappr.co.uk/api/v1/admin/faqs" \
-H "Authorization: Bearer $ADMIN_ACCESS_TOKEN"