Before You Start
- Legacy Assistants API: This is the new Agents API with native Vercel AI SDK compatibility. If you’re using the legacy Assistants API, see the migration guide.
Base URL
Draft vs. Published Version
Configuration changes made via/agent/v1/update only affect the draft. Until you call publish, those changes are not visible to workspace members. Access changes take effect immediately and do not require publishing.
Use Cases
- Promote draft edits made via the Update API into a new active version
- Roll out changes programmatically as part of a CI/CD pipeline
- Release a new revision with an optional change description shown in version history
Parameters
Example
Response Format
Success Response (200 OK)
Validation Rules
- Agent access — A personal key can publish when its owner can edit the agent, including through a group or the workspace, or when the key has an editor or owner grant. A workspace key needs an editor or owner grant on the key.
- Workspace match — The agent must belong to the same workspace as the API key.
- Agents only — Projects (
type=PROJECT) are not supported and will return403. - Has draft changes — The draft must differ from the latest published version. Publishing with no pending changes returns
409 Conflict, mirroring the disabled “Update” button in the UI.
Error Handling
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.