# Automation2

## GET /api/automation2/automations

> Returns a filtered list of automations. When 'include\_subfolders' is set to true, it returns a paginated list of automations in a specified folder and its subfolders.

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"security":[{"businessId":[],"userId":[],"apiKey":[]}],"components":{"securitySchemes":{"businessId":{"type":"apiKey","in":"header","name":"X-BUSINESS-ID"}},"schemas":{"PaginatedListAutomationList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ListAutomation"}},"errors":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"ListAutomation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","maxLength":200},"api_name":{"type":"string"},"created":{"type":"string","format":"date-time","readOnly":true},"active":{"type":"boolean"},"type":{"$ref":"#/components/schemas/ListAutomationTypeEnum"},"revision":{"type":"integer","maximum":2147483647,"minimum":0},"number_active":{"type":"integer","readOnly":true},"number_paused":{"type":"integer","readOnly":true},"number_completed":{"type":"integer","readOnly":true},"custom_object":{"allOf":[{"$ref":"#/components/schemas/EmbedCustomObject"}],"readOnly":true},"folder":{"$ref":"#/components/schemas/EmbedDrfAutomationFolder"},"created_by":{"allOf":[{"$ref":"#/components/schemas/BaseEmployee"}],"readOnly":true},"updated_by":{"allOf":[{"$ref":"#/components/schemas/BaseEmployee"}],"readOnly":true},"user_description":{"type":"string","maxLength":500},"ai_description":{"type":"string","nullable":true}},"required":["api_name","created","created_by","custom_object","folder","id","name","number_active","number_completed","number_paused","updated_by"]},"ListAutomationTypeEnum":{"enum":["record_based","global"],"type":"string","description":"* `record_based` - Record Based\n* `global` - Global"},"EmbedCustomObject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"entity_name":{"type":"string","nullable":true,"maxLength":200},"object_name":{"type":"string","nullable":true,"maxLength":200},"object_class":{"type":"string","readOnly":true},"object_type":{"$ref":"#/components/schemas/ObjectTypeEnum"},"default_on_activities":{"type":"boolean"},"deleted":{"type":"boolean"}},"required":["id","name","object_class"]},"ObjectTypeEnum":{"enum":["pipeline","standard"],"type":"string","description":"* `pipeline` - pipeline\n* `standard` - standard"},"EmbedDrfAutomationFolder":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"}},"required":["id","name"]},"BaseEmployee":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"display_name":{"type":"string","readOnly":true}},"required":["display_name","id"]}}},"paths":{"/api/automation2/automations":{"get":{"operationId":"automation2_automations_list","description":"Returns a filtered list of automations. When 'include_subfolders' is set to true, it returns a paginated list of automations in a specified folder and its subfolders.","parameters":[{"in":"query","name":"active","schema":{"type":"boolean"}},{"in":"query","name":"custom_object_id","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"custom_object_name","schema":{"type":"string"}},{"in":"query","name":"folder_id","schema":{"type":"string","format":"uuid"},"description":"Filters automations by folder_id. Will be set to root when include_subfolder is toggled on."},{"in":"query","name":"include_empty_folders","schema":{"type":"boolean","default":false},"description":"Displays folders without matching automations, by default they are hidden"},{"in":"query","name":"include_subfolders","schema":{"type":"boolean","default":false},"description":"Returns folder structure instead of a list. If folder_id query parameter is not set, root folder will be used by default."},{"in":"query","name":"ordering","schema":{"type":"string","enum":["created","custom_object_entity_name","custom_object_name","name","number_active","number_completed","number_paused","status","type"]},"description":"Which field to use when ordering the results. Prepend with '-' for descending order."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["automation2"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedListAutomationList"}}},"description":""}}}}}}
```

## POST /api/automation2/automations/{automation\_identifier}/start

> Start automation

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"security":[{"businessId":[],"userId":[],"apiKey":[]}],"components":{"securitySchemes":{"businessId":{"type":"apiKey","in":"header","name":"X-BUSINESS-ID"}},"schemas":{"StartAutomationRequest":{"type":"object","properties":{"client_id":{"type":"string","format":"uuid"},"record_id":{"type":"string","format":"uuid"},"variable_overrides":{"type":"array","items":{"$ref":"#/components/schemas/VariableOverrideRequest"}}}},"VariableOverrideRequest":{"type":"object","properties":{"variable_name":{"type":"string","minLength":1},"value":{"type":"string","nullable":true}},"required":["value","variable_name"]},"StartAutomationResponse":{"type":"object","properties":{"execution":{"allOf":[{"$ref":"#/components/schemas/LightReadAutomationExecution"}],"nullable":true}},"required":["execution"]},"LightReadAutomationExecution":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"automation_id":{"type":"string","format":"uuid"},"client_id":{"type":"string","format":"uuid","nullable":true},"record_id":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string"},"trigger_history_id":{"type":"string","format":"uuid","nullable":true},"debug_mode":{"type":"string"}},"required":["automation_id","client_id","debug_mode","id","record_id","status","trigger_history_id"]}}},"paths":{"/api/automation2/automations/{automation_identifier}/start":{"post":{"operationId":"automation2_automations_start_create","description":"Start automation","parameters":[{"in":"path","name":"automation_identifier","schema":{"type":"string"},"required":true},{"in":"query","name":"ordering","schema":{"type":"string","enum":["created","custom_object_entity_name","custom_object_name","name","number_active","number_completed","number_paused","status","type"]},"description":"Which field to use when ordering the results. Prepend with '-' for descending order."}],"tags":["automation2"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAutomationRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAutomationResponse"}}},"description":""}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.kizen.com/api/automation2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
