Update AI agent settings
Update the agent's instructions, drafts, routines, close-the-loop follow-ups, and deployment surfaces. Enabling a surface makes the agent answer customers there. Requires the admin scope.
curl -X PATCH "https://productlane.com/api/v2/settings/ai-agent" \
-H "Authorization: Bearer $PRODUCTLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"welcome_message": "string",
"example_questions": [
"string"
],
"custom_instructions": "string",
"auto_replies_enabled": true,
"create_linear_issues": true,
"generate_weekly_summary": true,
"drafts_enabled": true,
"drafts_trigger": "EVERY_INBOUND_MESSAGE",
"drafts_close_the_loop_enabled": true,
"drafts_custom_prompt": "string",
"routines_enabled": true,
"routines_prompt": "string",
"close_loop_auto_send": true,
"close_loop_template": "string",
"close_loop_upvote_template": "string",
"close_loop_project_template": "string",
"deploy_slack": true,
"deploy_teams": true,
"deploy_api": true,
"deploy_support_portal": true,
"deploy_feature_requests": true
}'Authorization
AuthorizationstringheaderrequiredBearer authentication header of the form
Bearer <token>, where<token>is your auth token.
Body
enabledbooleanwelcome_messagestringexample_questionsstring[]custom_instructionsstring | nullReplaces the whole text. null clears it.
auto_replies_enabledbooleanLets the agent answer customers by email.
create_linear_issuesbooleangenerate_weekly_summarybooleandrafts_enabledbooleandrafts_triggerenum<string>One of:EVERY_INBOUND_MESSAGENEW_THREADS_ONLYdrafts_close_the_loop_enabledbooleandrafts_custom_promptstring | nullReplaces the whole text. null clears it.
routines_enabledbooleanroutines_promptstring | nullReplaces the whole text. null clears it.
close_loop_auto_sendbooleanSends the close-the-loop follow-up without review once a linked issue or project ships.
close_loop_templatestring | nullFollow-up when a linked issue ships. null restores the default.
close_loop_upvote_templatestring | nullFollow-up for customers who upvoted a shipped request. null restores the default.
close_loop_project_templatestring | nullFollow-up when a linked project ships. null restores the default.
deploy_slackbooleandeploy_teamsbooleandeploy_apibooleandeploy_support_portalbooleandeploy_feature_requestsboolean
Response
Successful response
enabledbooleanrequiredwelcome_messagestringrequiredexample_questionsstring[]requiredcustom_instructionsstring | nullrequiredcreate_linear_issuesbooleanrequiredgenerate_weekly_summarybooleanrequiredauto_replies_enabledbooleanrequireddrafts_enabledbooleanrequireddrafts_triggerstringrequiredOne of EVERY_INBOUND_MESSAGE, NEW_THREADS_ONLY.
drafts_close_the_loop_enabledbooleanrequireddrafts_custom_promptstring | nullrequiredroutines_enabledbooleanrequiredroutines_promptstring | nullrequiredclose_loopobjectrequireddeployed_onobjectrequiredupdated_atstringrequired
{
"enabled": true,
"welcome_message": "string",
"example_questions": [
"string"
],
"custom_instructions": "string",
"create_linear_issues": true,
"generate_weekly_summary": true,
"auto_replies_enabled": true,
"drafts_enabled": true,
"drafts_trigger": "string",
"drafts_close_the_loop_enabled": true,
"drafts_custom_prompt": "string",
"routines_enabled": true,
"routines_prompt": "string",
"close_loop": {
"auto_send": true,
"template": "string",
"upvote_template": "string",
"project_template": "string"
},
"deployed_on": {
"slack": true,
"teams": true,
"api": true,
"support_portal": true,
"feature_requests": true
},
"updated_at": "string"
}