> For the complete documentation index, see [llms.txt](https://docs.dropzone.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dropzone.ai/api/response-actions.md).

# Response Actions

## GET /app/api/v1/response-actions

> List all response actions

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptSerializerForUI":{"type":"object","description":"`run_count` and `last_run_at` read from queryset annotations applied by\n`list_response_scripts`; unannotated callers degrade to 0 / None.","properties":{"id":{"type":"integer","readOnly":true},"trigger_def":{"$ref":"#/components/schemas/ResponseTriggerDef"},"run_count":{"type":"integer","readOnly":true},"last_run_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"display_name":{"type":"string"},"is_enabled":{"type":"boolean"},"is_archived":{"type":"boolean"},"is_imported":{"type":"boolean"}},"required":["created_at","display_name","id","last_run_at","run_count","trigger_def","updated_at"]},"ResponseTriggerDef":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"trigger_tree_labels":{"type":"array","items":{"type":"string"}},"trigger_display_name":{"type":"string"},"trigger_fn_name":{"type":"string"},"trigger_arg_names":{"type":"array","items":{"type":"string"}},"required_arg_names":{"type":"array","items":{"type":"string"}},"script_var_names":{"type":"array","items":{"type":"string"}},"is_scriptable":{"type":"boolean"},"is_runnable":{"type":"boolean"},"display_index":{"type":"integer","maximum":2147483647,"minimum":-2147483648},"is_archived":{"type":"boolean"},"parent":{"type":"string","format":"uuid","nullable":true}},"required":["created_at","trigger_display_name","trigger_fn_name","updated_at","uuid"]}}},"paths":{"/app/api/v1/response-actions":{"get":{"operationId":"response_actions_list_external","description":"List all response actions","parameters":[{"in":"query","name":"is_archived","schema":{"type":"boolean"},"description":"Filter by archived status (default: false)"}],"tags":["response-actions"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponseScriptSerializerForUI"}}}},"description":"List of response actions"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## POST /app/api/v1/response-actions

> Create a new response action

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptSerializerForUI":{"type":"object","description":"`run_count` and `last_run_at` read from queryset annotations applied by\n`list_response_scripts`; unannotated callers degrade to 0 / None.","properties":{"id":{"type":"integer","readOnly":true},"trigger_def":{"$ref":"#/components/schemas/ResponseTriggerDef"},"run_count":{"type":"integer","readOnly":true},"last_run_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"display_name":{"type":"string"},"is_enabled":{"type":"boolean"},"is_archived":{"type":"boolean"},"is_imported":{"type":"boolean"}},"required":["created_at","display_name","id","last_run_at","run_count","trigger_def","updated_at"]},"ResponseTriggerDef":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"trigger_tree_labels":{"type":"array","items":{"type":"string"}},"trigger_display_name":{"type":"string"},"trigger_fn_name":{"type":"string"},"trigger_arg_names":{"type":"array","items":{"type":"string"}},"required_arg_names":{"type":"array","items":{"type":"string"}},"script_var_names":{"type":"array","items":{"type":"string"}},"is_scriptable":{"type":"boolean"},"is_runnable":{"type":"boolean"},"display_index":{"type":"integer","maximum":2147483647,"minimum":-2147483648},"is_archived":{"type":"boolean"},"parent":{"type":"string","format":"uuid","nullable":true}},"required":["created_at","trigger_display_name","trigger_fn_name","updated_at","uuid"]}}},"paths":{"/app/api/v1/response-actions":{"post":{"operationId":"response_actions_create_external","description":"Create a new response action","tags":["response-actions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"trigger_def_uuid":{"type":"string","format":"uuid"},"code":{"type":"string"}},"required":["display_name","trigger_def_uuid"]}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScriptSerializerForUI"}}},"description":"Response action created successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request - invalid input"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## GET /app/api/v1/response-actions/{script\_id}

> Get response action details with version and run counts

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/app/api/v1/response-actions/{script_id}":{"get":{"operationId":"response_action_retrieve_external","description":"Get response action details with version and run counts","parameters":[{"in":"path","name":"script_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"object","properties":{"version":{"type":"integer"},"run":{"type":"integer"}}},"latest":{"type":"object","properties":{"version":{"type":"object"},"run":{"type":"object"}}}}}}},"description":"Response action details with counts and latest version/run"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## DELETE /app/api/v1/response-actions/{script\_id}

