Create a Knap
Create a new Knap with specified configuration.
Create a new Knap for the authenticated user.
Endpoint
POST /api/studio/knap-toolsRequest Body
{
"name": "Weekly Report Generator",
"schedule_type": "scheduled",
"is_active": true,
"visibility": "private",
"active_by_default": true,
"tool_metadata": {
"action_description": "Generate weekly reports from emails and meetings",
"schedule_description": "every Monday at 9am"
}
}Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the Knap (1-255 characters) |
schedule_type | string | No | Schedule type: manual (default), scheduled, or post_meeting_transcription |
is_active | boolean | No | Whether the Knap is active (default: true) |
visibility | string | No | Visibility: private (default), public, or organization name |
active_by_default | boolean | No | Default active state for shared Knaps (default: true) |
tool_metadata | object | No | Metadata object containing action description and schedule description |
tool_metadata Fields
| Field | Type | Required | Description |
|---|---|---|---|
action_description | string | No | Description of what the Knap does |
schedule_description | string | Required for scheduled | Natural language schedule (e.g., "every Monday at 9am") |
Response
Returns the created Knap with all fields populated, including the generated uuid:
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Weekly 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": "Generate weekly reports from emails and meetings",
"schedule_description": "every Monday at 9am"
},
"creation_timestamp": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"schedule_info": {
"schedule_type": "weekly",
"schedule_time": "09:00",
"days_of_week": [1],
"days_of_month": null,
"weeks_of_month": null,
"months_of_year": null
},
"next_run_at": "2024-01-22T09:00:00Z"
}Error Responses
| Status Code | Description |
|---|---|
400 | Invalid request body or schedule description |
500 | Failed to create Knap |
Examples
Create a Manual Knap
curl -X POST https://api.knapsack.ai/api/studio/knap-tools \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Email Summarizer",
"schedule_type": "manual",
"tool_metadata": {
"action_description": "Summarize important emails"
}
}'Create a Scheduled Knap
curl -X POST https://api.knapsack.ai/api/studio/knap-tools \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily CRM Update",
"schedule_type": "scheduled",
"visibility": "private",
"tool_metadata": {
"action_description": "Update CRM with daily activities",
"schedule_description": "daily at 5:00 PM"
}
}'Create a Post-Meeting Knap
curl -X POST https://api.knapsack.ai/api/studio/knap-tools \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Meeting Notes Generator",
"schedule_type": "post_meeting_transcription",
"tool_metadata": {
"action_description": "Generate structured meeting notes from transcripts"
}
}'