[{"data":1,"prerenderedAt":399},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fsandbox":3},{"id":4,"title":5,"body":6,"description":390,"extension":391,"meta":392,"navigation":393,"order":133,"path":394,"seo":395,"seoTitle":396,"stem":397,"__hash__":398},"docs\u002Fdocs\u002Fsandbox.md","Sandbox and testing",{"type":7,"value":8,"toc":383},"minimark",[9,13,17,22,43,46,74,78,140,169,179,183,283,290,294,350,363,367,379],[10,11,5],"h1",{"id":12},"sandbox-and-testing",[14,15,16],"p",{},"Test mode lets you build and run your integration end to end without connecting a real social account and without posting anything in public.",[18,19,21],"h2",{"id":20},"test-keys","Test keys",[14,23,24,25,29,30,33,34,38,39,42],{},"Create a key with ",[26,27,28],"strong",{},"Test"," mode under ",[26,31,32],{},"Dashboard → Connect → API",". Test keys start with ",[35,36,37],"code",{},"pk_test_",", and every response to them has ",[35,40,41],{},"X-Pogton-Mode: test",".",[14,44,45],{},"How the two modes relate:",[47,48,49,56,71],"ul",{},[50,51,52,53,42],"li",{},"Test keys only see and use sandbox accounts. Live keys only see and use real accounts. Mixing them returns ",[35,54,55],{},"403 mode_mismatch",[50,57,58,59,62,63,66,67,70],{},"Posts created with a test key have ",[35,60,61],{},"\"test\": true",". ",[35,64,65],{},"GET \u002Fposts"," lists posts of both modes, so check ",[35,68,69],{},"test"," when it matters.",[50,72,73],{},"Users, webhooks, queue schedules and uploads are shared by both modes.",[18,75,77],{"id":76},"sandbox-accounts","Sandbox accounts",[79,80,85],"pre",{"className":81,"code":82,"language":83,"meta":84,"style":84},"language-bash shiki shiki-themes github-light github-dark","curl -X POST https:\u002F\u002Fpogton.com\u002Fapi\u002Fv1\u002Fsandbox\u002Faccounts \\\n  -H \"Authorization: Bearer pk_test_...\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"user_id\": \"user_123\", \"platform\": \"instagram\", \"name\": \"Acme test\" }'\n","bash","",[35,86,87,110,121,131],{"__ignoreMap":84},[88,89,92,96,100,104,107],"span",{"class":90,"line":91},"line",1,[88,93,95],{"class":94},"sScJk","curl",[88,97,99],{"class":98},"sj4cs"," -X",[88,101,103],{"class":102},"sZZnC"," POST",[88,105,106],{"class":102}," https:\u002F\u002Fpogton.com\u002Fapi\u002Fv1\u002Fsandbox\u002Faccounts",[88,108,109],{"class":98}," \\\n",[88,111,113,116,119],{"class":90,"line":112},2,[88,114,115],{"class":98},"  -H",[88,117,118],{"class":102}," \"Authorization: Bearer pk_test_...\"",[88,120,109],{"class":98},[88,122,124,126,129],{"class":90,"line":123},3,[88,125,115],{"class":98},[88,127,128],{"class":102}," \"Content-Type: application\u002Fjson\"",[88,130,109],{"class":98},[88,132,134,137],{"class":90,"line":133},4,[88,135,136],{"class":98},"  -d",[88,138,139],{"class":102}," '{ \"user_id\": \"user_123\", \"platform\": \"instagram\", \"name\": \"Acme test\" }'\n",[14,141,142,143,146,147,152,153,155,156,152,159,161,162,165,166,42],{},"Returns ",[35,144,145],{},"201"," with an ",[148,149,151],"a",{"href":150},"\u002Fdocs\u002Faccounts#the-account-object","account object"," with ",[35,154,61],{},", and sends ",[35,157,158],{},"account.connected",[35,160,61],{}," in ",[35,163,164],{},"data",". Create as many as you need, on any platform. A live key gets ",[35,167,168],{},"403 test_mode_only",[14,170,171,172,175,176,42],{},"Remove them like any account, with ",[35,173,174],{},"DELETE \u002Fapi\u002Fv1\u002Faccounts\u002F{id}",", or all of a user's at once with ",[35,177,178],{},"DELETE \u002Fapi\u002Fv1\u002Fusers\u002F{user_id}",[18,180,182],{"id":181},"what-test-mode-does","What test mode does",[184,185,186,198],"table",{},[187,188,189],"thead",{},[190,191,192,195],"tr",{},[193,194],"th",{},[193,196,197],{},"In test mode",[199,200,201,210,230,238,248,256,264,275],"tbody",{},[190,202,203,207],{},[204,205,206],"td",{},"Validation",[204,208,209],{},"The same as live: text limits, media rules and platform options are checked per platform.",[190,211,212,215],{},[204,213,214],{},"Publishing",[204,216,217,218,221,222,225,226,229],{},"Simulated. Each target is ",[35,219,220],{},"published"," with a ",[35,223,224],{},"platform_post_id"," like ",[35,227,228],{},"test_4f9a1c2b3d4e"," and a placeholder URL.",[190,231,232,235],{},[204,233,234],{},"Scheduling and queue",[204,236,237],{},"Real: scheduled and queued posts are published in simulation at their time.",[190,239,240,243],{},[204,241,242],{},"Webhooks",[204,244,245,246,42],{},"Real, signed and retried. Post events have ",[35,247,61],{},[190,249,250,253],{},[204,251,252],{},"Comments",[204,254,255],{},"Listing returns none; creating returns a placeholder ID.",[190,257,258,261],{},[204,259,260],{},"Analytics",[204,262,263],{},"Zeros for posts and accounts; no follower history.",[190,265,266,269],{},[204,267,268],{},"Lookup resources",[204,270,271,272,42],{},"One placeholder item, e.g. ",[35,273,274],{},"{ \"id\": \"test_boards_1\", \"name\": \"Test boards\" }",[190,276,277,280],{},[204,278,279],{},"Rate limits and idempotency",[204,281,282],{},"The same as live.",[14,284,285,286,289],{},"Webhook endpoints registered with a test key may use ",[35,287,288],{},"http:\u002F\u002F"," URLs, so you can point them at a local tunnel.",[18,291,293],{"id":292},"testing-failure-paths","Testing failure paths",[47,295,296,314,340],{},[50,297,298,301,302,305,306,309,310,313],{},[26,299,300],{},"Validation errors",": send content that breaks a rule, such as 300 characters to ",[35,303,304],{},"twitter",", or no image to ",[35,307,308],{},"instagram",". You get ",[35,311,312],{},"422 validation_failed"," with the issues.",[50,315,316,319,320,323,324,327,328,331,332,335,336,339],{},[26,317,318],{},"Edits, cancels and publish now",": create a post with ",[35,321,322],{},"draft: true"," or a ",[35,325,326],{},"scheduled_at"," an hour ahead, then ",[35,329,330],{},"PATCH",", ",[35,333,334],{},"DELETE"," or ",[35,337,338],{},"POST \u002Fpublish"," it.",[50,341,342,345,346,349],{},[26,343,344],{},"Webhook handling",": use ",[35,347,348],{},"POST \u002Fwebhooks\u002F{id}\u002Ftest",", and redeliver real deliveries from the deliveries log.",[14,351,352,353,357,358,362],{},"Sandbox publishing always succeeds, so failed and partially published posts can't be produced in test mode. Build those paths from the ",[148,354,356],{"href":355},"\u002Fdocs\u002Fpublishing#the-post-object","post object"," and ",[148,359,361],{"href":360},"\u002Fdocs\u002Fwebhooks#payload","webhook payloads"," documented here.",[18,364,366],{"id":365},"with-the-mcp-server","With the MCP server",[14,368,369,370,374,375,378],{},"A test key works with the ",[148,371,373],{"href":372},"\u002Fdocs\u002Fmcp","MCP server"," too. The ",[35,376,377],{},"create_sandbox_account"," tool creates sandbox accounts, so an AI assistant can try posting without touching real accounts.",[380,381,382],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":84,"searchDepth":112,"depth":112,"links":384},[385,386,387,388,389],{"id":20,"depth":112,"text":21},{"id":76,"depth":112,"text":77},{"id":181,"depth":112,"text":182},{"id":292,"depth":112,"text":293},{"id":365,"depth":112,"text":366},"Use test keys and sandbox accounts to build against the Pogton Connect API without real social accounts. What test mode validates, simulates and sends.","md",{},true,"\u002Fdocs\u002Fsandbox",{"title":5,"description":390},"Sandbox: Test the Connect API Without Real Accounts","docs\u002Fsandbox","F3arlZlL_enNbyBeuSrObXzZLUQiQXSDSDwUhOa2RdY",1794240387291]