> Archive (soft delete) a response action. Deletes unreferenced versions.

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/app/api/v1/response-actions/{script_id}":{"delete":{"operationId":"response_action_destroy_external","description":"Archive (soft delete) a response action. Deletes unreferenced versions.","parameters":[{"in":"path","name":"script_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"responses":{"204":{"description":"Response action archived successfully"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## PATCH /app/api/v1/response-actions/{script\_id}

> Update response action properties

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/app/api/v1/response-actions/{script_id}":{"patch":{"operationId":"response_action_update_external","description":"Update response action properties","parameters":[{"in":"path","name":"script_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"trigger_def_uuid":{"type":"string","format":"uuid"},"is_enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response action updated successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request or cannot update archived action"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## GET /app/api/v1/response-actions/{script\_id}/runs

> List all runs for a response action

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptRunSerializerForUI":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"trigger_run":{"$ref":"#/components/schemas/ResponseTriggerRunSerializerForUI"},"script":{"$ref":"#/components/schemas/ResponseScript"},"script_version":{"$ref":"#/components/schemas/ResponseScriptVersionSerializerForUI"},"status":{"$ref":"#/components/schemas/ResponseScriptRunSerializerForUIStatusEnum"},"stdout":{"type":"string","nullable":true},"stderr":{"type":"string","nullable":true},"syserr":{"type":"string","nullable":true}},"required":["created_at","id","script","script_version","status","trigger_run","updated_at"]},"ResponseTriggerRunSerializerForUI":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"trigger_def":{"$ref":"#/components/schemas/ResponseTriggerDef"},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"trigger_args":{},"batch":{"type":"integer","nullable":true}},"required":["created_at","id","trigger_def","updated_at"]},"ResponseTriggerDef":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"trigger_tree_labels":{"type":"array","items":{"type":"string"}},"trigger_display_name":{"type":"string"},"trigger_fn_name":{"type":"string"},"trigger_arg_names":{"type":"array","items":{"type":"string"}},"required_arg_names":{"type":"array","items":{"type":"string"}},"script_var_names":{"type":"array","items":{"type":"string"}},"is_scriptable":{"type":"boolean"},"is_runnable":{"type":"boolean"},"display_index":{"type":"integer","maximum":2147483647,"minimum":-2147483648},"is_archived":{"type":"boolean"},"parent":{"type":"string","format":"uuid","nullable":true}},"required":["created_at","trigger_display_name","trigger_fn_name","updated_at","uuid"]},"ResponseScript":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"display_name":{"type":"string"},"is_enabled":{"type":"boolean"},"is_archived":{"type":"boolean"},"is_imported":{"type":"boolean"},"trigger_def":{"type":"string","format":"uuid"}},"required":["created_at","display_name","id","trigger_def","updated_at"]},"ResponseScriptVersionSerializerForUI":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"author":{"$ref":"#/components/schemas/CustomUser"},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"v_num":{"type":"integer","maximum":2147483647,"minimum":-2147483648},"code":{"type":"string"},"operation_name":{"type":"string","nullable":true,"description":"Decorated action operation slug"},"operation_display_name":{"type":"string","nullable":true,"description":"Decorated action display name"},"input_schema":{"nullable":true,"description":"JSON Schema for decorated action input"},"output_schema":{"nullable":true,"description":"JSON Schema for decorated action output"},"supports_undo":{"type":"boolean","description":"Whether this operation version declares undo"},"ai_description":{"type":"string","nullable":true,"description":"Optional LLM-facing operation description"},"script":{"type":"integer"}},"required":["author","created_at","id","script","updated_at","v_num"]},"CustomUser":{"type":"object","description":"Basic serializer to pass CustomUser details to the front end.\nExtend with any fields your app needs.","properties":{"id":{"type":"integer","readOnly":true},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"role":{"$ref":"#/components/schemas/UserRoleEnum"},"oidc_user_id":{"type":"string","nullable":true}},"required":["id","role"]},"UserRoleEnum":{"enum":["admin","member","restricted-read-only"],"type":"string","description":"* `admin` - admin\n* `member` - member\n* `restricted-read-only` - restricted-read-only"},"ResponseScriptRunSerializerForUIStatusEnum":{"enum":["running","success","failed","timed_out","error"],"type":"string","description":"* `running` - Running\n* `success` - Run Success\n* `failed` - Run Failed\n* `timed_out` - Run Timeout\n* `error` - System Error"}}},"paths":{"/app/api/v1/response-actions/{script_id}/runs":{"get":{"operationId":"response_actions_runs_retrieve","description":"List all runs for a response action","parameters":[{"in":"path","name":"script_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponseScriptRunSerializerForUI"}}}},"description":"List of response action runs"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## GET /app/api/v1/response-actions/secrets

> List all response action secrets (metadata only, values are not exposed)

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptSecret":{"type":"object","description":"For UI: masks \"value\" field","properties":{"id":{"type":"integer","readOnly":true},"last_modified_by":{"$ref":"#/components/schemas/CustomUser"},"value":{"type":"string","description":"Given the *incoming* primitive data, return the value for this field\nthat should be validated and transformed to a native value.","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"key":{"type":"string"}},"required":["created_at","id","key","last_modified_by","updated_at","value"]},"CustomUser":{"type":"object","description":"Basic serializer to pass CustomUser details to the front end.\nExtend with any fields your app needs.","properties":{"id":{"type":"integer","readOnly":true},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"role":{"$ref":"#/components/schemas/UserRoleEnum"},"oidc_user_id":{"type":"string","nullable":true}},"required":["id","role"]},"UserRoleEnum":{"enum":["admin","member","restricted-read-only"],"type":"string","description":"* `admin` - admin\n* `member` - member\n* `restricted-read-only` - restricted-read-only"}}},"paths":{"/app/api/v1/response-actions/secrets":{"get":{"operationId":"response_action_secrets_list_external","description":"List all response action secrets (metadata only, values are not exposed)","tags":["response-actions"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponseScriptSecret"}}}},"description":"List of secrets"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## POST /app/api/v1/response-actions/secrets

> Create a new response action secret

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptSecret":{"type":"object","description":"For UI: masks \"value\" field","properties":{"id":{"type":"integer","readOnly":true},"last_modified_by":{"$ref":"#/components/schemas/CustomUser"},"value":{"type":"string","description":"Given the *incoming* primitive data, return the value for this field\nthat should be validated and transformed to a native value.","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"key":{"type":"string"}},"required":["created_at","id","key","last_modified_by","updated_at","value"]},"CustomUser":{"type":"object","description":"Basic serializer to pass CustomUser details to the front end.\nExtend with any fields your app needs.","properties":{"id":{"type":"integer","readOnly":true},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"role":{"$ref":"#/components/schemas/UserRoleEnum"},"oidc_user_id":{"type":"string","nullable":true}},"required":["id","role"]},"UserRoleEnum":{"enum":["admin","member","restricted-read-only"],"type":"string","description":"* `admin` - admin\n* `member` - member\n* `restricted-read-only` - restricted-read-only"}}},"paths":{"/app/api/v1/response-actions/secrets":{"post":{"operationId":"response_action_secrets_create_external","description":"Create a new response action secret","tags":["response-actions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Secret key/name (must be unique)"},"value":{"type":"string","description":"Secret value"}},"required":["key","value"]}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScriptSecret"}}},"description":"Secret created successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request - invalid input"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## GET /app/api/v1/response-actions/secrets/{secret\_id}

> Get a response action secret by ID (metadata only, value is not exposed)

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptSecret":{"type":"object","description":"For UI: masks \"value\" field","properties":{"id":{"type":"integer","readOnly":true},"last_modified_by":{"$ref":"#/components/schemas/CustomUser"},"value":{"type":"string","description":"Given the *incoming* primitive data, return the value for this field\nthat should be validated and transformed to a native value.","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"key":{"type":"string"}},"required":["created_at","id","key","last_modified_by","updated_at","value"]},"CustomUser":{"type":"object","description":"Basic serializer to pass CustomUser details to the front end.\nExtend with any fields your app needs.","properties":{"id":{"type":"integer","readOnly":true},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"role":{"$ref":"#/components/schemas/UserRoleEnum"},"oidc_user_id":{"type":"string","nullable":true}},"required":["id","role"]},"UserRoleEnum":{"enum":["admin","member","restricted-read-only"],"type":"string","description":"* `admin` - admin\n* `member` - member\n* `restricted-read-only` - restricted-read-only"}}},"paths":{"/app/api/v1/response-actions/secrets/{secret_id}":{"get":{"operationId":"response_action_secret_retrieve_external","description":"Get a response action secret by ID (metadata only, value is not exposed)","parameters":[{"in":"path","name":"secret_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScriptSecret"}}},"description":"Secret details"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## DELETE /app/api/v1/response-actions/secrets/{secret\_id}

> Delete a response action secret

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/app/api/v1/response-actions/secrets/{secret_id}":{"delete":{"operationId":"response_action_secret_destroy_external","description":"Delete a response action secret","parameters":[{"in":"path","name":"secret_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"responses":{"204":{"description":"Secret deleted successfully"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## PATCH /app/api/v1/response-actions/secrets/{secret\_id}

> Update a response action secret

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseScriptSecret":{"type":"object","description":"For UI: masks \"value\" field","properties":{"id":{"type":"integer","readOnly":true},"last_modified_by":{"$ref":"#/components/schemas/CustomUser"},"value":{"type":"string","description":"Given the *incoming* primitive data, return the value for this field\nthat should be validated and transformed to a native value.","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"key":{"type":"string"}},"required":["created_at","id","key","last_modified_by","updated_at","value"]},"CustomUser":{"type":"object","description":"Basic serializer to pass CustomUser details to the front end.\nExtend with any fields your app needs.","properties":{"id":{"type":"integer","readOnly":true},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"role":{"$ref":"#/components/schemas/UserRoleEnum"},"oidc_user_id":{"type":"string","nullable":true}},"required":["id","role"]},"UserRoleEnum":{"enum":["admin","member","restricted-read-only"],"type":"string","description":"* `admin` - admin\n* `member` - member\n* `restricted-read-only` - restricted-read-only"}}},"paths":{"/app/api/v1/response-actions/secrets/{secret_id}":{"patch":{"operationId":"response_action_secret_update_external","description":"Update a response action secret","parameters":[{"in":"path","name":"secret_id","schema":{"type":"integer"},"required":true}],"tags":["response-actions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"New secret key/name"},"value":{"type":"string","description":"New secret value"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScriptSecret"}}},"description":"Secret updated successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request - invalid input"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## POST /app/api/v1/response-actions/test

> Execute a test run of a response action script without saving to database. Useful for testing and debugging scripts before deployment.

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/app/api/v1/response-actions/test":{"post":{"operationId":"response_actions_test_create","description":"Execute a test run of a response action script without saving to database. Useful for testing and debugging scripts before deployment.","tags":["response-actions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"script_code":{"type":"string","description":"The Python code to execute"},"trigger_args":{"type":"object","description":"Arguments to pass to the script (depends on trigger type)"}},"required":["script_code","trigger_args"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Execution status"},"stdout":{"type":"string","description":"Standard output from script execution"},"stderr":{"type":"string","description":"Standard error from script execution"}}}}},"description":"Test run completed successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request - invalid input"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"422":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"stdout":{"type":"string"},"stderr":{"type":"string"}}}}},"description":"Script execution failed"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## GET /app/api/v1/response-actions/triggers

> List available response triggers for action creation

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ResponseTriggerDef":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"trigger_tree_labels":{"type":"array","items":{"type":"string"}},"trigger_display_name":{"type":"string"},"trigger_fn_name":{"type":"string"},"trigger_arg_names":{"type":"array","items":{"type":"string"}},"required_arg_names":{"type":"array","items":{"type":"string"}},"script_var_names":{"type":"array","items":{"type":"string"}},"is_scriptable":{"type":"boolean"},"is_runnable":{"type":"boolean"},"display_index":{"type":"integer","maximum":2147483647,"minimum":-2147483648},"is_archived":{"type":"boolean"},"parent":{"type":"string","format":"uuid","nullable":true}},"required":["created_at","trigger_display_name","trigger_fn_name","updated_at","uuid"]}}},"paths":{"/app/api/v1/response-actions/triggers":{"get":{"operationId":"response_actions_triggers_retrieve","description":"List available response triggers for action creation","tags":["response-actions"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponseTriggerDef"}}}},"description":"List of available triggers"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```
