# Devin

> Create and manage Devin sessions, messages, insights, playbooks and knowledge notes with the organization API.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/devin

## Actions

### Append session tags

Append tags to a session (deduplicating with existing tags).

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)
- Tags (`tags`, list, required): Tags.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "tags": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Archive session

Archive session and put it to sleep if currently running

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "acus_consumed": 0,
    "automation_id": null,
    "category": null,
    "child_session_ids": null,
    "created_at": 0,
    "devin_mode": null,
    "is_archived": false,
    "on_demand_usage": null,
    "org_id": null,
    "origin": null,
    "parent_session_id": null,
    "playbook_id": null,
    "pull_requests": [],
    "security_profile": null,
    "service_user_id": null,
    "session_id": "example",
    "status": "example",
    "status_detail": null,
    "structured_output": null,
    "subcategory": null,
    "tags": [],
    "title": null,
    "updated_at": 0,
    "url": "example",
    "user_id": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Create knowledge note

Create a note for an organization.

**Inputs**

- Body (`body`, text, required): Body.
- Folder ID (`folder_id`, text): Folder id.
- Is enabled (`is_enabled`, true/false): Is enabled.
- Name (`name`, text, required): Name.
- Pinned repo (`pinned_repo`, text): Pinned repo.
- Trigger (`trigger`, text, required): Trigger.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "folder_id": null,
    "folder_path": "example",
    "is_enabled": false,
    "macro": null,
    "name": "example",
    "note_id": "example",
    "org_id": null,
    "pinned_repo": null,
    "trigger": "example",
    "updated_at": 0
  },
  "has_more": false,
  "next_cursor": null
}
```

### Create playbook

Create a playbook for an organization.

**Inputs**

- Body (`body`, text, required): Body.
- Macro (`macro`, text): Playbook macro identifier. Must start with '!' followed by one or more letters, digits, underscores, or hyphens. Example: '!my_macro' or '!my-macro'
- Structured output schema (`structured_output_schema`, object): JSON Schema (Draft 7) that sessions using this playbook will produce as structured output. Max 64KB. Must be self-contained (no external $ref).
- Title (`title`, text, required): Title.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "created_by": "example",
    "macro": null,
    "org_id": null,
    "playbook_id": "example",
    "structured_output_schema": null,
    "title": "example",
    "updated_at": 0,
    "updated_by": "example"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Create session

Create a new session This can consume paid usage.

**Inputs**

- Session (`session_id`, text): Session id.
- Attachment URLS (`attachment_urls`, list): Attachment urls.
- Bypass approval (`bypass_approval`, true/false): Bypass approval.
- Child playbook ID (`child_playbook_id`, text): Child playbook id.
- Create as user ID (`create_as_user_id`, text): Create as user id.
- Devin mode (`devin_mode`, text): Override the Devin agent mode for the session. 'normal' uses the default Agent mode, 'fast' uses Fast mode, 'lite' uses Devin Lite, 'ultra' uses Devin Ultra, and 'fusion' uses Fusion. The other values select the agent mode of the same name in the web app. Preview modes are subject to the same feature flag and enterprise agent preview restrictions as the web app. One of: `normal`, `fast`, `fusion`, `lite`, `ultra`, `swe-2-medium`, `swe-2-high`, `swe-2-max`.
- Knowledge IDS (`knowledge_ids`, list): Knowledge ids.
- Max acu limit (`max_acu_limit`, number): Max acu limit. At least 1.
- Platform (`platform`, text): Override the VM platform for the session (e.g. 'windows'), or the name of an outpost (BYOB) pool to run the session on one of your own machines. When omitted (or set to 'inherit'), a session created by a parent Devin inherits the parent's placement , both its platform and its outpost pool, so an outpost-placed parent spawns children on the same pool; otherwise the organization default is used. Any value must match either a platform configured for your organization or an outpost pool name (case-insensitive) , built-in platforms take priority when a name matches both, and a personal outpost pool owned by the caller takes priority over an accoun
- Playbook (`playbook_id`, text): Playbook id.
- Prompt (`prompt`, text, required): Prompt.
- Repos (`repos`, list): Repos.
- Resumable (`resumable`, true/false): Whether to preserve the session's VM state after it stops so the session can be resumed. Set to false for disposable sessions.
- Secret IDS (`secret_ids`, list): Secret ids.
- Security profile (`security_profile`, object): Attach a security profile to this session; omitted = default resolution applies (the playbook's security profile when one is bound, then the org/enterprise default). Requires the security-profile management permission.
- Session links (`session_links`, list): Session links.
- Session secrets (`session_secrets`, list): Session secrets.
- Structured output required (`structured_output_required`, true/false): When true (default), the agent MUST call provide_structured_output with is_final=true before its turn ends. When false, the tool is available but not required , it is not guaranteed to be called in a given turn.
- Structured output schema (`structured_output_schema`, object): JSON Schema (Draft 7) for validating structured output. Max 64KB. Must be self-contained (no external $ref).
- Tags (`tags`, list): Tags.
- Title (`title`, text): Title.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "acus_consumed": 0,
    "automation_id": null,
    "category": null,
    "child_session_ids": null,
    "created_at": 0,
    "devin_mode": null,
    "is_archived": false,
    "on_demand_usage": null,
    "org_id": null,
    "origin": null,
    "parent_session_id": null,
    "playbook_id": null,
    "pull_requests": [],
    "security_profile": null,
    "service_user_id": null,
    "session_id": "example",
    "status": "example",
    "status_detail": null,
    "structured_output": null,
    "subcategory": null,
    "tags": [],
    "title": null,
    "updated_at": 0,
    "url": "example",
    "user_id": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Delete knowledge note

Delete a note for an organization.

**Inputs**

- Note (`note_id`, text, required): Knowledge note ID (prefix: note-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "folder_id": null,
    "folder_path": "example",
    "is_enabled": false,
    "macro": null,
    "name": "example",
    "note_id": "example",
    "org_id": null,
    "pinned_repo": null,
    "trigger": "example",
    "updated_at": 0
  },
  "has_more": false,
  "next_cursor": null
}
```

