thefaqapp
API Reference

Questions

Manage FAQ questions

Manage FAQ questions

List questions

GET
/api/v1/{organizationSlug}/questions

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string

Query Parameters

page?|
limit?|
category?string

Filter by category slug

search?string

Full-text search query

status?string
Value in"published" | "draft"
featured?string
Value in"true" | "false"
tags?string

Comma-separated tag values

sortBy?string
Value in"created" | "updated" | "views" | "alphabetical" | "order" | "helpful"
sortOrder?string
Value in"asc" | "desc"

Response Body

application/json

curl -X GET "https://app.thefaq.app/api/v1/string/questions"
{
  "data": [
    {
      "id": "string",
      "question": "string",
      "answer": "string",
      "slug": "string",
      "published": true,
      "featured": true,
      "status": "published",
      "tags": [
        "string"
      ],
      "views": 0,
      "seoTitle": "string",
      "seoDescription": "string",
      "category": {
        "id": "string",
        "name": "string",
        "slug": "string"
      },
      "feedbackCount": 0,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 0,
      "limit": 0,
      "total": 0,
      "pages": 0
    }
  }
}
Empty

Create a question

POST
/api/v1/{organizationSlug}/questions

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://app.thefaq.app/api/v1/string/questions" \  -H "Content-Type: application/json" \  -d '{    "question": "string",    "answer": "string"  }'
{
  "data": {
    "id": "string",
    "question": "string",
    "answer": "string",
    "slug": "string",
    "published": true,
    "featured": true,
    "tags": [
      "string"
    ],
    "category": {
      "id": "string",
      "name": "string",
      "slug": "string"
    },
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
Empty
Empty
Empty

Get question by slug

GET
/api/v1/{organizationSlug}/questions/{slug}

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string
slug*string

Question slug

Response Body

application/json

curl -X GET "https://app.thefaq.app/api/v1/string/questions/how-to-get-started"
{
  "data": {
    "id": "string",
    "question": "string",
    "answer": "string",
    "slug": "string",
    "published": true,
    "featured": true,
    "status": "published",
    "tags": [
      "string"
    ],
    "views": 0,
    "seoTitle": "string",
    "seoDescription": "string",
    "category": {
      "id": "string",
      "name": "string",
      "slug": "string"
    },
    "stats": {
      "totalFeedback": 0,
      "helpfulCount": 0,
      "notHelpfulCount": 0,
      "helpfulPercentage": 0
    },
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
Empty
Empty

Update a question

PATCH
/api/v1/{organizationSlug}/questions/{slug}

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string
slug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://app.thefaq.app/api/v1/string/questions/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "string",
    "question": "string",
    "answer": "string",
    "slug": "string",
    "published": true,
    "featured": true,
    "tags": [
      "string"
    ],
    "category": {
      "id": "string",
      "name": "string",
      "slug": "string"
    },
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
Empty
Empty
Empty

Delete a question

DELETE
/api/v1/{organizationSlug}/questions/{slug}

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string
slug*string

Response Body

application/json

curl -X DELETE "https://app.thefaq.app/api/v1/string/questions/string"
{
  "data": {
    "deleted": true,
    "slug": "string"
  }
}
Empty
Empty

Bulk create or update questions

POST
/api/v1/{organizationSlug}/questions/bulk

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://app.thefaq.app/api/v1/string/questions/bulk" \  -H "Content-Type: application/json" \  -d '{    "questions": [      {        "question": "string",        "answer": "string"      }    ]  }'
{
  "data": {
    "created": 0,
    "updated": 0,
    "questions": [
      {
        "id": "string",
        "slug": "string",
        "question": "string"
      }
    ]
  }
}
Empty
Empty
Empty
Empty

Export questions

GET
/api/v1/{organizationSlug}/questions/export

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string

Query Parameters

page?|
limit?|
Rangevalue <= 1000
status?string
Value in"published" | "draft"

Response Body

application/json

curl -X GET "https://app.thefaq.app/api/v1/string/questions/export"
{
  "data": [
    {
      "id": "string",
      "question": "string",
      "answer": "string",
      "slug": "string",
      "published": true,
      "status": "published",
      "featured": true,
      "tags": [
        "string"
      ],
      "views": 0,
      "upvotes": 0,
      "downvotes": 0,
      "seoTitle": "string",
      "seoDescription": "string",
      "category": {
        "id": "string",
        "name": "string",
        "slug": "string"
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 0,
      "limit": 0,
      "total": 0,
      "pages": 0
    }
  }
}
Empty

Get feedback stats

GET
/api/v1/{organizationSlug}/questions/{slug}/feedback

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string
slug*string

Response Body

application/json

curl -X GET "https://app.thefaq.app/api/v1/string/questions/string/feedback"
{
  "data": {
    "totalFeedback": 0,
    "helpfulCount": 0,
    "notHelpfulCount": 0,
    "helpfulPercentage": 0
  }
}
Empty
Empty

Submit feedback

POST
/api/v1/{organizationSlug}/questions/{slug}/feedback

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard under Settings > API Keys.

In: header

Path Parameters

organizationSlug*string
slug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://app.thefaq.app/api/v1/string/questions/string/feedback" \  -H "Content-Type: application/json" \  -d '{    "helpful": true  }'
{
  "data": {
    "id": "string",
    "helpful": true
  }
}
Empty
Empty
Empty
Empty