{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Products","product_name":"Control Panel","type":"markdown"},"seo":{"title":"Controlling AI Studio Access per User","description":"Use the Treasure AI REST API to control, per user, whether each user in your account can access Treasure AI Studio. Grant or remove access for individual users with an account administrator API key.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"controlling-ai-studio-access-per-user","__idx":0},"children":["Controlling AI Studio Access per User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, every user in an account that has ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure AI Studio"]}," can use it. If you want only specific users to have access, you can manage it ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["per user"]}," through the Treasure AI REST API: an account administrator grants Studio access to the intended users, and everyone else is denied once your account is switched to restricted (opt-in) mode."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the current release there is no Treasure Console UI for this — per-user access is managed entirely through the API described below."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Enabling per-user access restriction for your account"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Per-user grants only take effect once your account is switched to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["restricted (opt-in) mode"]},". Until then, every user with Treasure AI Studio can use it regardless of individual grants. Restricted mode is enabled by Treasure AI — contact your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer Success Manager"]}," to request it. When enabling restricted mode, grant access to the intended users ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["before"]}," the change takes effect so they are not interrupted."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication-and-permissions","__idx":1},"children":["Authentication and Permissions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These endpoints use the standard Treasure AI REST API authentication. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/security/accessing-rest-apis"},"children":["Accessing REST APIs"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["Treasure API baseURLs"]}," for the base URL that applies to your region."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Authenticate with a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Master API key"]},", supplied in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: TD1 <api_key>"]}," header."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Granting and removing access (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE"]},") requires the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["account administrator"]}," role."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Reading a user's current access (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]},") is allowed for an account administrator, a delegated administrator, or the user themselves — so users can check their own access, and administrators can check any user in the account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The target user must belong to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["your own account"]}," — a user ID from another account is not found."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The option key for Treasure AI Studio access is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["treasure_ai_studio"]},", and the only accepted value is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["full_access"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These endpoints are available on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API v3"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"When access changes take effect"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access is evaluated when Studio issues the user a session token (at sign-in), so changes take effect from the user's next sign-in. Granting access lets the user start a Studio session from then on."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Removing access (in a restricted-mode account) immediately revokes the user's issued Treasure AI credentials, so operations that use Treasure AI data stop right away and the user cannot start a new session. A user who is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["already signed in"]},", however, keeps their current session — and can continue interactions that do not rely on Treasure AI data — until they sign out or the session expires. In the current release there is no administrator action to force-terminate an already-active session — to end one immediately, the user must sign out (or wait for the session to expire). A user who was never granted access is denied at sign-in."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"grant-studio-access-to-a-user","__idx":2},"children":["Grant Studio Access to a User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Grants Treasure AI Studio access to a user."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"HTTP Verb"},"children":["HTTP Verb "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"58%","data-label":"Resource"},"children":["Resource "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PUT"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v3/access_control/users/:user_id/profile_options/treasure_ai_studio"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Grants Studio access to the user"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"uri-parameters","__idx":3},"children":["URI Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Parameter Name"},"children":["Parameter Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Required"},"children":["Required "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the user in your account to grant access to"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-body","__idx":4},"children":["Request Body"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Property Name"},"children":["Property Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Required"},"children":["Required "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"18%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["full_access"]},". No other value is accepted."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request","__idx":5},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ curl -X PUT \\\n'https://api.treasuredata.com/v3/access_control/users/<user_id>/profile_options/treasure_ai_studio' \\\n-H 'Authorization: TD1 <api_key>' \\\n-H 'Content-Type: application/json' \\\n-d '{\"value\": \"full_access\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-response","__idx":6},"children":["Sample Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Status: 200 OK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response is a map of the user's profile option keys to their resolved values:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"treasure_ai_studio\": \"full_access\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"remove-a-users-studio-access","__idx":7},"children":["Remove a User's Studio Access"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Removes a user's Treasure AI Studio grant. The user reverts to the account default — denied while your account is in restricted mode."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"HTTP Verb"},"children":["HTTP Verb "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"58%","data-label":"Resource"},"children":["Resource "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DELETE"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v3/access_control/users/:user_id/profile_options/treasure_ai_studio"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Removes the user's Studio grant"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"uri-parameters-1","__idx":8},"children":["URI Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Parameter Name"},"children":["Parameter Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Required"},"children":["Required "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the user in your account to remove access from"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-1","__idx":9},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ curl -X DELETE \\\n'https://api.treasuredata.com/v3/access_control/users/<user_id>/profile_options/treasure_ai_studio' \\\n-H 'Authorization: TD1 <api_key>'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-response-1","__idx":10},"children":["Sample Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Status: 204 No Content"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response body is empty. In a restricted-mode account, removing access immediately revokes the user's already-issued Treasure AI Studio credentials. (While the account is in default-allow mode, removing a grant has no immediate effect, since ungranted users are still allowed.)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"check-a-users-current-access","__idx":11},"children":["Check a User's Current Access"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns the user's resolved profile option values, so you can confirm whether Studio access is currently granted."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"HTTP Verb"},"children":["HTTP Verb "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"58%","data-label":"Resource"},"children":["Resource "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GET"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v3/access_control/users/:user_id/profile_options/treasure_ai_studio"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gets the user's current Studio access value"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"uri-parameters-2","__idx":12},"children":["URI Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Parameter Name"},"children":["Parameter Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Required"},"children":["Required "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the user in your account to check"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-2","__idx":13},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ curl \\\n'https://api.treasuredata.com/v3/access_control/users/<user_id>/profile_options/treasure_ai_studio' \\\n-H 'Authorization: TD1 <api_key>'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-response-2","__idx":14},"children":["Sample Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Status: 200 OK"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"treasure_ai_studio\": \"full_access\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A value of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," means the option is unset, so the user follows the account default."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"auditing","__idx":15},"children":["Auditing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Per-user access changes are recorded in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/security/auditlogs/premium-audit-log-events"},"children":["Premium Audit Log"]},", so you can review when Studio access was granted to or removed from each user."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":16},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/security/users"},"children":["User management"]}," — Manage the users in your account"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/security/accessing-rest-apis"},"children":["Accessing REST APIs"]}," — API keys and authentication"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/security/access-control"},"children":["Treasure AI Studio — Access Control"]}," — How access control works within Studio"]}]}]},"headings":[{"value":"Controlling AI Studio Access per User","id":"controlling-ai-studio-access-per-user","depth":1},{"value":"Authentication and Permissions","id":"authentication-and-permissions","depth":2},{"value":"Grant Studio Access to a User","id":"grant-studio-access-to-a-user","depth":2},{"value":"URI Parameters","id":"uri-parameters","depth":3},{"value":"Request Body","id":"request-body","depth":3},{"value":"Sample Request","id":"sample-request","depth":3},{"value":"Sample Response","id":"sample-response","depth":3},{"value":"Remove a User's Studio Access","id":"remove-a-users-studio-access","depth":2},{"value":"URI Parameters","id":"uri-parameters-1","depth":3},{"value":"Sample Request","id":"sample-request-1","depth":3},{"value":"Sample Response","id":"sample-response-1","depth":3},{"value":"Check a User's Current Access","id":"check-a-users-current-access","depth":2},{"value":"URI Parameters","id":"uri-parameters-2","depth":3},{"value":"Sample Request","id":"sample-request-2","depth":3},{"value":"Sample Response","id":"sample-response-2","depth":3},{"value":"Auditing","id":"auditing","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Controlling AI Studio Access per User","description":"Use the Treasure AI REST API to control, per user, whether each user in your account can access Treasure AI Studio. Grant or remove access for individual users with an account administrator API key."}},"lastModified":"2026-07-01T06:22:50.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/control-panel/security/users/controlling-ai-studio-access","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}