### Delete playbook

Delete a playbook for an organization.

**Inputs**

- Playbook (`playbook_id`, text, required): Playbook ID (prefix: playbook-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "created_by": "example",
    "macro": null,
    "org_id": null,
    "playbook_id": "example",
    "structured_output_schema": null,
    "title": "example",
    "updated_at": 0,
    "updated_by": "example"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Generate session insights

Trigger on-demand generation of session insights. This can consume paid usage.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "session_id": "example",
    "status": "example"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get knowledge folders

Return the full folder tree with per-folder note counts.

**Inputs**: None.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "folders": [],
    "root_note_count": 0
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get knowledge note

Get a note by ID for an organization.

**Inputs**

- Note (`note_id`, text, required): Knowledge note ID (prefix: note-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "folder_id": null,
    "folder_path": "example",
    "is_enabled": false,
    "macro": null,
    "name": "example",
    "note_id": "example",
    "org_id": null,
    "pinned_repo": null,
    "trigger": "example",
    "updated_at": 0
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get playbook

Get a specific organization- or enterprise-level playbook.

**Inputs**

- Playbook (`playbook_id`, text, required): Playbook ID (prefix: playbook-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "created_by": "example",
    "macro": null,
    "org_id": null,
    "playbook_id": "example",
    "structured_output_schema": null,
    "title": "example",
    "updated_at": 0,
    "updated_by": "example"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get session

Get details of a specific session.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "acus_consumed": 0,
    "automation_id": null,
    "category": null,
    "child_session_ids": null,
    "created_at": 0,
    "devin_mode": null,
    "is_archived": false,
    "on_demand_usage": null,
    "org_id": null,
    "origin": null,
    "parent_session_id": null,
    "playbook_id": null,
    "pull_requests": [],
    "security_profile": null,
    "service_user_id": null,
    "session_id": "example",
    "status": "example",
    "status_detail": null,
    "structured_output": null,
    "subcategory": null,
    "tags": [],
    "title": null,
    "updated_at": 0,
    "url": "example",
    "user_id": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get session insights

Get detailed insights for a specific session, including message counts, session size classification, and AI-generated analysis.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "acus_consumed": 0,
    "analysis": null,
    "analysis_status": null,
    "automation_id": null,
    "category": null,
    "child_session_ids": null,
    "created_at": 0,
    "devin_mode": null,
    "is_archived": false,
    "num_devin_messages": 0,
    "num_user_messages": 0,
    "on_demand_usage": null,
    "org_id": null,
    "origin": null,
    "parent_session_id": null,
    "playbook_id": null,
    "pull_requests": [],
    "security_profile": null,
    "service_user_id": null,
    "session_id": "example",
    "session_size": "example",
    "status": "example",
    "status_detail": null,
    "structured_output": null,
    "subcategory": null,
    "tags": [],
    "title": null,
    "updated_at": 0,
    "url": "example",
    "user_id": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get session tags

Get the tags for a specific session.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "tags": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List knowledge notes

List notes for an organization. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- After (`after`, text): After.
- First (`first`, number): First. From 1 to 200.
- Search (`search`, text): Search.
- Folder path (`folder_path`, text): Folder path.
- Pinned repo (`pinned_repo`, text): Pinned repo.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "end_cursor": null,
    "has_next_page": false,
    "items": [],
    "total": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### List playbooks

List playbooks for an organization. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- After (`after`, text): After.
- First (`first`, number): First. From 1 to 200.
- Include enterprise (`include_enterprise`, true/false): Also return the enterprise-level playbooks shared with this organization (`access_type: enterprise`). They are read-only through the organization API.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "end_cursor": null,
    "has_next_page": false,
    "items": [],
    "total": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### List session attachments

List all attachments for a session. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)

**Outputs**: Result.

- `data` (list): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": [],
  "has_more": false,
  "next_cursor": null
}
```

### List session messages

List all messages for a session with cursor-based pagination, ordered chronologically. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)
- After (`after`, text): After.
- First (`first`, number): First. From 1 to 200.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "end_cursor": null,
    "has_next_page": false,
    "items": [],
    "total": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### List sessions

List sessions. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- After (`after`, text): After.
- Automation IDS (`automation_ids`, list): Filter to sessions created by any of these automations
- Category (`category`, text): Category. One of: `bug_fixing`, `ci_cd_and_devops`, `code_quality_and_security`, `code_review`, `code_review_and_analysis`, `data_and_automation`, `documentation_and_content`, `feature_development`, `migrations_and_upgrades`, `other`, and 5 more.
- Created after (`created_after`, date and time): Choose a date and time; converted to Unix seconds automatically.
- Created before (`created_before`, date and time): Choose a date and time; converted to Unix seconds automatically.
- First (`first`, number): First. From 1 to 200.
- Is archived (`is_archived`, true/false): Is archived.
- Origins (`origins`, list): Origins. One or more of: `webapp`, `slack`, `teams`, `api`, `linear`, `jira`, `automation`, `cli`, `desktop`, `code_scan`, `other`.
- Parent session ID (`parent_session_id`, text): Filter to child sessions spawned by this parent session
- Playbook (`playbook_id`, text): Playbook id.
- Repo names (`repo_names`, list): Filter by repository names (e.g., 'owner/repo')
- Schedule ID (`schedule_id`, text): Schedule id.
- Service user IDS (`service_user_ids`, list): Service user ids.
- Session IDS (`session_ids`, list): Session ids.
- Tags (`tags`, list): Tags.
- Updated after (`updated_after`, date and time): Choose a date and time; converted to Unix seconds automatically.
- Updated before (`updated_before`, date and time): Choose a date and time; converted to Unix seconds automatically.
- User IDS (`user_ids`, list): User ids.
- Session (`session_id`, text): Session id.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "end_cursor": null,
    "has_next_page": false,
    "items": [],
    "total": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### List sessions with insights

List sessions with detailed insights including message counts, session size classification, and AI-generated analysis. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- After (`after`, text): After.
- Automation IDS (`automation_ids`, list): Filter to sessions created by any of these automations
- Category (`category`, text): Category. One of: `bug_fixing`, `ci_cd_and_devops`, `code_quality_and_security`, `code_review`, `code_review_and_analysis`, `data_and_automation`, `documentation_and_content`, `feature_development`, `migrations_and_upgrades`, `other`, and 5 more.
- Created after (`created_after`, date and time): Choose a date and time; converted to Unix seconds automatically.
- Created before (`created_before`, date and time): Choose a date and time; converted to Unix seconds automatically.
- First (`first`, number): First. From 1 to 200.
- Is archived (`is_archived`, true/false): Is archived.
- Origins (`origins`, list): Origins. One or more of: `webapp`, `slack`, `teams`, `api`, `linear`, `jira`, `automation`, `cli`, `desktop`, `code_scan`, `other`.
- Parent session ID (`parent_session_id`, text): Filter to child sessions spawned by this parent session
- Playbook (`playbook_id`, text): Playbook id.
- Repo names (`repo_names`, list): Filter by repository names (e.g., 'owner/repo')
- Schedule ID (`schedule_id`, text): Schedule id.
- Service user IDS (`service_user_ids`, list): Service user ids.
- Session IDS (`session_ids`, list): Session ids.
- Tags (`tags`, list): Tags.
- Updated after (`updated_after`, date and time): Choose a date and time; converted to Unix seconds automatically.
- Updated before (`updated_before`, date and time): Choose a date and time; converted to Unix seconds automatically.
- User IDS (`user_ids`, list): User ids.
- Session (`session_id`, text): Session id.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "end_cursor": null,
    "has_next_page": false,
    "items": [],
    "total": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Replace session tags

Replace all tags on a session.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)
- Tags (`tags`, list, required): Tags.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "tags": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Send session message

Send a message to an active session. This can consume paid usage.

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)
- Attachment URLS (`attachment_urls`, list): Attachment urls.
- Message (`message`, text, required): Message.
- Message as user ID (`message_as_user_id`, text): Message as user id.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "acus_consumed": 0,
    "automation_id": null,
    "category": null,
    "child_session_ids": null,
    "created_at": 0,
    "devin_mode": null,
    "is_archived": false,
    "on_demand_usage": null,
    "org_id": null,
    "origin": null,
    "parent_session_id": null,
    "playbook_id": null,
    "pull_requests": [],
    "security_profile": null,
    "service_user_id": null,
    "session_id": "example",
    "status": "example",
    "status_detail": null,
    "structured_output": null,
    "subcategory": null,
    "tags": [],
    "title": null,
    "updated_at": 0,
    "url": "example",
    "user_id": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Terminate session

Terminate session

**Inputs**

- Session (`session_id`, text, required): Devin session ID (prefix: devin-)
- Archive (`archive`, true/false): Whether to archive the Devin session

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "acus_consumed": 0,
    "automation_id": null,
    "category": null,
    "child_session_ids": null,
    "created_at": 0,
    "devin_mode": null,
    "is_archived": false,
    "on_demand_usage": null,
    "org_id": null,
    "origin": null,
    "parent_session_id": null,
    "playbook_id": null,
    "pull_requests": [],
    "security_profile": null,
    "service_user_id": null,
    "session_id": "example",
    "status": "example",
    "status_detail": null,
    "structured_output": null,
    "subcategory": null,
    "tags": [],
    "title": null,
    "updated_at": 0,
    "url": "example",
    "user_id": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update knowledge note

Update a note for an organization.

**Inputs**

- Note (`note_id`, text, required): Knowledge note ID (prefix: note-)
- Body (`body`, text, required): Body.
- Folder ID (`folder_id`, text): Folder id.
- Is enabled (`is_enabled`, true/false): Is enabled.
- Name (`name`, text, required): Name.
- Pinned repo (`pinned_repo`, text): Pinned repo.
- Trigger (`trigger`, text, required): Trigger.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "folder_id": null,
    "folder_path": "example",
    "is_enabled": false,
    "macro": null,
    "name": "example",
    "note_id": "example",
    "org_id": null,
    "pinned_repo": null,
    "trigger": "example",
    "updated_at": 0
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update playbook

Update a playbook for an organization.

**Inputs**

- Playbook (`playbook_id`, text, required): Playbook ID (prefix: playbook-)
- Body (`body`, text, required): Body.
- Macro (`macro`, text): Playbook macro identifier. Must start with '!' followed by one or more letters, digits, underscores, or hyphens. Example: '!my_macro' or '!my-macro'
- Structured output schema (`structured_output_schema`, object): JSON Schema (Draft 7) that sessions using this playbook will produce as structured output. Max 64KB. Must be self-contained (no external $ref).
- Title (`title`, text, required): Title.

**Outputs**: Result.

- `data` (object): The complete service response; record and list fields retain their API names.
- `has_more` (true/false): Whether the API reports another page.
- `next_cursor` (text): Pass to the pagination field for the next page, when Has more is true.

**Example output**

```json
{
  "data": {
    "access_type": "example",
    "body": "example",
    "created_at": 0,
    "created_by": "example",
    "macro": null,
    "org_id": null,
    "playbook_id": "example",
    "structured_output_schema": null,
    "title": "example",
    "updated_at": 0,
    "updated_by": "example"
  },
  "has_more": false,
  "next_cursor": null
}
```
