Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Update an agent

Updates an agent. For normal custom agents, keep or set connectionProvider to native. Do not switch a native custom agent to claudeManaged unless the user explicitly asks for Anthropic/Claude Managed.

PATCH/agents/{id}
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
avatarConfigobject

Generated avatar configuration JSON.

connectionProviderstring

Optional agent connection provider. Keep or set native for normal custom agents running on Leadtime internal agent engine. Use selfHosted for external wrappers/webhooks, cursorCloud for Cursor Cloud, or devin for Devin.

Allowed:selfHostedclaudeManagedcursorClouddevingeminiManagedgeminiAgentRuntimenative
namestring

Agent display name. Omit to keep the current name.

nativeConfigobject

Optional native custom-agent config for connectionProvider=native. Instructions and selected workspace skills can also be configured later through /agents/{id}/native.

removeAvatarboolean

When true, removes the agent avatar image.

roleIdstring

Role id to assign. Omit to keep the current role.

Responses
200
401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://leadtime.app/api/public/agents/string" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "avatarConfig": {},
  "connectionProvider": "selfHosted",
  "name": "Company Manager",
  "nativeConfig": {},
  "removeAvatar": true,
  "roleId": "string"
}'
Response
No example response.