Knapsack

Update a Knap

Update an existing Knap's configuration.

Update an existing Knap. Only the owner or organization admin can update a Knap.

Endpoint

PUT /api/studio/knap-tools/{knap_tool_uuid}

Path Parameters

ParameterTypeRequiredDescription
knap_tool_uuidstringYesUUID of the Knap to update

Request Body

All fields are optional. Only include fields you want to update:

{
  "name": "Updated Report Generator",
  "schedule_type": "scheduled",
  "is_active": true,
  "active_by_default": true,
  "tool_metadata": {
    "action_description": "Updated description",
    "schedule_description": "every Tuesday at 10am"
  }
}

Request Fields

FieldTypeDescription
namestringName of the Knap (1-255 characters)
schedule_typestringSchedule type: manual, scheduled, or post_meeting_transcription
is_activebooleanWhether the Knap is active
visibilitystring⚠️ Cannot be changed after creation
active_by_defaultbooleanDefault active state for shared Knaps (only for non-private Knaps)
tool_metadataobjectMetadata object

Response

Returns the updated Knap with all fields:

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Updated Report Generator",
  "creation_user_id": 123,
  "schedule_type": "scheduled",
  "is_active": true,
  "visibility": "private",
  "can_toggle_default_active": false,
  "active_by_default": true,
  "tool_metadata": {
    "action_description": "Updated description",
    "schedule_description": "every Tuesday at 10am"
  },
  "creation_timestamp": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T14:45:00Z",
  "schedule_info": {
    "schedule_type": "weekly",
    "schedule_time": "10:00",
    "days_of_week": [2],
    "days_of_month": null,
    "weeks_of_month": null,
    "months_of_year": null
  },
  "next_run_at": "2024-01-16T10:00:00Z"
}

Error Responses

Status CodeDescription
404Knap not found
403Access denied - user cannot edit this Knap
400Invalid request body
500Failed to update Knap

Example

curl -X PUT https://api.knapsack.ai/api/studio/knap-tools/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Report Generator",
    "tool_metadata": {
      "action_description": "Updated description",
      "schedule_description": "every Tuesday at 10am"
    }
  }'

Notes

  • Visibility cannot be changed after creation
  • Changing schedule_type or schedule_description for scheduled Knaps will recalculate next_run_at
  • active_by_default can only be updated for shared Knaps (non-private)