Save Claude Managed Agent settings for an agent
Saves Claude Managed settings. Prefer providerApiKeyId from /agents/provider-api-keys when a saved Anthropic key exists. Put Leadtime-managed model, editor-field instructions, and custom MCP servers under config.managedAgent. Instructions are a standard Leadtime editor field: send HTML, Markdown, or ProseMirror IDoc JSON, and Leadtime converts it to internal IDoc before syncing HTML to Claude. Put GitHub repository defaults under config.githubRepositoryDefaults. Use config.toolMode=basic by default when the agent only needs task context, comments, and status updates while doing external work or analysis. Use config.toolMode=full only when the agent is meant to perform broad Leadtime workspace actions such as creating or editing projects, tasks, organizations, contacts, forms, planning data, settings, or other company-management records. Re-read this endpoint after saving to verify the selected model, tool mode, MCP servers, and repositories.
/agents/{id}/claudeAuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredidstringrequiredfieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
compactfullLT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
fullapplication/jsonanthropicApiKeystring | nullRaw Anthropic API key. Prefer providerApiKeyId when a saved key exists.
configobjectClaude Managed configuration. Put model changes under config.managedAgent.modelId and GitHub defaults under config.githubRepositoryDefaults.
Show propertiesHide properties
agentIdstring | nullExisting Anthropic agent id when agentSource is existing.
agentSourcestringUse leadtimeManaged when Leadtime should create and repair the Claude agent, environment, and vault.
leadtimeManagedexistingallowNetworkAccessbooleanAllow unrestricted outbound network access from the Claude cloud sandbox. When disabled, Leadtime still allows its own app/API/MCP hosts.
customGuidancestring | nullExtra guidance appended to Leadtime task-session instructions.
environmentIdstring | nullExisting Anthropic environment id when agentSource is existing.
exposeRawApiCredentialToAgentbooleanExpose a raw Leadtime API credential to the agent for trusted automation.
githubRepositoryDefaultsClaudeManagedGithubRepositoryDto[]Default GitHub repositories mounted into Claude coding sessions for this agent.
Show propertiesHide properties
ClaudeManagedGithubRepositoryDtocloneUrlstring | nullrequiredRepository clone URL.
fullNamestringrequiredRepository full name, for example owner/repo.
idnumberrequiredGitHub repository id.
namestringrequiredRepository short name.
privatebooleanrequiredWhether the GitHub repository is private.
urlstringrequiredGitHub web URL.
managedAgentobjectLeadtime-managed Claude agent configuration. Put modelId, instructions, and mcpServers here.
Show propertiesHide properties
instructionsstring | objectStandard Leadtime editor field for managed Claude agent instructions. Accepts Markdown, HTML, or ProseMirror IDoc JSON (object or JSON string); Leadtime converts it to internal IDoc before storing and syncing the rendered HTML to Claude.
Use only the nodes and marks documented below for this field.
In HTML you can use:
Node Types and Marks
Nodes
paragraph Type: block Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…) Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers. Atts:
- extraPlaceholder: null
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
heading Type: block Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…) Atts:
- level: 1
<h1 class="heading-base"></h1>
bulletList Type: block list Content: listItem+ Atts: none
<ul class="list-base"><li></li></ul>
hardBreak Type: inline Atts: none
<br>
horizontalRule Type: block Atts: none
<hr class="hr-base">
orderedList Type: block list Content: listItem+ Atts:
- start: 1
- type: null
<ol class="order-list-base" type="null/some-value"><li></li></ol>
listItem Content: (paragraph|list)* (paragraphs and/or lists, in any order) Atts: none
<li></li>
blockquote Type: block Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts: none
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
Marks
link Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
bold Atts: none
<strong>bold text example</strong>
code Atts: none
<code>code text example</code>
italic Atts: none
<em>italic text example</em>
strike Atts: none
<s>strike text example</s>
underline Atts: none
<u>underline text example</u>
Show propertiesHide properties
stringobjectmcpServersClaudeManagedMcpServerDto[]Custom hosted MCP servers to attach to this Claude agent.
Show propertiesHide properties
ClaudeManagedMcpServerDtoauthModestringAuthentication mode for this MCP server.
nonebeareroauthbearerTokenstring | nullBearer token to store for bearer-token MCP servers.
credentialConfiguredbooleanWhether Leadtime already has a stored credential for this MCP server.
idstringStable local id for an existing MCP row.
namestringDisplay name for the MCP server. If omitted, Leadtime derives one from the URL.
oauthCredentialobject | nullOAuth credential details for an OAuth MCP server.
Show propertiesHide properties
accessTokenstring | nullclientIdstring | nullclientSecretstring | nullexpiresAtstring | nullrefreshTokenstring | nullscopestring | nulltokenEndpointstring | nulltokenEndpointAuthTypestring | nullnoneclient_secret_basicclient_secret_posturlstringrequiredHosted MCP server URL.
modelIdstringClaude model id from the agent settings model cache/resources refresh, for example claude-sonnet-4-6 or claude-opus-4-8.
skillsClaudeManagedSkillRefDto[]Skills attached to this Leadtime-managed Claude agent. Maximum 20. Only supported when agentSource is leadtimeManaged.
Show propertiesHide properties
ClaudeManagedSkillRefDtoskillIdstringrequiredAnthropic built-in skill id (for example xlsx) or Leadtime workspace skill id for custom skills.
typestringrequiredanthropiccustomversionstring | nullOptional Anthropic skill version. Defaults to latest when omitted.
toolModestringLeadtime MCP tool set exposed to Claude task sessions.
basicfulluserVaultIdsstring[]Additional user-managed Claude vault ids to attach to sessions.
enabledbooleanEnable or disable this agent connection.
providerApiKeyIdstring | nullSaved Anthropic provider API key id to use for this agent.
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions