Save FAQs

Overview

Set the business's frequently asked questions.

Use this to add or edit them.

You'll need the questions and answers.

The list is saved. Each save replaces all of the account's FAQs of that type (or those with no type, when you leave type out), so send the full list. faqs must have at least one entry.

Prerequisites

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/account/faq/save

Authentication

Partner or Account token

  • company_id must be inside your own account tree. A Partner token can use any account under the partner; an Account token only its own account.
  • An account outside your tree, or one that doesn't exist, is rejected with 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
company_idintegerYesThe account. Must exist and be inside your account tree.
typestringNoWhich page the FAQs are for: landing_page or widget. Left out: saved with no type.
faqsarray of objectsYesThe full list of FAQs, at least one. Replaces the saved list.
faqs[].questionstringYesThe question.
faqs[].answerstringYesThe answer.
faqs[].statusstringYesactive or inactive.

Request payload

{
  "company_id": 5994,
  "type": "landing_page",
  "faqs": [
    {
      "question": "How do I leave a review?",
      "answer": "Click the link in the email we sent you.",
      "status": "active"
    },
    {
      "question": "Can I edit my review?",
      "answer": "Contact support to make changes.",
      "status": "inactive"
    }
  ]
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
dataarray of objectsThe faqs you sent, as sent.
data[].questionstringThe question.
data[].answerstringThe answer.
data[].statusstringactive or inactive.
messagestringFAQ saved successfully.

Response payload

{
  "data": {
    "status": "success",
    "data": [
      {
        "question": "How do I leave a review?",
        "answer": "Click the link in the email we sent you.",
        "status": "active"
      },
      {
        "question": "Can I edit my review?",
        "answer": "Contact support to make changes.",
        "status": "inactive"
      }
    ],
    "message": "FAQ saved successfully"
  }
}

Examples

Success payload

See Response payload.

Error payload

422 faqs is missing or empty

{
  "message": "The faqs field is required.",
  "errors": {
    "faqs": [
      "The faqs field is required."
    ]
  }
}

422 A status isn't allowed

{
  "message": "The selected faqs.0.status is invalid.",
  "errors": {
    "faqs.0.status": [
      "The selected faqs.0.status is invalid."
    ]
  }
}

422 Account outside your tree

{
  "message": "The selected company id does not belong to your company hierarchy.",
  "errors": {
    "company_id": [
      "The selected company id does not belong to your company hierarchy."
    ]
  }
}
StatusMeaning
200The FAQs were saved.
401The token is missing, expired or invalid.
422faqs is missing or empty, an entry is missing a field or has a status that isn't allowed, or company_id is missing, doesn't exist or is outside your tree.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/faq/save" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"company_id": 5994, "type": "landing_page", "faqs": [{"question": "How do I leave a review?", "answer": "Click the link in the email we sent you.", "status": "active"}, {"question": "Can I edit my review?", "answer": "Contact support to make changes.", "status": "inactive"}]}'

Did this page help you?