Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

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.

POST/agents/{id}/claude
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced 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.
Allowed:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
anthropicApiKeystring | null
Raw Anthropic API key. Prefer providerApiKeyId when a saved key exists.
configobject
Claude Managed configuration. Put model changes under config.managedAgent.modelId and GitHub defaults under config.githubRepositoryDefaults.
Show properties
agentIdstring | null
Existing Anthropic agent id when agentSource is existing.
agentSourcestring
Use leadtimeManaged when Leadtime should create and repair the Claude agent, environment, and vault.
Allowed:leadtimeManagedexisting
allowNetworkAccessboolean
Allow unrestricted outbound network access from the Claude cloud sandbox. When disabled, Leadtime still allows its own app/API/MCP hosts.
customGuidancestring | null
Extra guidance appended to Leadtime task-session instructions.
environmentIdstring | null
Existing Anthropic environment id when agentSource is existing.
exposeRawApiCredentialToAgentboolean
Expose a raw Leadtime API credential to the agent for trusted automation.
githubRepositoryDefaultsClaudeManagedGithubRepositoryDto[]
Default GitHub repositories mounted into Claude coding sessions for this agent.
Show properties
Array of ClaudeManagedGithubRepositoryDto
cloneUrlstring | nullrequired
Repository clone URL.
fullNamestringrequired
Repository full name, for example owner/repo.
idnumberrequired
GitHub repository id.
namestringrequired
Repository short name.
privatebooleanrequired
Whether the GitHub repository is private.
urlstringrequired
GitHub web URL.
managedAgentobject
Leadtime-managed Claude agent configuration. Put modelId, instructions, and mcpServers here.
Show properties
instructionsstring | object
Standard 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 ```html <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 ```html <h1 class="heading-base"></h1> ``` **bulletList** Type: block list Content: listItem+ Atts: none ```html <ul class="list-base"><li></li></ul> ``` **hardBreak** Type: inline Atts: none ```html <br> ``` **horizontalRule** Type: block Atts: none ```html <hr class="hr-base"> ``` **orderedList** Type: block list Content: listItem+ Atts: - start: 1 - type: null ```html <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 ```html <li></li> ``` **blockquote** Type: block Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts: none ```html <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 ```html <a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a> ``` **bold** Atts: none ```html <strong>bold text example</strong> ``` **code** Atts: none ```html <code>code text example</code> ``` **italic** Atts: none ```html <em>italic text example</em> ``` **strike** Atts: none ```html <s>strike text example</s> ``` **underline** Atts: none ```html <u>underline text example</u> ```
Show properties
One of:
string
string
object
object
mcpServersClaudeManagedMcpServerDto[]
Custom hosted MCP servers to attach to this Claude agent.
Show properties
Array of ClaudeManagedMcpServerDto
authModestring
Authentication mode for this MCP server.
Allowed:nonebeareroauth
bearerTokenstring | null
Bearer token to store for bearer-token MCP servers.
credentialConfiguredboolean
Whether Leadtime already has a stored credential for this MCP server.
idstring
Stable local id for an existing MCP row.
namestring
Display name for the MCP server. If omitted, Leadtime derives one from the URL.
oauthCredentialobject | null
OAuth credential details for an OAuth MCP server.
Show properties
accessTokenstring | null
clientIdstring | null
clientSecretstring | null
expiresAtstring | null
refreshTokenstring | null
scopestring | null
tokenEndpointstring | null
tokenEndpointAuthTypestring | null
Allowed:noneclient_secret_basicclient_secret_post
urlstringrequired
Hosted MCP server URL.
modelIdstring
Claude 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 properties
Array of ClaudeManagedSkillRefDto
skillIdstringrequired
Anthropic built-in skill id (for example xlsx) or Leadtime workspace skill id for custom skills.
typestringrequired
Allowed:anthropiccustom
versionstring | null
Optional Anthropic skill version. Defaults to latest when omitted.
toolModestring
Leadtime MCP tool set exposed to Claude task sessions.
Allowed:basicfull
userVaultIdsstring[]
Additional user-managed Claude vault ids to attach to sessions.
enabledboolean
Enable or disable this agent connection.
providerApiKeyIdstring | null
Saved Anthropic provider API key id to use for this agent.
Responses
201
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/agents/string/claude" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "anthropicApiKey": "string",
  "config": {
    "agentId": "string",
    "agentSource": "leadtimeManaged",
    "allowNetworkAccess": true,
    "customGuidance": "string",
    "environmentId": "string",
    "exposeRawApiCredentialToAgent": true,
    "githubRepositoryDefaults": [
      {
        "cloneUrl": "string",
        "fullName": "string",
        "id": 0,
        "name": "string",
        "private": true,
        "url": "string"
      }
    ],
    "managedAgent": {
      "instructions": "string",
      "mcpServers": [
        {
          "authMode": "none",
          "bearerToken": "string",
          "credentialConfigured": true,
          "id": "string",
          "name": "string",
          "oauthCredential": {
            "accessToken": "string",
            "clientId": "string",
            "clientSecret": "string",
            "expiresAt": "string",
            "refreshToken": "string",
            "scope": "string",
            "tokenEndpoint": "string",
            "tokenEndpointAuthType": "none"
          },
          "url": "string"
        }
      ],
      "modelId": "claude-sonnet-4-6",
      "skills": [
        {
          "skillId": "string",
          "type": "anthropic",
          "version": "string"
        }
      ]
    },
    "toolMode": "basic",
    "userVaultIds": [
      "string"
    ]
  },
  "enabled": true,
  "providerApiKeyId": "string"
}'
Response
No example response.