Confluence REST API v2 — Create page with atlas_doc_format representation

Figured out yesterday that the body value needs to be JSON encoded, not passed as the underlying object. The correct form is like the following (value has been abbreviated).

{
  "spaceId": 9867790169,
  "status": "draft",
  "title": "Equipment Sales",
  "body": {
    "representation": "atlas_doc_format",
    "value": "{\"type\": \"doc\", \"content\": [{\"type\": \"paragraph\", \"content\": [{\"type\": \"text\", \"text\": \"foo 3\"}]}]}"
  }
}