# Playbooks

## Gets all playbooks for the current user in the organization.

> Retrieves a paginated list of all playbooks for the current user in the organization, with optional search and sorting.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Sorting.ItemSorting":{"enum":[0],"type":"integer","format":"int32"},"PaginationListModel.PlaybookReadModel":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"},"nullable":true},"totalCount":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.PlaybookMarketplace.Models.PlaybookReadModel":{"required":["dateAdded","description","isPrivate","name","objectIdentifier","organizationWide","resourceOwner"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"organizationWide":{"type":"boolean"},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.MultiTypeInputWriteModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"hasImage":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.MultiTypeInputWriteModel":{"type":"object","properties":{"isYes":{"type":"boolean","nullable":true},"decimalValue":{"type":"number","format":"double","nullable":true},"text":{"type":"string","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"singleCategoryIdentifier":{"type":"string","format":"uuid","nullable":true},"categories":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"organizationMetadataIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/playbooks":{"get":{"tags":["Playbooks"],"summary":"Gets all playbooks for the current user in the organization.","description":"Retrieves a paginated list of all playbooks for the current user in the organization, with optional search and sorting.","parameters":[{"name":"pageNumber","in":"query","description":"The page number for paginated results.","schema":{"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"The number of items per page.","schema":{"type":"integer","format":"int32"}},{"name":"searchText","in":"query","description":"Optional search text to filter results.","schema":{"type":"string"}},{"name":"sorting","in":"query","description":"The sorting option for the results.","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","description":"Whether to sort in descending order.","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginationListModel.PlaybookReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.PlaybookReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.PlaybookReadModel"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Creates a new playbook in the organization.

> Creates a new playbook in the organization.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.PlaybookMarketplace.Models.PlaybookWriteModel":{"required":["description","isPrivate","name","organizationWide"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"organizationWide":{"type":"boolean"},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.MultiTypeInputWriteModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.MultiTypeInputWriteModel":{"type":"object","properties":{"isYes":{"type":"boolean","nullable":true},"decimalValue":{"type":"number","format":"double","nullable":true},"text":{"type":"string","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"singleCategoryIdentifier":{"type":"string","format":"uuid","nullable":true},"categories":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"organizationMetadataIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.PlaybookMarketplace.Models.PlaybookReadModel":{"required":["dateAdded","description","isPrivate","name","objectIdentifier","organizationWide","resourceOwner"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"organizationWide":{"type":"boolean"},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.MultiTypeInputWriteModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"hasImage":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/playbooks":{"post":{"tags":["Playbooks"],"summary":"Creates a new playbook in the organization.","description":"Creates a new playbook in the organization.","requestBody":{"description":"The playbook data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookWriteModel"}}}},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Imports a playbook from a ZIP file.

> Imports a playbook into the organization from a ZIP file.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.PlaybookMarketplace.Models.PlaybookReadModel":{"required":["dateAdded","description","isPrivate","name","objectIdentifier","organizationWide","resourceOwner"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"organizationWide":{"type":"boolean"},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.MultiTypeInputWriteModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"hasImage":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.MultiTypeInputWriteModel":{"type":"object","properties":{"isYes":{"type":"boolean","nullable":true},"decimalValue":{"type":"number","format":"double","nullable":true},"text":{"type":"string","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"singleCategoryIdentifier":{"type":"string","format":"uuid","nullable":true},"categories":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"organizationMetadataIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/playbooks/import":{"post":{"tags":["Playbooks"],"summary":"Imports a playbook from a ZIP file.","description":"Imports a playbook into the organization from a ZIP file.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"importZip":{"type":"string","description":"The ZIP file containing the playbook to import.","format":"binary"}}},"encoding":{"importZip":{"style":"form"}}}}},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Gets all playbooks for the organization.

> Retrieves a paginated list of all playbooks for the organization, with optional search and sorting.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Sorting.ItemSorting":{"enum":[0],"type":"integer","format":"int32"},"PaginationListModel.PlaybookReadModel":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.PlaybookReadModel"},"nullable":true},"totalCount":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.PlaybookMarketplace.Models.PlaybookReadModel":{"required":["dateAdded","description","isPrivate","name","objectIdentifier","organizationWide","resourceOwner"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"organizationWide":{"type":"boolean"},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.MultiTypeInputWriteModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"hasImage":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.MultiTypeInputWriteModel":{"type":"object","properties":{"isYes":{"type":"boolean","nullable":true},"decimalValue":{"type":"number","format":"double","nullable":true},"text":{"type":"string","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"singleCategoryIdentifier":{"type":"string","format":"uuid","nullable":true},"categories":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"organizationMetadataIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/playbooks/all":{"get":{"tags":["Playbooks"],"summary":"Gets all playbooks for the organization.","description":"Retrieves a paginated list of all playbooks for the organization, with optional search and sorting.","parameters":[{"name":"pageNumber","in":"query","description":"The page number for paginated results.","schema":{"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"The number of items per page.","schema":{"type":"integer","format":"int32"}},{"name":"searchText","in":"query","description":"Optional search text to filter results.","schema":{"type":"string"}},{"name":"sorting","in":"query","description":"The sorting option for the results.","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","description":"Whether to sort in descending order.","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginationListModel.PlaybookReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.PlaybookReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.PlaybookReadModel"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```
