Save how-it-works block

Overview

Replace the 'how it works' blocks for an account. Deletes all existing blocks for the given company_id + type, then inserts the supplied blocks. Each block's image may be an existing URL (stored as-is) or a data:image/.base64.. data URI. A data URI is decoded and uploaded to S3 (how-it-works/<uniqid>.<ext>), with the resulting public URL stored as image_url.

Prerequisites

  • A bearer token. Callable with Partner and Account tokens.

Base URL

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

Endpoint

POST /api/v1/account/faq/block

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Who can call it: Partner and Account tokens.

  • Target company comes from the company_id body field. There is no ownership/partner-tree scoping, so any authenticated Partner or Account user can write blocks for any company id.

  • Role only changes which company_id you pass.

Rate limit

  • No rate limit.

Request body

  • Body:
FieldTypeRequiredDescription
company_idintegerrequiredMust be an existing account.
typestringoptional (nullable)One of landing_page, widget. Used both for the pre-delete scope and stored on each row; if omitted, rows are deleted/saved with type = null.
howItWorksarrayrequiredFull replacement set of blocks.
howItWorks.*.contentstringrequiredHTML content of the block.
howItWorks.*.imagestringrequiredExisting URL (stored verbatim) or a base64 data:image/. URI (decoded + uploaded to S3).
howItWorks.*.imageDirectionstringrequiredOne of left, right.
{
  "company_id": 42,
  "type": "landing_page",
  "howItWorks": [
    {
      "content": "<p>Step one: leave a review.</p>",
      "image": "https://example.com/existing.png",
      "imageDirection": "left"
    },
    {
      "content": "<p>Step two: get a response.</p>",
      "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",
      "imageDirection": "right"
    }
  ]
}

Response

  • data.status (string) — literal "success".
  • data.message (string) — "Block content saved successfully".

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Block content saved successfully"
  }
}

422 Validation error · 422

{
  "message": "The how it works field is required.",
  "errors": {
    "howItWorks": ["The how it works field is required."],
    "howItWorks.0.imageDirection": ["The selected how it works.0.image direction is invalid."]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
422Validation error
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/faq/block" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"company_id": 42, "type": "landing_page", "howItWorks": [{"content": "<p>Step one: leave a review.</p>", "image": "https://example.com/existing.png", "imageDirection": "left"}, {"content": "<p>Step two: get a response.</p>", "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==", "imageDirection": "right"}]}'

Did this page help you?