curl -X POST https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable \ -H "x-api-key: $STREAMPIXEL_API_KEY"
const res = await fetch( 'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable', { method: 'POST', headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } });const r = await res.json();if (!r.regionAnswered) console.warn('project is off but sessions may still be running:', r.error);
Switch a project off and end every live and queued session.
POST
/
api
/
v1
/
projects
/
{projectId}
/
disable
curl -X POST https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable \ -H "x-api-key: $STREAMPIXEL_API_KEY"
const res = await fetch( 'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable', { method: 'POST', headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } });const r = await res.json();if (!r.regionAnswered) console.warn('project is off but sessions may still be running:', r.error);
Switch a project off. Every live and queued session of the project is ended: viewers receive disconnect code 4000 (Project inactive), the applications are stopped, and new viewers are refused until the project is enabled again.The call waits until the end-session signal has been sent and reports how many sessions it reached. That is the difference from the dashboard’s switch, which fires and forgets: a script can tell “disabled, 3 viewers disconnected” from “disabled, but the region did not answer”.
Scope: control. Team members need the Editor role or above. Limited to 30 control calls per minute per account.
This is immediate and has no undo for the viewers it disconnects. To clear sessions without taking the project offline, use End Sessions.
true when disconnecting the sessions is taking longer than the request budget and is finishing in the background. The project is already off and sessionsSignalled is null; poll Live Stats to confirm viewers have cleared. Only appears on busy regions.
curl -X POST https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable \ -H "x-api-key: $STREAMPIXEL_API_KEY"
const res = await fetch( 'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable', { method: 'POST', headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } });const r = await res.json();if (!r.regionAnswered) console.warn('project is off but sessions may still be running:', r.error);
The project belongs to another account, or the team role cannot edit projects.
404
NOT_FOUND
No project with that id.
429
RATE_LIMITED
More than 30 control calls in a minute. Retry-After is set.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Streampixel","colors":{"primary":"#00B8E6","light":"#5BDFFF","dark":"#0098C2"},"logo":{"light":"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/logo/logo.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=97d4efed69a7ba6432871781617e39fe","dark":"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/logo/logo.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=97d4efed69a7ba6432871781617e39fe"},"favicon":"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/favicon.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=62bf1ddb75c1efac5b837698245aa6ed","appearance":{"default":"dark"},"background":{"decoration":"gradient","color":{"light":"#FFFFFF","dark":"#0A0A0A"}},"navbar":{"links":[{"href":"https://status.streampixel.io","label":"Status"},{"href":"mailto:support@streampixel.io","label":"Support"},{"href":"https://dashboard.streampixel.io","label":"Dashboard"}],"primary":{"type":"button","label":"Start free","href":"https://dashboard.streampixel.io"}},"footer":{"socials":{"github":"https://github.com/infinity-void-metaverse","x":"https://x.com/streampixel","linkedin":"https://www.linkedin.com/company/streampixel"},"links":[{"header":"Product","items":[{"label":"Dashboard","href":"https://dashboard.streampixel.io"},{"label":"Pricing","href":"https://streampixel.io/pricing"},{"label":"Status","href":"https://status.streampixel.io"}]},{"header":"Developers","items":[{"label":"Get Started","href":"/resources/quick-start-guide/register-and-sign-in"},{"label":"Web SDK","href":"/resources/web-sdk/getting-started/overview"},{"label":"REST API","href":"/resources/api-reference/overview"},{"label":"Example app","href":"https://github.com/infinity-void-metaverse/Streampixel-SDK-Example"}]},{"header":"Company","items":[{"label":"Contact","href":"mailto:support@streampixel.io"},{"label":"GitHub","href":"https://github.com/infinity-void-metaverse"}]}]},"search":{"prompt":"Ask the docs..."},"seo":{"indexing":"navigable"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"streampixel","hasAudioNarration":false,"actualSubdomain":"streampixel","customDomains":["docs.streampixel.io"],"gitSource":{"type":"github","owner":"infinity-void-metaverse","repo":"streampixel-documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb48981ffad4413901da2b","collectionId":"7f926d3b-77e6-4121-a0cc-6b21d37ebcb3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb48981ffad4413901da2b"},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aeb48981ffad4413901da2b","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Dashboard","count":33},{"language":"default","tag":"Web SDK","count":32},{"language":"default","tag":"REST API","count":28},{"language":"default","tag":"Guides \u0026 Reference","count":19},{"language":"default","tag":"Features","count":11},{"language":"default","tag":"Reference","count":9},{"language":"default","tag":"Get Started","count":8},{"language":"default","tag":"Sessions \u0026 analytics","count":8},{"language":"default","tag":"Project settings","count":8},{"language":"default","tag":"Getting started","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles/custom.css","content":":root{--sp-cyan: #00D4FF;--sp-cyan-bright: #00E5FF;--sp-cyan-soft: rgba(0, 212, 255, 0.12);--sp-cyan-glow: rgba(0, 212, 255, 0.28);--sp-cyan-fade: rgba(0, 212, 255, 0.04);--sp-teal: #1ABFB1;--sp-green: #1DB95C;--sp-bg-dark: #0A0A0A;--sp-card-dark: rgba(18, 18, 18, 0.7);--sp-card-solid: #121212;--sp-border-dark: rgba(255, 255, 255, 0.08);--sp-border-strong: rgba(255, 255, 255, 0.14)}.dark a[class*=\"card\"],.dark .card{position:relative;background:var(--sp-card-dark)!important;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--sp-border-dark)!important;box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.04),\n 0 8px 24px rgba(0, 0, 0, 0.25);transition:transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease}.dark a[class*=\"card\"]:hover,.dark .card:hover{border-color:var(--sp-cyan-glow)!important;box-shadow:0 0 0 1px var(--sp-cyan-glow),\n 0 12px 32px rgba(0, 212, 255, 0.12),\n inset 0 1px 0 rgba(0, 212, 255, 0.06);transform:translateY(-2px)}.dark a[class*=\"card\"]::before,.dark .card::before{content:\"\";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(\n 135deg,\n rgba(0, 212, 255, 0.18) 0%,\n transparent 35%,\n transparent 65%,\n rgba(26, 191, 177, 0.14) 100%\n );-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0.5;pointer-events:none;transition:opacity 220ms ease}.dark a[class*=\"card\"]:hover::before,.dark .card:hover::before{opacity:1}.dark a[class*=\"card\"] svg,.dark .card svg{color:var(--sp-cyan)!important}.dark pre,.dark .prose pre{position:relative;border:1px solid var(--sp-border-dark);background:#0E0E0E!important}.dark pre code{background:transparent!important}.dark :not(pre)>code{background:var(--sp-cyan-soft)!important;color:var(--sp-cyan)!important;padding:0.15em 0.4em;border-radius:4px;font-weight:500;border:1px solid rgba(0, 212, 255, 0.18)}.dark [class*=\"step\"] [class*=\"circle\"],.dark .steps-container li::before{background:linear-gradient(135deg, var(--sp-cyan), #00A8D6)!important;color:#0A0A0A!important;font-weight:700;box-shadow:0 0 16px var(--sp-cyan-glow)}.dark [class*=\"callout\"][class*=\"info\"],.dark [class*=\"callout\"][class*=\"tip\"]{border-left-color:var(--sp-cyan)!important}.dark table{border:1px solid var(--sp-border-dark);border-radius:8px;overflow:hidden;background:rgba(14, 14, 14, 0.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.dark thead{background:rgba(0, 212, 255, 0.05)}.dark th{color:var(--sp-cyan)!important;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;font-size:0.75em}.dark tbody tr{border-top:1px solid var(--sp-border-dark)}.dark tbody tr:hover{background:rgba(0, 212, 255, 0.04)}.dark [class*=\"sidebar\"] [class*=\"active\"]{background:var(--sp-cyan-soft)!important;color:var(--sp-cyan)!important;border-left:2px solid var(--sp-cyan);box-shadow:inset 0 0 12px rgba(0, 212, 255, 0.08)}.prose h1{letter-spacing:-0.025em;font-weight:700}.prose h2{letter-spacing:-0.02em;font-weight:650;position:relative}.prose h3{letter-spacing:-0.015em}.sp-hero{position:relative;margin:-1rem -1rem 2.75rem -1rem;padding:3.25rem 2.25rem 3.75rem;border-radius:18px;background:radial-gradient(ellipse at 75% 25%, rgba(0, 212, 255, 0.18), transparent 55%),\n radial-gradient(ellipse at 20% 85%, rgba(26, 191, 177, 0.12), transparent 50%),\n linear-gradient(180deg, #0E0E0E 0%, #080808 100%);border:1px solid var(--sp-border-strong);overflow:hidden;isolation:isolate}.sp-hero-grid{position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2300d4ff' fill-opacity='0.05'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");-webkit-mask-image:radial-gradient(ellipse at center, black 25%, transparent 80%);mask-image:radial-gradient(ellipse at center, black 25%, transparent 80%);pointer-events:none;z-index:0}.sp-hero-glow{position:absolute;width:60%;height:140%;top:-20%;right:-10%;background:radial-gradient(ellipse at center, rgba(0, 212, 255, 0.22) 0%, transparent 60%);filter:blur(24px);pointer-events:none;z-index:0;animation:sp-hero-glow-drift 14s ease-in-out infinite}@keyframes sp-hero-glow-drift{0%,100%{transform:translate(0, 0) scale(1);opacity:0.85}50%{transform:translate(-8%, 4%) scale(1.08);opacity:1}}.sp-hero>*:not(.sp-hero-grid):not(.sp-hero-glow){position:relative;z-index:1}.sp-hero-eyebrow{display:inline-flex;align-items:center;gap:0.5rem;font-size:0.72rem;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:var(--sp-cyan);background:var(--sp-cyan-soft);border:1px solid rgba(0, 212, 255, 0.25);padding:0.4rem 0.85rem;border-radius:999px;margin-bottom:1.4rem;box-shadow:0 0 18px rgba(0, 212, 255, 0.12)}.sp-hero-eyebrow::before{content:\"\";width:6px;height:6px;border-radius:50%;background:var(--sp-cyan);box-shadow:0 0 8px var(--sp-cyan);animation:sp-pulse 1.6s ease-in-out infinite}@keyframes sp-pulse{0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(0, 212, 255, 0.5)}50%{opacity:0.7;box-shadow:0 0 0 6px rgba(0, 212, 255, 0)}}.sp-hero-title{font-size:clamp(2.1rem, 5.2vw, 3rem);font-weight:700;letter-spacing:-0.032em;line-height:1.08;margin:0 0 0.85rem 0;background:linear-gradient(180deg, #ffffff 0%, #b8b8b8 100%);-webkit-background-clip:text;background-clip:text;color:transparent}.sp-hero-sub{font-size:1.1rem;line-height:1.55;color:rgba(255, 255, 255, 0.72);max-width:640px;margin:0 0 1.85rem 0}.sp-hero-cta-row{display:flex;flex-wrap:wrap;gap:0.75rem}.sp-hero-cta{display:inline-flex;align-items:center;gap:0.5rem;background:linear-gradient(135deg, var(--sp-cyan-bright), #00A8D6);color:#0A0A0A!important;font-weight:600;padding:0.75rem 1.4rem;border-radius:9px;text-decoration:none!important;box-shadow:0 0 0 1px rgba(0, 212, 255, 0.5),\n 0 0 28px var(--sp-cyan-glow),\n inset 0 1px 0 rgba(255, 255, 255, 0.25);transition:transform 150ms ease, box-shadow 150ms ease}.sp-hero-cta:hover{transform:translateY(-1px);box-shadow:0 0 0 1px rgba(0, 212, 255, 0.7),\n 0 0 36px rgba(0, 212, 255, 0.45),\n inset 0 1px 0 rgba(255, 255, 255, 0.3)}.sp-hero-cta-secondary{display:inline-flex;align-items:center;gap:0.5rem;color:rgba(255, 255, 255, 0.88)!important;background:rgba(255, 255, 255, 0.03);border:1px solid var(--sp-border-strong);padding:0.75rem 1.4rem;border-radius:9px;text-decoration:none!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:border-color 150ms ease, color 150ms ease, background 150ms ease}.sp-hero-cta-secondary:hover{border-color:var(--sp-cyan-glow);color:var(--sp-cyan)!important;background:rgba(0, 212, 255, 0.05)}:root:not(.dark) .sp-hero{background:radial-gradient(ellipse at 80% 20%, rgba(0, 184, 230, 0.10), transparent 55%),\n radial-gradient(ellipse at 20% 85%, rgba(26, 191, 177, 0.08), transparent 50%),\n linear-gradient(180deg, #FAFCFE 0%, #F2F6F9 100%);border:1px solid #E5E7EB}:root:not(.dark) .sp-hero-grid{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%230098C2' fill-opacity='0.06'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}:root:not(.dark) .sp-hero-glow{background:radial-gradient(ellipse at center, rgba(0, 184, 230, 0.12) 0%, transparent 60%)}:root:not(.dark) .sp-hero-title{background:linear-gradient(180deg, #0A0A0A 0%, #404040 100%);-webkit-background-clip:text;background-clip:text;color:transparent}:root:not(.dark) .sp-hero-sub{color:#475569}:root:not(.dark) .sp-hero-eyebrow{color:#0098C2;background:rgba(0, 184, 230, 0.08);border-color:rgba(0, 184, 230, 0.25)}:root:not(.dark) .sp-hero-cta-secondary{color:#0F172A!important;background:rgba(255, 255, 255, 0.6);border-color:#D1D5DB}:root:not(.dark) :not(pre)>code{background:rgba(0, 184, 230, 0.08)!important;color:#006B8C!important;border-color:rgba(0, 184, 230, 0.2)}.dark ::-webkit-scrollbar{width:10px;height:10px}.dark ::-webkit-scrollbar-track{background:transparent}.dark ::-webkit-scrollbar-thumb{background:rgba(255, 255, 255, 0.08);border-radius:5px}.dark ::-webkit-scrollbar-thumb:hover{background:rgba(0, 212, 255, 0.25)}@media (prefers-reduced-motion: reduce){.sp-hero-glow{animation:none}.sp-hero-eyebrow::before{animation:none}.dark a[class*=\"card\"],.dark .card{transition:none}}"}],"page":{"pagePath":"resources/api-reference/disable-project","slug":"/resources/api-reference/disable-project","pageMetadata":{"title":"Disable Project","description":"Switch a project off and end every live and queued session.","icon":"toggle-off","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/disable","href":"/resources/api-reference/disable-project"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Switch a project off and end every live and queued session.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Info,ParamField,ResponseField,Table,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Switch a project off. Every live and queued session of the project is ended: viewers receive disconnect code `,_jsx(_components.code,{children:`4000`}),` (Project inactive), the applications are stopped, and new viewers are refused until the project is `,_jsx(_components.a,{href:`/resources/api-reference/enable-project`,children:`enabled`}),` again.`]}),`\n`,_jsx(_components.p,{children:`The call waits until the end-session signal has been sent and reports how many sessions it reached. That is the difference from the dashboard’s switch, which fires and forgets: a script can tell “disabled, 3 viewers disconnected” from “disabled, but the region did not answer”.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Scope: `,_jsx(_components.code,{children:`control`}),`. Team members need the Editor role or above. Limited to 30 control calls per minute per account.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This is immediate and has no undo for the viewers it disconnects. To clear sessions without taking the project offline, use `,_jsx(_components.a,{href:`/resources/api-reference/end-sessions`,children:`End Sessions`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`projectId`,type:`string`,required:true,id:`param-project-id`,children:_jsx(_components.p,{children:`The project to switch off.`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`An API key issued with the `,_jsx(_components.code,{children:`control`}),` scope.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`enabled`,type:`boolean`,id:`param-enabled`,children:[`Always `,_jsx(_components.code,{children:`false`}),` after this call.`]}),`\n`,_jsxs(ResponseField,{name:`changed`,type:`boolean`,id:`param-changed`,children:[_jsx(_components.code,{children:`false`}),` if the project was already off. Sessions are signalled either way.`]}),`\n`,_jsxs(ResponseField,{name:`sessionsSignalled`,type:`number`,id:`param-sessions-signalled`,children:[`Live and queued sessions told to end. `,_jsx(_components.code,{children:`null`}),` when `,_jsx(_components.code,{children:`pending`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`regionAnswered`,type:`boolean`,id:`param-region-answered`,children:[_jsx(_components.code,{children:`false`}),` when the region’s session store could not be read. The project is off, but sessions may still be running; retry `,_jsx(_components.a,{href:`/resources/api-reference/end-sessions`,children:`End Sessions`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`pending`,type:`boolean`,id:`param-pending`,children:[_jsx(_components.code,{children:`true`}),` when disconnecting the sessions is taking longer than the request budget and is finishing in the background. The project is already off and `,_jsx(_components.code,{children:`sessionsSignalled`}),` is `,_jsx(_components.code,{children:`null`}),`; poll `,_jsx(_components.a,{href:`/resources/api-reference/project-live-stats`,children:`Live Stats`}),` to confirm viewers have cleared. Only appears on busy regions.`]}),`\n`,_jsxs(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:[`Only with `,_jsx(_components.code,{children:`regionAnswered: false`}),`: why.`]}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_SCOPE`})}),_jsxs(_components.td,{children:[`The key was issued without `,_jsx(_components.code,{children:`control`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`The project belongs to another account, or the team role cannot edit projects.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_FOUND`})}),_jsx(_components.td,{children:`No project with that id.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`RATE_LIMITED`})}),_jsxs(_components.td,{children:[`More than 30 control calls in a minute. `,_jsx(_components.code,{children:`Retry-After`}),` is set.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Disable Project","description":"Switch a project off and end every live and queued session.","icon":"toggle-off","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/disable","href":"/resources/api-reference/disable-project"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,ParamField,RequestExample,ResponseExample,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Switch a project off. Every live and queued session of the project is ended: viewers receive disconnect code `,_jsx(_components.code,{children:`4000`}),` (Project inactive), the applications are stopped, and new viewers are refused until the project is `,_jsx(_components.a,{href:`/resources/api-reference/enable-project`,children:`enabled`}),` again.`]}),`\n`,_jsx(_components.p,{children:`The call waits until the end-session signal has been sent and reports how many sessions it reached. That is the difference from the dashboard’s switch, which fires and forgets: a script can tell “disabled, 3 viewers disconnected” from “disabled, but the region did not answer”.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Scope: `,_jsx(_components.code,{children:`control`}),`. Team members need the Editor role or above. Limited to 30 control calls per minute per account.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This is immediate and has no undo for the viewers it disconnects. To clear sessions without taking the project offline, use `,_jsx(_components.a,{href:`/resources/api-reference/end-sessions`,children:`End Sessions`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`projectId`,type:`string`,required:true,id:`param-project-id`,children:_jsx(_components.p,{children:`The project to switch off.`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`An API key issued with the `,_jsx(_components.code,{children:`control`}),` scope.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`enabled`,type:`boolean`,id:`param-enabled`,children:[`Always `,_jsx(_components.code,{children:`false`}),` after this call.`]}),`\n`,_jsxs(ResponseField,{name:`changed`,type:`boolean`,id:`param-changed`,children:[_jsx(_components.code,{children:`false`}),` if the project was already off. Sessions are signalled either way.`]}),`\n`,_jsxs(ResponseField,{name:`sessionsSignalled`,type:`number`,id:`param-sessions-signalled`,children:[`Live and queued sessions told to end. `,_jsx(_components.code,{children:`null`}),` when `,_jsx(_components.code,{children:`pending`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`regionAnswered`,type:`boolean`,id:`param-region-answered`,children:[_jsx(_components.code,{children:`false`}),` when the region’s session store could not be read. The project is off, but sessions may still be running; retry `,_jsx(_components.a,{href:`/resources/api-reference/end-sessions`,children:`End Sessions`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`pending`,type:`boolean`,id:`param-pending`,children:[_jsx(_components.code,{children:`true`}),` when disconnecting the sessions is taking longer than the request budget and is finishing in the background. The project is already off and `,_jsx(_components.code,{children:`sessionsSignalled`}),` is `,_jsx(_components.code,{children:`null`}),`; poll `,_jsx(_components.a,{href:`/resources/api-reference/project-live-stats`,children:`Live Stats`}),` to confirm viewers have cleared. Only appears on busy regions.`]}),`\n`,_jsxs(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:[`Only with `,_jsx(_components.code,{children:`regionAnswered: false`}),`: why.`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$STREAMPIXEL_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`method:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`headers:`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'x-api-key'`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`STREAMPIXEL_API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` r`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (!`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`regionAnswered`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`warn`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'project is off but sessions may still be running:'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` os, requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`r = requests.post(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`={`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"STREAMPIXEL_API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`).json()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'off; `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`r[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"sessionsSignalled\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` session(s) ended'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200 OK`,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"projectId\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"664f1a2b3c4d5e6f7a8b9c0d\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Showroom\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"region\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Europe\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"changed\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionsSignalled\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"regionAnswered\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_SCOPE`})}),_jsxs(_components.td,{children:[`The key was issued without `,_jsx(_components.code,{children:`control`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`The project belongs to another account, or the team role cannot edit projects.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_FOUND`})}),_jsx(_components.td,{children:`No project with that id.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`RATE_LIMITED`})}),_jsxs(_components.td,{children:[`More than 30 control calls in a minute. `,_jsx(_components.code,{children:`Retry-After`}),` is set.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Disable Project","description":"Switch a project off and end every live and queued session.","icon":"toggle-off","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/disable","href":"/resources/api-reference/disable-project"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"x-api-key: \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$STREAMPIXEL_API_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node.js","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> res\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">method:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'POST'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">headers:\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'x-api-key'\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">STREAMPIXEL_API_KEY\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> r\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">if\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> (!\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">r\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">regionAnswered\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">warn\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'project is off but sessions may still be running:'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">r\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">error\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> os, requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">r = requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/disable\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">={\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"x-api-key\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"STREAMPIXEL_API_KEY\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">]},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">).json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'off; \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">r[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"sessionsSignalled\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">]\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> session(s) ended'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 OK","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"projectId\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"664f1a2b3c4d5e6f7a8b9c0d\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Showroom\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"region\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Europe\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"enabled\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"changed\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"sessionsSignalled\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"regionAnswered\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Disable Project","path":"/api/v1/projects/{projectId}/disable","servers":[{"url":"https://platform.streampixel.io"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"x-api-key":{"schema":[{"type":"string","description":"An API key issued with the `control` scope.","required":true}]}},"cookie":{},"path":{"projectId":{"schema":[{"type":"string","description":"The project to switch off.","required":true}]}}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"enabled":[{"type":"boolean","description":"Always `false` after this call."}],"changed":[{"type":"boolean","description":"`false` if the project was already off. Sessions are signalled either way."}],"sessionsSignalled":[{"type":"number","description":"Live and queued sessions told to end. `null` when `pending` is `true` ."}],"regionAnswered":[{"type":"boolean","description":"`false` when the region’s session store could not be read. The project is off, but sessions may still be running; retry End Sessions ."}],"pending":[{"type":"boolean","description":"`true` when disconnecting the sessions is taking longer than the request budget and is finishing in the background. The project is already off and `sessionsSignalled` is `null` ; poll Live Stats to confirm viewers have cleared. Only appears on busy regions."}],"error":[{"type":"string","description":"Only with `regionAnswered: false` : why."}]}}],"examples":{"example":{"value":{"enabled":true,"changed":true,"sessionsSignalled":123,"regionAnswered":true,"pending":true,"error":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"streampixel","siteName":"Streampixel","title":"Disable Project - Streampixel","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-27T08:01:55.487Z","originalFileLocation":"resources/api-reference/disable-project.md"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Switch a project off and end every live and queued session.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Streampixel\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Disable Project - Streampixel\">\u003cmeta data-mint-head property=\"og:description\" content=\"Switch a project off and end every live and queued session.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Streampixel\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.streampixel.io/resources/api-reference/disable-project\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://streampixel.mintlify.site/_mintlify/api/og/v2?division=Project+control\u0026amp;title=Disable+Project\u0026amp;description=Switch+a+project+off+and+end+every+live+and+queued+session.\u0026amp;theme=2bcbe340684957be40b450f3\u0026amp;signature=904bcf84a828772a3bd0f85bb399d9357082dd507aedb2f56bb266e09e50a4e6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Disable Project - Streampixel\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Switch a project off and end every live and queued session.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://streampixel.mintlify.site/_mintlify/api/og/v2?division=Project+control\u0026amp;title=Disable+Project\u0026amp;description=Switch+a+project+off+and+end+every+live+and+queued+session.\u0026amp;theme=2bcbe340684957be40b450f3\u0026amp;signature=904bcf84a828772a3bd0f85bb399d9357082dd507aedb2f56bb266e09e50a4e6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Streampixel\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00B8E6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.streampixel.io/resources/api-reference/disable-project\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/resources/api-reference/disable-project.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.streampixel.io/#organization\",\"name\":\"Streampixel\",\"url\":\"https://docs.streampixel.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/logo/logo.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=97d4efed69a7ba6432871781617e39fe\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.streampixel.io#website\",\"name\":\"Streampixel\",\"url\":\"https://docs.streampixel.io\",\"publisher\":{\"@id\":\"https://docs.streampixel.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.streampixel.io/resources/api-reference/disable-project#webpage\",\"url\":\"https://docs.streampixel.io/resources/api-reference/disable-project\",\"name\":\"Disable Project\",\"description\":\"Switch a project off and end every live and queued session.\",\"dateModified\":\"2026-09-27T08:01:55.487Z\",\"isPartOf\":{\"@id\":\"https://docs.streampixel.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.streampixel.io/resources/api-reference/disable-project#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.streampixel.io/resources/api-reference/disable-project#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Project control\",\"item\":\"https://docs.streampixel.io/resources/api-reference/enable-project\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Disable Project\",\"item\":\"https://docs.streampixel.io/resources/api-reference/disable-project\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.streampixel.io/resources/api-reference/disable-project#apireference\",\"headline\":\"Disable Project\",\"name\":\"Disable Project\",\"description\":\"Switch a project off and end every live and queued session.\",\"url\":\"https://docs.streampixel.io/resources/api-reference/disable-project\",\"mainEntityOfPage\":{\"@id\":\"https://docs.streampixel.io/resources/api-reference/disable-project#webpage\"},\"dateModified\":\"2026-09-27T08:01:55.487Z\",\"publisher\":{\"@id\":\"https://docs.streampixel.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.streampixel.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Streampixel\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Streampixel","nav":{"global":{},"tabs":[{"tab":"Get Started","icon":"rocket","pages":[{"title":"Get Started","href":""}]},{"tab":"Dashboard","icon":"gauge","pages":[{"title":"Dashboard","href":"/resources/dashboard/billing"}]},{"tab":"Iframe","icon":"browser","pages":[{"title":"Iframe","href":"/resources/iframe-integration/overview"}]},{"tab":"Web SDK","icon":"code","pages":[{"title":"Web SDK","href":"/resources/web-sdk/getting-started/overview"}]},{"tab":"REST API","icon":"webhook","groups":[{"group":"Getting started","pages":[{"title":"Overview","icon":"webhook","href":"/resources/api-reference/overview"},{"title":"API authentication","icon":"key","href":"/resources/api-reference/api-authentication"},{"title":"Finding your user and project IDs","icon":"id-card","href":"/resources/api-reference/finding-your-user-and-project-ids"},{"title":"Rate limits \u0026 error codes","icon":"gauge-high","href":"/resources/api-reference/rate-limits-and-errors"}]},{"group":"Projects","pages":[{"title":"List Projects","icon":"list","api":"GET https://platform.streampixel.io/api/v1/projects/projects-status","href":"/resources/api-reference/list-projects"},{"title":"Get Project","icon":"folder-open","api":"GET https://platform.streampixel.io/api/v1/projects/{projectId}","href":"/resources/api-reference/get-project"},{"title":"Project Live Stats","icon":"signal","api":"GET https://platform.streampixel.io/api/v1/projects/{projectId}/live-stats","href":"/resources/api-reference/project-live-stats"},{"title":"Project User Stats","icon":"users","api":"GET https://platform.streampixel.io/api/v1/projects/{projectId}/user-stats","href":"/resources/api-reference/project-user-stats"}]},{"group":"Builds","pages":[{"title":"Upload File API","icon":"upload","api":"POST https://platform.streampixel.io/api/v1/projects/upload-file","href":"/resources/api-reference/upload-file-api"},{"title":"Distribute File API","icon":"paper-plane","api":"POST https://platform.streampixel.io/api/v1/projects/distribute-file","href":"/resources/api-reference/distribute-file-api"},{"title":"List Builds","icon":"layer-group","api":"GET https://platform.streampixel.io/api/v1/projects/{projectId}/files","href":"/resources/api-reference/list-builds"},{"title":"Build Status","icon":"magnifying-glass","api":"GET https://platform.streampixel.io/api/v1/projects/{projectId}/files/{buildId}/status","href":"/resources/api-reference/build-status"}]},{"group":"Project control","pages":[{"title":"Enable Project","description":"Switch a project on so viewers are admitted.","icon":"toggle-on","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/enable","href":"/resources/api-reference/enable-project"},{"title":"Disable Project","icon":"toggle-off","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/disable","href":"/resources/api-reference/disable-project"},{"title":"End Sessions","description":"End every live and queued session of a project while keeping it on.","icon":"user-xmark","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/sessions/end","href":"/resources/api-reference/end-sessions"},{"title":"Set Active Build","icon":"star","api":"POST https://platform.streampixel.io/api/v1/projects/{projectId}/active-build","href":"/resources/api-reference/set-active-build"},{"title":"Update Project Settings","icon":"sliders","api":"PATCH https://platform.streampixel.io/api/v1/projects/{projectId}/settings","href":"/resources/api-reference/update-project-settings"}]},{"group":"Sessions \u0026 analytics","pages":[{"title":"List Sessions","icon":"list-ul","api":"GET https://platform.streampixel.io/api/v1/analytics/projects/{projectId}/sessions","href":"/resources/api-reference/list-sessions"},{"title":"Session Detail","icon":"timeline","api":"GET https://platform.streampixel.io/api/v1/analytics/sessions/{sessionId}","href":"/resources/api-reference/session-detail"},{"title":"Session Telemetry","icon":"wave-square","api":"GET https://platform.streampixel.io/api/v1/analytics/frontend-streaming-logs","href":"/resources/api-reference/session-telemetry"},{"title":"Session Logs","icon":"file-lines","api":"GET https://platform.streampixel.io/api/v1/analytics/log-files/session/{sessionId}","href":"/resources/api-reference/session-logs"},{"title":"Download Log","icon":"download","api":"GET https://platform.streampixel.io/api/v1/analytics/log-files/{logFileId}/download","href":"/resources/api-reference/download-log"},{"title":"Disconnect Codes","icon":"plug-circle-xmark","api":"GET https://platform.streampixel.io/api/v1/analytics/projects/{projectId}/disconnect-codes","href":"/resources/api-reference/disconnect-codes-api"},{"title":"Queue Analytics","icon":"hourglass-half","api":"GET https://platform.streampixel.io/api/v1/analytics/projects/{projectId}/analytics/queue","href":"/resources/api-reference/queue-analytics"},{"title":"Audience Breakdown","icon":"earth-europe","api":"GET https://platform.streampixel.io/api/v1/analytics/projects/{projectId}/analytics/breakdown","href":"/resources/api-reference/audience-breakdown"}]},{"group":"Webhooks","pages":[{"title":"Overview","icon":"bell","href":"/resources/api-reference/webhooks"},{"title":"Webhook event reference","icon":"book","href":"/resources/api-reference/webhook-events"}]},{"group":"Integrations","pages":[{"title":"AI assistants (MCP)","icon":"robot","href":"/resources/api-reference/mcp-assistants"}]}]},{"tab":"Guides \u0026 Reference","icon":"book","pages":[{"title":"Guides \u0026 Reference","href":"/resources/recipes/overview"}]}]},"basePath":"","title":"Disable Project - Streampixel","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js"]}