Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization.
Requirements:
User must be authenticated
Target user must belong to the same email as current user
Target organization must be active
Note: After switching, the previous access token is revoked. You must use the new token returned in the response.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Docs","colors":{"primary":"#02A8F3","light":"#02A8F3","dark":"#028FCF"},"favicon":"https://mintcdn.com/mile-app/JbFasViqaZTzE9Zc/favicon.ico?fit=max\u0026auto=format\u0026n=JbFasViqaZTzE9Zc\u0026q=85\u0026s=4e7ddbcee052a480a983e57b5e25103b","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"}}},"search":{},"seo":{"metatags":{"robots":"noindex, nofollow"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mile-app","hasAudioNarration":false,"actualSubdomain":"mile-app","customDomains":["docsy3.mile.app"],"gitSource":{"type":"gitlab","owner":"paketid","repo":"mileapp-docs","deployBranch":"whitelabel","contentDirectory":"","isPrivate":true,"projectId":76553900,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6abdd0a3503afc6fc766f9c9","collectionId":"7da1e5b0-9dcc-4967-b311-365ce82d22c4","liveDeploymentHistoryId":"6abdd0a3503afc6fc766f9c9","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6abdd0a3503afc6fc766f9c9","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Guides","count":209},{"language":"default","tag":"API Reference","count":199},{"language":"default","tag":"Task","count":99},{"language":"default","tag":"Flow","count":76},{"language":"default","tag":"Setting","count":60},{"language":"default","tag":"Automation","count":39},{"language":"default","tag":"Flow Builder","count":33},{"language":"default","tag":"Route Optimization","count":32},{"language":"default","tag":"Routing","count":28},{"language":"default","tag":"Overview","count":25}]},"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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"a[href=\"/\"]>img,header>a:first-child img,img[src*=\"/logo/\"],nav>a:first-child img{width:150px!important;height:auto!important;max-width:150px!important}"}],"page":{"pagePath":"api-reference/auth/multi-organization/switch-organization","slug":"/api-reference/auth/multi-organization/switch-organization","pageMetadata":{"title":"Switch Organization","description":"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization.\n\n**Requirements:**\n- User must be authenticated\n- Target user must belong to the same email as current user\n- Target organization must be active\n\n**Note:** After switching, the previous access token is revoked. You must use the new token returned in the response.","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-auth.json post /organization/switch","href":"/api-reference/auth/multi-organization/switch-organization","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization.\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Requirements:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"User must be authenticated\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Target user must belong to the same email as current user\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Target organization must be active\"\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Note:\"\n }), \" After switching, the previous access token is revoked. You must use the new token returned in the response.\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Switch Organization","description":"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization.\n\n**Requirements:**\n- User must be authenticated\n- Target user must belong to the same email as current user\n- Target organization must be active\n\n**Note:** After switching, the previous access token is revoked. You must use the new token returned in the response.","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-auth.json post /organization/switch","href":"/api-reference/auth/multi-organization/switch-organization","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/mile-app/1d49f46686dcd76c/scripts/build-openapi.js","/_mintlify/custom/mile-app/bbd4ec23fcfb0c2b/scripts/check-schema.js","/_mintlify/custom/mile-app/620df530e90e7f77/scripts/generate-tag-overviews.js"],"openApiReferenceData":{"operation":{"summary":"Switch Organization","description":"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization.\n\n**Requirements:**\n- User must be authenticated\n- Target user must belong to the same email as current user\n- Target organization must be active\n\n**Note:** After switching, the previous access token is revoked. You must use the new token returned in the response.","tags":["Multi-Organization"],"operationId":"switchOrganization","deprecated":false,"requestBody":"bcb69f5d-e169-46bf-a8b8-8a2d0ebdcbbf","responses":{"200":"9bad3e2e-5ab6-4f0c-bd19-2badc12e68f4","400":"05c0e10e-bb4b-4ffa-8b70-c5f6fff753b5","403":"12404a8b-aa32-4af4-b55a-8ddc57a7c7f7"},"security":["22e864ad-f306-4a18-be2a-087ce9e64d22"],"method":"post","type":"path","servers":["8b62e9b9-8614-4bdd-98bb-be26a9589ea5"],"path":"/organization/switch","baseUrlOptions":["https://apiweb.mile.app/api/v3"],"title":"Switch Organization","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["targetUserId"],"properties":{"targetUserId":{"type":"string","description":"The user ID to switch to. This can be obtained from the organizations array returned by Get User Organizations endpoint.","isRequired":true,"uniqueKey":"targetUserId","typeLabel":"string"}},"example":{"targetUserId":"507f1f77bcf86cd799439012"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"targetUserId":"507f1f77bcf86cd799439012"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"9bad3e2e-5ab6-4f0c-bd19-2badc12e68f4":{"description":"Switch successful - returns new access token and user data","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"New access token for the target organization","uniqueKey":"token","typeLabel":"string"},"expires_in":{"type":"integer","description":"Token expiration time in seconds","uniqueKey":"expires_in","typeLabel":"integer"},"data":{"type":"object","description":"User data for the target organization","additionalProperties":true,"uniqueKey":"data","typeLabel":"object"},"isHubSet":{"type":"boolean","description":"Whether user has hub assigned in the target organization","uniqueKey":"isHubSet","typeLabel":"boolean"},"organizations":{"type":"array","description":"Updated list of all user's organizations","items":{"type":"object","properties":{"userId":{"type":"string","uniqueKey":"organizations.items.[INDEX].userId","typeLabel":"string"},"organizationId":{"type":"string","uniqueKey":"organizations.items.[INDEX].organizationId","typeLabel":"string"},"organizationName":{"type":"string","uniqueKey":"organizations.items.[INDEX].organizationName","typeLabel":"string"},"organizationLogo":{"type":"string","uniqueKey":"organizations.items.[INDEX].organizationLogo","typeLabel":"string"},"roleName":{"type":"string","uniqueKey":"organizations.items.[INDEX].roleName","typeLabel":"string"},"isCurrent":{"type":"boolean","uniqueKey":"organizations.items.[INDEX].isCurrent","typeLabel":"boolean"}},"uniqueKey":"organizations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"organizations","typeLabel":"object[]"}},"example":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...","expires_in":31536000,"data":{"_id":"507f1f77bcf86cd799439012","name":"John Doe","email":"[email protected]","organizationId":"507f1f77bcf86cd799439023"},"isHubSet":true,"organizations":[{"userId":"507f1f77bcf86cd799439011","organizationId":"507f1f77bcf86cd799439022","organizationName":"Acme Corp","organizationLogo":"https://storage.mile.app/logos/acme.png","roleName":"owner","isCurrent":false},{"userId":"507f1f77bcf86cd799439012","organizationId":"507f1f77bcf86cd799439023","organizationName":"Beta Inc","organizationLogo":null,"roleName":"admin","isCurrent":true}]},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...","expires_in":31536000,"data":{"_id":"507f1f77bcf86cd799439012","name":"John Doe","email":"[email protected]","organizationId":"507f1f77bcf86cd799439023"},"isHubSet":true,"organizations":[{"userId":"507f1f77bcf86cd799439011","organizationId":"507f1f77bcf86cd799439022","organizationName":"Acme Corp","organizationLogo":"https://storage.mile.app/logos/acme.png","roleName":"owner","isCurrent":false},{"userId":"507f1f77bcf86cd799439012","organizationId":"507f1f77bcf86cd799439023","organizationName":"Beta Inc","organizationLogo":null,"roleName":"admin","isCurrent":true}]}}},"exampleType":"generated"}},"exampleType":"generated"},"05c0e10e-bb4b-4ffa-8b70-c5f6fff753b5":{"description":"Bad request - Account not active or organization not active","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","uniqueKey":"status","typeLabel":"boolean"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"example":{"status":false,"message":"Account is not active"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":false,"message":"Account is not active"}}},"exampleType":"generated"}},"exampleType":"generated"},"12404a8b-aa32-4af4-b55a-8ddc57a7c7f7":{"description":"Forbidden - Invalid organization selection","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","uniqueKey":"status","typeLabel":"boolean"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"example":{"status":false,"message":"Invalid organization selection"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":false,"message":"Invalid organization selection"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"22e864ad-f306-4a18-be2a-087ce9e64d22":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use a valid Bearer token to authenticate.","scopes":[]}}},"servers":{"8b62e9b9-8614-4bdd-98bb-be26a9589ea5":{"url":"https://apiweb.mile.app/api/v3"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use a valid Bearer token to authenticate.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Use a valid Bearer token to authenticate.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi/public/openapi-auth.json"},"subdomain":"mile-app","siteName":"Docs","title":"Switch Organization - Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T03:18:05.341Z","originalFileLocation":"api-reference/auth/multi-organization/switch-organization.mdx"},"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=\"system\"}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 to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization. Requirements: - User must be authenticated - Target user must belong to the same email as current user - Target organization must be active Note: After switching, the previous access token is revoked. You must use the new token returned in the response.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex, nofollow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_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/mile-app/Twtpt2Bih2o8988O/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Switch Organization - Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization. Requirements: - User must be authenticated - Target user must belong to the same email as current user - Target organization must be active Note: After switching, the previous access token is revoked. You must use the new token returned in the response.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mile-app.mintlify.app/_mintlify/api/og/v2?division=Multi-Organization\u0026amp;title=Switch+Organization\u0026amp;description=Switch+to+a+different+organization+that+the+user+belongs+to.+This+endpoint+revokes+the+current+token+and+generates+a+new+access+token+for+the+target+organizatio\u0026amp;theme=d8f06ae19fc507e5db12c83f\u0026amp;signature=686c399fe7bfe5c524a82e1a0b883144760dc6f780035a43b179ddd85c966de8\">\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=\"Switch Organization - Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization. Requirements: - User must be authenticated - Target user must belong to the same email as current user - Target organization must be active Note: After switching, the previous access token is revoked. You must use the new token returned in the response.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mile-app.mintlify.app/_mintlify/api/og/v2?division=Multi-Organization\u0026amp;title=Switch+Organization\u0026amp;description=Switch+to+a+different+organization+that+the+user+belongs+to.+This+endpoint+revokes+the+current+token+and+generates+a+new+access+token+for+the+target+organizatio\u0026amp;theme=d8f06ae19fc507e5db12c83f\u0026amp;signature=686c399fe7bfe5c524a82e1a0b883144760dc6f780035a43b179ddd85c966de8\">\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/mile-app/Twtpt2Bih2o8988O/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#02A8F3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/auth/multi-organization/switch-organization.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docsy3.mile.app/#organization\",\"name\":\"Docs\",\"url\":\"https://docsy3.mile.app\"},{\"@type\":\"WebSite\",\"@id\":\"https://docsy3.mile.app#website\",\"name\":\"Docs\",\"url\":\"https://docsy3.mile.app\",\"publisher\":{\"@id\":\"https://docsy3.mile.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization#webpage\",\"url\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization\",\"name\":\"Switch Organization\",\"description\":\"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization. Requirements: - User must be authenticated - Target user must belong to the same email as current user - Target organization must be active Note: After switching, the previous access token is revoked. You must use the new token returned in the response.\",\"dateModified\":\"2026-10-01T03:18:05.341Z\",\"isPartOf\":{\"@id\":\"https://docsy3.mile.app#website\"},\"breadcrumb\":{\"@id\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Auth\",\"item\":\"https://docsy3.mile.app/api-reference/auth/multi-organization-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multi-Organization\",\"item\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/get-user-organizations\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Switch Organization\",\"item\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization#apireference\",\"headline\":\"Switch Organization\",\"name\":\"Switch Organization\",\"description\":\"Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization. Requirements: - User must be authenticated - Target user must belong to the same email as current user - Target organization must be active Note: After switching, the previous access token is revoked. You must use the new token returned in the response.\",\"url\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization\",\"mainEntityOfPage\":{\"@id\":\"https://docsy3.mile.app/api-reference/auth/multi-organization/switch-organization#webpage\"},\"dateModified\":\"2026-10-01T03:18:05.341Z\",\"publisher\":{\"@id\":\"https://docsy3.mile.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docsy3.mile.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Docs","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/pages/getting-started/introduction"}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Data Formats","href":"/api-reference/data-formats"},{"title":"Status Codes","href":"/api-reference/status-codes"}]},{"group":"Tools","pages":[{"group":"Short Token","pages":[{"title":"Generate Short Token","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-tools.json post /short-token/generate","href":"/api-reference/tools/short-token/generate-short-token"},{"title":"Resolve Short Token","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-tools.json post /short-token/resolve","href":"/api-reference/tools/short-token/resolve-short-token"}]}]},{"group":"Webhook","pages":[{"title":"How does it works","href":"/api-reference/webhooks/how-it-works"},{"title":"Delivery Attempts and Retries","href":"/api-reference/webhooks/delivery-attempts"},{"title":"Quick Response Requirement","href":"/api-reference/webhooks/quick-response"},{"title":"Failure Monitoring and Notification Process","href":"/api-reference/webhooks/failure-monitoring"},{"group":"Webhook","pages":[{"title":"Task events","version":null,"deprecated":null,"openapi":"/openapi/public/openapi-webhooks.json webhook task-events","href":"/api-reference/webhooks/webhook/task-events"},{"title":"On data source created","version":null,"deprecated":null,"openapi":"/openapi/public/openapi-webhooks.json webhook data-source-created","href":"/api-reference/webhooks/webhook/on-data-source-created"},{"title":"Routing events","version":null,"deprecated":null,"openapi":"/openapi/public/openapi-webhooks.json webhook routing-events","href":"/api-reference/webhooks/webhook/routing-events"},{"title":"Trip events","version":null,"deprecated":null,"openapi":"/openapi/public/openapi-webhooks.json webhook trip-events","href":"/api-reference/webhooks/webhook/trip-events"}]}]},{"group":"Task","pages":[{"group":"Overview","pages":[{"title":"Task","href":"/api-reference/task/overview"},{"title":"Location History","href":"/api-reference/task/location-history-overview"},{"title":"Task Schedule","href":"/api-reference/task/task-schedule-overview"},{"title":"Overview","href":"/api-reference/activity/overview"}]},{"group":"Task","pages":[{"title":"Read tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /tasks","href":"/api-reference/task/task/read-tasks"},{"title":"Read tasks gallery","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /tasks-gallery","href":"/api-reference/task/task/read-tasks-gallery"},{"title":"Read task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /task/{task_id}","href":"/api-reference/task/task/read-task-by-id"},{"title":"Read public task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /task/public/{task_id}","href":"/api-reference/task/task/read-public-task-by-id"},{"title":"Read task tracking","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /tasks/tracking","href":"/api-reference/task/task/read-task-tracking"},{"title":"Create task","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /task","href":"/api-reference/task/task/create-task"},{"title":"Create multiple tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /tasks/bulk/","href":"/api-reference/task/task/create-multiple-tasks"},{"title":"Upload image for task","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /task/photo/{forRenameFile}","href":"/api-reference/task/task/upload-image-for-task"},{"title":"Upload video for task","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /task/video/{forRenameFile}","href":"/api-reference/task/task/upload-video-for-task"},{"title":"Update task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /task/{taskid}","href":"/api-reference/task/task/update-task-by-id"},{"title":"Update multiple tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /tasks/bulk/#","href":"/api-reference/task/task/update-multiple-tasks"},{"title":"Move task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /task/{taskId}/move","href":"/api-reference/task/task/move-task-by-id"},{"title":"Assign task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /task/{taskId}/assign","href":"/api-reference/task/task/assign-task-by-id"},{"title":"Move multiple tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /tasks/bulk/move","href":"/api-reference/task/task/move-multiple-tasks"},{"title":"Assign multiple tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /tasks/bulk/assign","href":"/api-reference/task/task/assign-multiple-tasks"},{"title":"Partially update task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json patch /task/{taskId}","href":"/api-reference/task/task/partially-update-task-by-id"},{"title":"Delete multiple tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json delete /tasks/bulk","href":"/api-reference/task/task/delete-multiple-tasks"},{"title":"Partial update multiple tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json patch /tasks/bulk","href":"/api-reference/task/task/partial-update-multiple-tasks"},{"title":"Delete task by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json delete /task/{id}","href":"/api-reference/task/task/delete-task-by-id"}]},{"group":"Location History","pages":[{"title":"Read location history","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /location-histories","href":"/api-reference/task/location-history/read-location-history"},{"title":"Read location history by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /location-history/{id}","href":"/api-reference/task/location-history/read-location-history-by-id"},{"title":"Read location history by token","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /location-history/tracking/{token}","href":"/api-reference/task/location-history/read-location-history-by-token"},{"title":"Create location history","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /location-history","href":"/api-reference/task/location-history/create-location-history"},{"title":"Bulk create location history","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /location-history/bulk","href":"/api-reference/task/location-history/bulk-create-location-history"},{"title":"Generate location history token","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /location-history/generate-token","href":"/api-reference/task/location-history/generate-location-history-token"},{"title":"Update location history by email \u0026 createdTime","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /location-history/","href":"/api-reference/task/location-history/update-location-history-by-email-\u0026-createdtime"},{"title":"Update location history by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /location-history/{loc_history_id}","href":"/api-reference/task/location-history/update-location-history-by-id"},{"title":"Delete location history by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json delete /location-history/{loc_history_id}","href":"/api-reference/task/location-history/delete-location-history-by-id"},{"title":"Update partially location history by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json patch /location-history/{loc_history_id}","href":"/api-reference/task/location-history/update-partially-location-history-by-id"}]},{"group":"Task Schedule","pages":[{"title":"Read task schedule","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /task/schedules","href":"/api-reference/task/task-schedule/read-task-schedule"},{"title":"Read task schedule by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json get /task/schedule/{id}","href":"/api-reference/task/task-schedule/read-task-schedule-by-id"},{"title":"Create task schedule","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /task/schedule","href":"/api-reference/task/task-schedule/create-task-schedule"},{"title":"Bulk create task schedule","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json post /task/schedules/bulk","href":"/api-reference/task/task-schedule/bulk-create-task-schedule"},{"title":"Update task schedule by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json put /task/schedule/{scheduleId}","href":"/api-reference/task/task-schedule/update-task-schedule-by-id"},{"title":"Delete task schedule by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json delete /task/schedule/{scheduleId}","href":"/api-reference/task/task-schedule/delete-task-schedule-by-id"},{"title":"Update partially task schedule by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-task.json patch /task/schedule/{scheduleId}","href":"/api-reference/task/task-schedule/update-partially-task-schedule-by-id"}]}]},{"group":"Routing","pages":[{"group":"Overview","pages":[{"title":"Routing","href":"/api-reference/routing/overview"},{"title":"Vehicle","href":"/api-reference/routing/vehicle-overview"}]},{"group":"Vehicle","pages":[{"title":"Read vehicle","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json get /vehicles","href":"/api-reference/routing/vehicle/read-vehicle"},{"title":"Read vehicle by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json get /vehicle/{vehicleId}","href":"/api-reference/routing/vehicle/read-vehicle-by-id"},{"title":"Update vehicle by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json put /vehicle/{vehicleId}","href":"/api-reference/routing/vehicle/update-vehicle-by-id"},{"title":"Delete vehicle by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json delete /vehicle/{vehicleId}","href":"/api-reference/routing/vehicle/delete-vehicle-by-id"},{"title":"Update partially vehicle by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json patch /vehicle/{vehicleId}","href":"/api-reference/routing/vehicle/update-partially-vehicle-by-id"},{"title":"Create vehicle","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json post /vehicle","href":"/api-reference/routing/vehicle/create-vehicle"},{"title":"Bulk create vehicle","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json post /vehicles/","href":"/api-reference/routing/vehicle/bulk-create-vehicle"},{"title":"Delete vehicle by Hub","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json delete /vehicles/{hubId}/hub","href":"/api-reference/routing/vehicle/delete-vehicle-by-hub"}]},{"group":"Routing","pages":[{"title":"Read routing results","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json get /results","href":"/api-reference/routing/routing/read-routing-results"},{"title":"Read routing result by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json get /result/{resultId}","href":"/api-reference/routing/routing/read-routing-result-by-id"},{"title":"Update routing result by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json put /result/{resultId}","href":"/api-reference/routing/routing/update-routing-result-by-id"},{"title":"Delete routing result by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json delete /result/{resultId}","href":"/api-reference/routing/routing/delete-routing-result-by-id"},{"title":"Update partially routing result by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json patch /result/{resultId}","href":"/api-reference/routing/routing/update-partially-routing-result-by-id"},{"title":"Route optimize","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json post /routing","href":"/api-reference/routing/routing/route-optimize"},{"title":"Dispatch routing result","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json post /dispatch","href":"/api-reference/routing/routing/dispatch-routing-result"},{"title":"Reorder visits","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json post /reorder-visits","href":"/api-reference/routing/routing/reorder-visits"},{"title":"Read routing result history by result ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-routing.json get /result/{resultId}/history","href":"/api-reference/routing/routing/read-routing-result-history-by-result-id"}]}]},{"group":"Flow","pages":[{"group":"Overview","pages":[{"title":"Flow","href":"/api-reference/flow/overview"},{"title":"Automation","href":"/api-reference/flow/automation-overview"}]},{"group":"Flow","pages":[{"title":"Read flows","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flows","href":"/api-reference/flow/flow/read-flows"},{"title":"Read flow by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flow/{flowId}","href":"/api-reference/flow/flow/read-flow-by-id"},{"title":"Read flow fields","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flow-fields","href":"/api-reference/flow/flow/read-flow-fields"},{"title":"Read flow components","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flow-components","href":"/api-reference/flow/flow/read-flow-components"},{"title":"Read flow component by flow name","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flow/{flowName}/fields","href":"/api-reference/flow/flow/read-flow-component-by-flow-name"},{"title":"Generate example","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flow/{flowName}/task","href":"/api-reference/flow/flow/generate-example"},{"title":"Read flow histories","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /flow-logs","href":"/api-reference/flow/flow/read-flow-histories"},{"title":"Create flow","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json post /flow","href":"/api-reference/flow/flow/create-flow"},{"title":"Read flow versions","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json post /flows/check-version","href":"/api-reference/flow/flow/read-flow-versions"},{"title":"Re-order flow","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json put /flow-reorder","href":"/api-reference/flow/flow/re-order-flow"},{"title":"Update flow by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json put /flow/{flow_id}","href":"/api-reference/flow/flow/update-flow-by-id"},{"title":"Delete flow by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json delete /flow/{flow_id}","href":"/api-reference/flow/flow/delete-flow-by-id"},{"title":"Restore flow by flow log ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json put /flow/{flowId}/restore/{flowLogId}","href":"/api-reference/flow/flow/restore-flow-by-flow-log-id"}]},{"group":"Automation","pages":[{"title":"Read automation","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /automations","href":"/api-reference/flow/automation/read-automation"},{"title":"Read log automation","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /automation-log","href":"/api-reference/flow/automation/read-log-automation"},{"title":"Read automation by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json get /automation/{automationId}","href":"/api-reference/flow/automation/read-automation-by-id"},{"title":"Create automation","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json post /automation","href":"/api-reference/flow/automation/create-automation"},{"title":"Retry bulk automation","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json post /automation-retries","href":"/api-reference/flow/automation/retry-bulk-automation"},{"title":"Update automation by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json put /automation/{automation_id}","href":"/api-reference/flow/automation/update-automation-by-id"},{"title":"Update partially automation by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json patch /automation/{automation_id}","href":"/api-reference/flow/automation/update-partially-automation-by-id"},{"title":"Retry automation by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json patch /automation-retry/{log_id}","href":"/api-reference/flow/automation/retry-automation-by-id"},{"title":"Delete automation by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-flow.json delete /automation/{automation_id}/","href":"/api-reference/flow/automation/delete-automation-by-id"}]}]},{"group":"Workflow","pages":[{"group":"Overview","pages":[{"title":"Overview","href":"/api-reference/workflow/overview"}]},{"group":"Workflow","pages":[{"title":"Get All Workflows","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json get /internal/workflows","href":"/api-reference/workflow/workflow/get-all-workflows"},{"title":"Create Workflow","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json post /internal/workflows","href":"/api-reference/workflow/workflow/create-workflow"},{"title":"Search Workflows","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json get /internal/workflows/search","href":"/api-reference/workflow/workflow/search-workflows"},{"title":"Get Workflow by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json get /workflow/{id}","href":"/api-reference/workflow/workflow/get-workflow-by-id"},{"title":"Update Workflow","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json put /workflow/{id}","href":"/api-reference/workflow/workflow/update-workflow"},{"title":"Delete Workflow","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json delete /workflow/{id}","href":"/api-reference/workflow/workflow/delete-workflow"},{"title":"Get Field Mapping Data","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json get /workflow/{id}/steps/{stepOrder}/field-mapping-data","href":"/api-reference/workflow/workflow/get-field-mapping-data"},{"title":"Validate Field Mappings","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-workflow.json post /workflow/{id}/steps/{stepOrder}/validate-field-mappings","href":"/api-reference/workflow/workflow/validate-field-mappings"}]}]},{"group":"Data","pages":[{"group":"Overview","pages":[{"title":"Data","href":"/api-reference/data/overview"},{"title":"Data Source","href":"/api-reference/data/data-source-overview"},{"title":"Data Type","href":"/api-reference/data/data-type-overview"}]},{"group":"Data Source","pages":[{"title":"Read data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json get /data","href":"/api-reference/data/data-source/read-data-source"},{"title":"Create data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json post /data","href":"/api-reference/data/data-source/create-data-source"},{"title":"Read data source by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json get /data/{dataId}","href":"/api-reference/data/data-source/read-data-source-by-id"},{"title":"Read data source by dataTypeName and dataId","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json get /data/type/{dataTypeName}/{dataId}","href":"/api-reference/data/data-source/read-data-source-by-datatypename-and-dataid"},{"title":"Read data source by hubId, dataTypeName, dataId","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json get /data/hub/{hubId}/type/{dataTypeName}/{data_id}","href":"/api-reference/data/data-source/read-data-source-by-hubid-datatypename-dataid"},{"title":"Bulk create data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json post /data/bulk","href":"/api-reference/data/data-source/bulk-create-data-source"},{"title":"Bulk create or update data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json post /data/bulk/upsert","href":"/api-reference/data/data-source/bulk-create-or-update-data-source"},{"title":"Update data source by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json put /data/{_id}","href":"/api-reference/data/data-source/update-data-source-by-id"},{"title":"Update data source by hubId, dataTypeName, dataId","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json put /data/hub/{hub_id}/type/{dataTypeName}/{dataId}","href":"/api-reference/data/data-source/update-data-source-by-hubid-datatypename-dataid"},{"title":"Update partially data source by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json patch /data/{data_id}","href":"/api-reference/data/data-source/update-partially-data-source-by-id"},{"title":"Delete data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json delete /data/{data_id}/","href":"/api-reference/data/data-source/delete-data-source"},{"title":"Delete data source by hubId, dataTypeName, dataId","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json delete /data/hub/{hubId}/type/{dataTypeName}/{dataId}","href":"/api-reference/data/data-source/delete-data-source-by-hubid-datatypename-dataid"},{"title":"Bulk delete data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json delete /datas/bulk","href":"/api-reference/data/data-source/bulk-delete-data-source"},{"title":"Bulk patch data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json patch /datas/bulk","href":"/api-reference/data/data-source/bulk-patch-data-source"}]},{"group":"Data Type","pages":[{"title":"Read data type","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json get /data-types","href":"/api-reference/data/data-type/read-data-type"},{"title":"Read data type by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json get /data-type/{dataTypeId}/","href":"/api-reference/data/data-type/read-data-type-by-id"},{"title":"Create data type","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json post /data-type","href":"/api-reference/data/data-type/create-data-type"},{"title":"Update data type by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json put /data-type/{dataTypeId}","href":"/api-reference/data/data-type/update-data-type-by-id"},{"title":"Delete data type by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json delete /data-type/{dataTypeId}","href":"/api-reference/data/data-type/delete-data-type-by-id"},{"title":"Update partially data type by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-data.json patch /data-type/{dataTypeId}","href":"/api-reference/data/data-type/update-partially-data-type-by-id"}]}]},{"group":"Setting","pages":[{"group":"Overview","pages":[{"title":"Setting","href":"/api-reference/setting/overview"},{"title":"User","href":"/api-reference/setting/user-overview"},{"title":"Team","href":"/api-reference/setting/team-overview"},{"title":"Role","href":"/api-reference/setting/role-overview"},{"title":"Hub","href":"/api-reference/setting/hub-overview"},{"title":"App Integration","href":"/api-reference/setting/app-integration-overview"},{"title":"Add-on","href":"/api-reference/setting/addon-overview"}]},{"group":"User","pages":[{"title":"Read user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /users","href":"/api-reference/setting/user/read-user"},{"title":"Read mine","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /user","href":"/api-reference/setting/user/read-mine"},{"title":"Update partially user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json patch /user","href":"/api-reference/setting/user/update-partially-user"},{"title":"Read user by email","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /user/email/{email}","href":"/api-reference/setting/user/read-user-by-email"},{"title":"Read user by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /user/{userId}","href":"/api-reference/setting/user/read-user-by-id"},{"title":"Update user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json put /user/{userId}","href":"/api-reference/setting/user/update-user"},{"title":"Update partially user by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json patch /user/{userId}","href":"/api-reference/setting/user/update-partially-user-by-id"},{"title":"Read locked user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /members/locked","href":"/api-reference/setting/user/read-locked-user"},{"title":"Unlock locked user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json post /member/unlock","href":"/api-reference/setting/user/unlock-locked-user"},{"title":"Reset password user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json post /member/reset-password","href":"/api-reference/setting/user/reset-password-user"},{"title":"Delete user","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json delete /member/{userId}","href":"/api-reference/setting/user/delete-user"}]},{"group":"Team","pages":[{"title":"Read team","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /teams","href":"/api-reference/setting/team/read-team"},{"title":"Read team by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /team/{teamId}","href":"/api-reference/setting/team/read-team-by-id"},{"title":"Create team","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json post /team","href":"/api-reference/setting/team/create-team"},{"title":"Update team","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json put /team/{teamId}/","href":"/api-reference/setting/team/update-team"},{"title":"Delete team","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json delete /team/{teamId}/","href":"/api-reference/setting/team/delete-team"}]},{"group":"Role","pages":[{"title":"Read role","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /roles","href":"/api-reference/setting/role/read-role"},{"title":"Read role by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /role/{roleId}","href":"/api-reference/setting/role/read-role-by-id"}]},{"group":"Hub","pages":[{"title":"Read hub","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /hubs","href":"/api-reference/setting/hub/read-hub"},{"title":"Read hub by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /hub/{hubId}/","href":"/api-reference/setting/hub/read-hub-by-id"},{"title":"Create hub","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json post /hub","href":"/api-reference/setting/hub/create-hub"},{"title":"Update hub","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json put /hub/{hubId}","href":"/api-reference/setting/hub/update-hub"},{"title":"Delete hub","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json delete /hub/{hubId}","href":"/api-reference/setting/hub/delete-hub"}]},{"group":"App Integration","pages":[{"title":"Read App Integration","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /app-integrations","href":"/api-reference/setting/app-integration/read-app-integration"},{"title":"Read App Integration by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json get /app-integration/{appIntegrationId}","href":"/api-reference/setting/app-integration/read-app-integration-by-id"},{"title":"Create App Integration","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json post /app-integration","href":"/api-reference/setting/app-integration/create-app-integration"},{"title":"Update App Integration","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json post /app-integration/{appIntegrationId}/","href":"/api-reference/setting/app-integration/update-app-integration"},{"title":"Delete App Integration","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-setting.json delete /app-integration/{appIntegrationId}/","href":"/api-reference/setting/app-integration/delete-app-integration"}]}]},{"group":"Import/Export","pages":[{"group":"Overview","pages":[{"title":"Import/Export","href":"/api-reference/importexport/overview"},{"title":"Data Import","href":"/api-reference/importexport/data-import-overview"},{"title":"Export Task","href":"/api-reference/importexport/export-task-overview"},{"title":"Export Config","href":"/api-reference/importexport/export-config-overview"},{"title":"Import Config","href":"/api-reference/importexport/import-config-overview"}]},{"group":"Export Task","pages":[{"title":"Get export log history","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /tasks/export-log","href":"/api-reference/importexport/export-task/get-export-log-history"},{"title":"Export tasks","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json post /tasks/export","href":"/api-reference/importexport/export-task/export-tasks"},{"title":"Export data source","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json post /data/export","href":"/api-reference/importexport/export-task/export-data-source"}]},{"group":"Data Import","pages":[{"title":"Import data source from file","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json post /data/import","href":"/api-reference/importexport/data-import/import-data-source-from-file"},{"title":"Read import monitoring records","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /import-monitoring","href":"/api-reference/importexport/data-import/read-import-monitoring-records"},{"title":"Read import monitoring record by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /import-monitoring/{id}","href":"/api-reference/importexport/data-import/read-import-monitoring-record-by-id"}]},{"group":"Export Config","pages":[{"title":"Read export config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /export-configs","href":"/api-reference/importexport/export-config/read-export-config"},{"title":"Read export config by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /export-config/{exportConfigId}","href":"/api-reference/importexport/export-config/read-export-config-by-id"},{"title":"Create export config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json post /export-config","href":"/api-reference/importexport/export-config/create-export-config"},{"title":"Update export config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json put /export-config/{exportConfigId}/","href":"/api-reference/importexport/export-config/update-export-config"},{"title":"Delete export config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json delete /export-config/{exportConfigId}/","href":"/api-reference/importexport/export-config/delete-export-config"}]},{"group":"Import Config","pages":[{"title":"Read import config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /import-configs","href":"/api-reference/importexport/import-config/read-import-config"},{"title":"Read import config by ID","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json get /import-config/{importConfigId}","href":"/api-reference/importexport/import-config/read-import-config-by-id"},{"title":"Create import config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json post /import-config","href":"/api-reference/importexport/import-config/create-import-config"},{"title":"Update import config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json put /import-config/{importConfigId}/","href":"/api-reference/importexport/import-config/update-import-config"},{"title":"Delete import config","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-importexport.json delete /import-config/{importConfigId}/","href":"/api-reference/importexport/import-config/delete-import-config"}]}]},{"group":"File","pages":[{"title":"Overview","href":"/api-reference/file/overview"},{"group":"File","pages":[{"title":"View file","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-file.json get /file/view","href":"/api-reference/file/file/view-file"}]}]},{"group":"Auth","pages":[{"group":"Overview","pages":[{"title":"Multi-Organization","href":"/api-reference/auth/multi-organization-overview"}]},{"group":"Multi-Organization","pages":[{"title":"Get User Organizations","description":"Retrieve the list of organizations the current user belongs to. This endpoint returns all organizations where the user's email is registered, along with pending invitations.\n\n**Use Case:**\n- Populate the Switch Organization modal\n- Show organization list in profile dropdown\n- Check if user has multiple organizations\n- View pending organization invitations","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-auth.json get /organizations","href":"/api-reference/auth/multi-organization/get-user-organizations"},{"title":"Switch Organization","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-auth.json post /organization/switch","href":"/api-reference/auth/multi-organization/switch-organization"},{"title":"Create Organization","description":"Create a new organization and automatically switch to it. The user becomes the owner of the new organization.\n\n**Requirements:**\n- User must be authenticated\n- User must have `create/organization` permission\n\n**Behavior:**\n- If user has an existing owned organization with hubs, hub fields are optional (will copy from source)\n- If user has no owned organization, hub fields (hubName, hubLat, hubLng) are required\n- If `copyDataFromFirstOrg` is true, copies configuration, hubs, and flows from user's first owned organization\n- Creates default flows from templates\n- Generates sample data (vehicles, data sources, tasks) via background job\n\n**Note:** After creation, the previous access token is revoked. You must use the new token returned in the response.","deprecated":false,"version":null,"openapi":"/openapi/public/openapi-auth.json post /organization","href":"/api-reference/auth/multi-organization/create-organization"}]}]},{"group":"Objects","pages":[{"title":"Task object","href":"/api-reference/objects/task-object"},{"title":"Location history object","href":"/api-reference/objects/location-history-object"},{"title":"Export Config object","href":"/api-reference/objects/export-config-object"},{"title":"Task Schedule object","href":"/api-reference/objects/task-schedule-object"},{"title":"Vehicle object","href":"/api-reference/objects/vehicle-object"},{"title":"Routing object","href":"/api-reference/objects/routing-object"},{"title":"Flow object","href":"/api-reference/objects/flow-object"},{"title":"Workflow object","href":"/api-reference/objects/workflow-object"},{"title":"Automation object","href":"/api-reference/objects/automation-object"},{"title":"Data source object","href":"/api-reference/objects/data-source-object"},{"title":"Data type object","href":"/api-reference/objects/data-type-object"},{"title":"User object","href":"/api-reference/objects/user-object"},{"title":"Role object","href":"/api-reference/objects/role-object"},{"title":"Hub object","href":"/api-reference/objects/hub-object"},{"title":"Team object","href":"/api-reference/objects/team-object"},{"title":"Add-on object","href":"/api-reference/objects/addon-object"}]}]},{"tab":"Internal API","hidden":true,"pages":[{"title":"Internal API","href":"/api-reference-internal/introduction"}]}]},"basePath":"","title":"Switch Organization - Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}