Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.
This endpoint allows you to create or update a secure authentication profile for your agent in a single operation. It provides a convenient way to either set up a new profile or modify an existing one, depending on whether you provide an auth token.
The name parameter is required to identify your new profile
Important: If the name already exists for the given agent_id, the existing profile will be replaced with a new one and a new auth token will be generated
The keys in your auth_data must be input arguments defined for your agent
Store the returned auth_token securely - it cannot be recovered if lost
When updating, if the auth profile is not found, a 404 error is returned
For new profiles, the operation returns either “create” or “replace” in the response. “create” indicates an entirely new profile was created. “replace” indicates an existing profile with the same name was replaced.
For updates, the operation returns “update” in the response
The type of operation performed (create, update, or replace)
Available options:
create,
update,
replace
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Kura AI","colors":{"primary":"#6B46C1","light":"#E9D5FF","dark":"#4C1D95"},"logo":{"light":"https://mintcdn.com/kuraaiinc/th72dn9VxhWd2b4C/images/logo.png?fit=max\u0026auto=format\u0026n=th72dn9VxhWd2b4C\u0026q=85\u0026s=f899d09153419d83b3d287285e1290d9","dark":"https://mintcdn.com/kuraaiinc/th72dn9VxhWd2b4C/images/logo.png?fit=max\u0026auto=format\u0026n=th72dn9VxhWd2b4C\u0026q=85\u0026s=f899d09153419d83b3d287285e1290d9"},"favicon":"/favicon.png","navbar":{"links":[{"label":"Support","href":"mailto:support@trykura.com"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.trykura.com"}},"footer":{"socials":{"x":"https://x.com/KuraAIAgents","linkedin":"https://www.linkedin.com/company/kura-ai/"}},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"kuraaiinc","hasAudioNarration":false,"actualSubdomain":"kuraaiinc","customDomains":["docs.trykura.com"],"gitSource":{"type":"github","owner":"darrenhwang1","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21a76732881c474e3234c9","collectionId":"ba1644ee-5aa2-4a29-914f-c8b45dee3f68","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21a76732881c474e3234c9:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Documentation","count":17},{"language":"default","tag":"Workflow Blocks","count":7},{"language":"default","tag":"API Reference","count":6},{"language":"default","tag":"Endpoints","count":5},{"language":"default","tag":"Agent Data","count":4},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"API Documentation","count":1},{"language":"default","tag":"Monitoring","count":1},{"language":"default","tag":"Productionizing","count":1},{"language":"default","tag":"Recursion","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/upsert_agent_auth_profile","slug":"/api-reference/endpoint/upsert_agent_auth_profile","pageMetadata":{"title":"Upsert Agent Auth Profile","openapi":"POST /api/upsert_agent_auth_profile","description":"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.","href":"/api-reference/endpoint/upsert_agent_auth_profile"},"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: \"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.\"\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={code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`This endpoint allows you to create or update a secure authentication profile for your agent in a single operation. It provides a convenient way to either set up a new profile or modify an existing one, depending on whether you provide an auth token.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`You provide an agent ID, API key, and authentication data (key-value pairs)`}),`\n`,_jsx(_components.li,{children:`For creation: You also provide a profile name`}),`\n`,_jsx(_components.li,{children:`For updates: You provide the existing auth token`}),`\n`,_jsx(_components.li,{children:`The system validates that the keys in your auth data match the input arguments defined for your agent`}),`\n`,_jsx(_components.li,{children:`The system either creates a new encrypted profile or updates an existing one`}),`\n`,_jsx(_components.li,{children:`For new profiles, you receive an auth token that you can use when running your agent`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`creating-a-new-profile`,children:`Creating a new profile`}),`\n`,_jsxs(_components.p,{children:[`When no `,_jsx(_components.code,{children:`auth_token`}),` is provided:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A new authentication profile is created`}),`\n`,_jsx(_components.li,{children:`A new auth token is generated and returned to you`}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`name`}),` parameter is required to identify your new profile`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Important:`}),` If the `,_jsx(_components.code,{children:`name`}),` already exists for the given `,_jsx(_components.code,{children:`agent_id`}),`, the existing profile will be replaced with a new one and a new auth token will be generated`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`updating-an-existing-profile`,children:`Updating an existing profile`}),`\n`,_jsxs(_components.p,{children:[`When an `,_jsx(_components.code,{children:`auth_token`}),` is provided:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The existing profile is located and updated with the new auth data`}),`\n`,_jsx(_components.li,{children:`The original auth token remains valid`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`profile-identification`,children:`Profile identification`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Each authentication profile is uniquely identified by the combination of `,_jsx(_components.code,{children:`agent_id`}),` and `,_jsx(_components.code,{children:`name`})]}),`\n`,_jsx(_components.li,{children:`If you create a profile with a name that already exists for that agent, the existing profile will be replaced`}),`\n`,_jsx(_components.li,{children:`When replacing an existing profile, a new auth token is generated and the old one becomes invalid`}),`\n`,_jsxs(_components.li,{children:[`To update an existing profile without replacing it (and keeping the same auth token), use the `,_jsx(_components.code,{children:`auth_token`}),` parameter instead`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`session-storage-option`,children:`Session storage option`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`should_save_session`}),` parameter controls whether the agent should maintain session state between runs`]}),`\n`,_jsxs(_components.li,{children:[`When set to `,_jsx(_components.code,{children:`true`}),`, any session data from the agent will be preserved for future runs`]}),`\n`,_jsxs(_components.li,{children:[`When set to `,_jsx(_components.code,{children:`false`}),` or not provided, session data is not preserved between runs`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`security-features`,children:`Security features`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`All authentication data is encrypted using strong AES-GCM encryption`}),`\n`,_jsx(_components.li,{children:`Each value in your auth data is encrypted with a unique salt`}),`\n`,_jsx(_components.li,{children:`The encryption key is derived from your auth token and never stored`}),`\n`,_jsx(_components.li,{children:`Each auth token is bound to a specific agent_id and cannot be used with different agents`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`important-notes`,children:`Important notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The keys in your auth_data must be input arguments defined for your agent`}),`\n`,_jsx(_components.li,{children:`Store the returned auth_token securely - it cannot be recovered if lost`}),`\n`,_jsx(_components.li,{children:`When updating, if the auth profile is not found, a 404 error is returned`}),`\n`,_jsx(_components.li,{children:`For new profiles, the operation returns either “create” or “replace” in the response. “create” indicates an entirely new profile was created. “replace” indicates an existing profile with the same name was replaced.`}),`\n`,_jsx(_components.li,{children:`For updates, the operation returns “update” in the response`}),`\n`]})]})}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":{"config":{},"pageMetadata":{"title":"Upsert Agent Auth Profile","openapi":"POST /api/upsert_agent_auth_profile","description":"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.","href":"/api-reference/endpoint/upsert_agent_auth_profile"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Creating a new profile","slug":"creating-a-new-profile","depth":2,"children":[]},{"title":"Updating an existing profile","slug":"updating-an-existing-profile","depth":2,"children":[]},{"title":"Profile identification","slug":"profile-identification","depth":2,"children":[]},{"title":"Session storage option","slug":"session-storage-option","depth":2,"children":[]},{"title":"Security features","slug":"security-features","depth":2,"children":[]},{"title":"Important notes","slug":"important-notes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.","requestBody":"31b598ca-6ce4-4a69-b737-45b83422aad9","responses":{"200":"93bd5f83-4df3-4274-9db7-d218f7398a22","400":"4075c9f2-654f-4e0c-95af-8fc696c0edf8","401":"2524d085-46b3-4ee1-8456-4879ca56f123","404":"143fb76a-7f56-4eae-b41e-ab2287d05a1d","500":"aa2b883e-c971-45a9-b4f1-cac6df9912b3"},"method":"post","type":"path","servers":["e2ad9e1f-b6c2-4d5b-8694-eee68c31e1e0"],"security":[],"path":"/api/upsert_agent_auth_profile","baseUrlOptions":["https://backend.trykura.com"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_id","api_key","auth_data"],"properties":{"agent_id":{"type":"string","description":"The ID of the agent to associate with this auth profile","isRequired":true,"uniqueKey":"agent_id","typeLabel":"string"},"api_key":{"type":"string","description":"The API key for authentication","isRequired":true,"uniqueKey":"api_key","typeLabel":"string"},"auth_data":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"auth_data.additionalProperties","typeLabel":"string"},"description":"Key-value pairs of authentication data that matches the agent's input arguments","isRequired":true,"uniqueKey":"auth_data","typeLabel":"object"},"name":{"type":"string","description":"Name of the authentication profile (required for creation, optional for updates)","uniqueKey":"name","typeLabel":"string"},"should_save_session":{"type":"boolean","description":"Whether to save session data between agent runs (optional)","uniqueKey":"should_save_session","typeLabel":"boolean"},"auth_token":{"type":"string","description":"The auth token for updating an existing profile (required for updates)","uniqueKey":"auth_token","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"agent_id":"\u003cstring>","api_key":"\u003cstring>","auth_data":{},"name":"\u003cstring>","should_save_session":true,"auth_token":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"93bd5f83-4df3-4274-9db7-d218f7398a22":{"description":"Authentication profile created or updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"auth_token":{"type":"string","description":"The authentication token to use with run_agent (returned for newly created profiles)","uniqueKey":"auth_token","typeLabel":"string"},"name":{"type":"string","description":"The name of the authentication profile","uniqueKey":"name","typeLabel":"string"},"type":{"type":"string","enum":["create","update","replace"],"description":"The type of operation performed (create, update, or replace)","uniqueKey":"type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"auth_token":"\u003cstring>","name":"\u003cstring>","type":"create"}}},"exampleType":"generated"}},"exampleType":"generated"},"4075c9f2-654f-4e0c-95af-8fc696c0edf8":{"description":"Bad request - auth data doesn't match agent arguments or missing required parameters","content":{"application/json":{"schema":{"required":["error","message"],"type":"object","properties":{"error":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"error","typeLabel":"integer\u003cint32>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2524d085-46b3-4ee1-8456-4879ca56f123":{"description":"Unauthorized - invalid API key","content":{"application/json":{"schema":{"required":["error","message"],"type":"object","properties":{"error":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"error","typeLabel":"integer\u003cint32>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"143fb76a-7f56-4eae-b41e-ab2287d05a1d":{"description":"Not found - auth profile not found when updating","content":{"application/json":{"schema":{"required":["error","message"],"type":"object","properties":{"error":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"error","typeLabel":"integer\u003cint32>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"aa2b883e-c971-45a9-b4f1-cac6df9912b3":{"description":"Server error","content":{"application/json":{"schema":{"required":["error","message"],"type":"object","properties":{"error":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"error","typeLabel":"integer\u003cint32>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"e2ad9e1f-b6c2-4d5b-8694-eee68c31e1e0":{"url":"https://backend.trykura.com"}}},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"kuraaiinc","siteName":"Kura AI","title":"Upsert Agent Auth Profile - Kura AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T06:47:00.934Z","originalFileLocation":"api-reference/endpoint/upsert_agent_auth_profile.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=\"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Kura AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_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/kuraaiinc/fqWJzQyrdjGc7f-R/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upsert Agent Auth Profile - Kura AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Kura AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://kuraaiinc.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Upsert+Agent+Auth+Profile\u0026amp;description=Creates+or+updates+a+secure+authentication+profile+for+an+agent.+This+endpoint+can+either+create+a+new+profile+%28returning+a+new+auth+token%29+or+update+an+existin\u0026amp;theme=3c786f7dab9832e11557f91c\u0026amp;signature=39041efe1f73ca46538faebbec4ac49820dd926c1d2d638803bcd7c2ad2ef862\">\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=\"Upsert Agent Auth Profile - Kura AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://kuraaiinc.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Upsert+Agent+Auth+Profile\u0026amp;description=Creates+or+updates+a+secure+authentication+profile+for+an+agent.+This+endpoint+can+either+create+a+new+profile+%28returning+a+new+auth+token%29+or+update+an+existin\u0026amp;theme=3c786f7dab9832e11557f91c\u0026amp;signature=39041efe1f73ca46538faebbec4ac49820dd926c1d2d638803bcd7c2ad2ef862\">\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/kuraaiinc/fqWJzQyrdjGc7f-R/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Kura AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6B46C1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/upsert_agent_auth_profile.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.trykura.com/#organization\",\"name\":\"Kura AI\",\"url\":\"https://docs.trykura.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/kuraaiinc/th72dn9VxhWd2b4C/images/logo.png?fit=max\u0026auto=format\u0026n=th72dn9VxhWd2b4C\u0026q=85\u0026s=f899d09153419d83b3d287285e1290d9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.trykura.com#website\",\"name\":\"Kura AI\",\"url\":\"https://docs.trykura.com\",\"publisher\":{\"@id\":\"https://docs.trykura.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile#webpage\",\"url\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile\",\"name\":\"Upsert Agent Auth Profile\",\"description\":\"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.\",\"dateModified\":\"2026-01-07T06:47:00.934Z\",\"isPartOf\":{\"@id\":\"https://docs.trykura.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.trykura.com/api-reference/endpoint/run_agent\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upsert Agent Auth Profile\",\"item\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile#apireference\",\"headline\":\"Upsert Agent Auth Profile\",\"name\":\"Upsert Agent Auth Profile\",\"description\":\"Creates or updates a secure authentication profile for an agent. This endpoint can either create a new profile (returning a new auth token) or update an existing one (using the provided auth token). Authentication profiles are uniquely identified by agent_id + name.\",\"url\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trykura.com/api-reference/endpoint/upsert_agent_auth_profile#webpage\"},\"dateModified\":\"2026-01-07T06:47:00.934Z\",\"publisher\":{\"@id\":\"https://docs.trykura.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trykura.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Kura AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Kura AI","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Endpoints","pages":[{"title":"Run Agent","openapi":"POST /run_agent","href":"/api-reference/endpoint/run_agent"},{"title":"Get Session","openapi":"GET /api/get_session/{session_id}","href":"/api-reference/endpoint/get"},{"title":"Get Session Status","openapi":"GET /api/get_session_status/{session_id}","href":"/api-reference/endpoint/get_session_status"},{"title":"Get Session Result","openapi":"GET /api/get_session_result/{session_id}","description":"Returns the complete session result including the execution data and output. This endpoint is useful for retrieving the final result of a completed session.","href":"/api-reference/endpoint/get_session_result"},{"title":"Upsert Agent Auth Profile","openapi":"POST /api/upsert_agent_auth_profile","href":"/api-reference/endpoint/upsert_agent_auth_profile"}]}]}]},"basePath":"","title":"Upsert Agent Auth Profile - Kura AI","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}