{"openapi":"3.1.0","info":{"title":"Automation Workflow API","version":"1.0.0","description":"\nThis API allows clients to manage automation-workflow rules.\n\nServers:\n\n1. Local Development:\n - Base URL: http://localhost:8080/{endpoint}\n\n2. Stage or Production:\n - Base URL: https://automation-workflow-service.bynder.com/api/1/automation-workflow/{endpoint}\n\nEnsure you're using the correct server depending on the environment you're working in (local or production).\n "},"servers":[{"url":"https://example.com/api/1/automation-workflow/"}],"paths":{"/rules":{"get":{"tags":["Automation Workflow Rules"],"summary":"Fetches all automation workflow rules.","description":"Fetches all automation workflow rules within an account in descending order of creation, with optional pagination (start and limit).","operationId":"getRules","parameters":[{"name":"start","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAutomationWorkflowRulesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}}},"security":[{},{"httpAuth":[]}]},"post":{"tags":["Automation Workflow Rules"],"summary":"Creates a new automation workflow rule.","description":"\nCreates a new automation workflow rule. Ensure that you check the available triggers, conditions, and actions to use valid options.\n\nUse the following endpoints to check which options are available before creating a rule:\n- `/triggers` – lists available triggers\n- `/conditions` – lists available conditions\n- `/actions` – lists available actions\n ","operationId":"postRules","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationWorkflowRuleBody"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationWorkflowRuleResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}}},"security":[{},{"httpAuth":[]}]}},"/rules/{ruleId}":{"get":{"tags":["Automation Workflow Rules"],"summary":"Fetches a specific automation workflow rule.","description":"Fetches a specific automation workflow rule.","operationId":"getRulesRuleid","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleRuleAutomationWorkflowResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseNotFound"}}}}},"security":[{},{"httpAuth":[]}]},"put":{"tags":["Automation Workflow Rules"],"summary":"Updates an existing automation workflow rule.","description":"Updates an existing automation workflow rule.","operationId":"putRulesRuleid","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditAutomationWorkflowRuleBody"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleRuleAutomationWorkflowResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseNotFound"}}}}},"security":[{},{"httpAuth":[]}]},"delete":{"tags":["Automation Workflow Rules"],"summary":"Deletes an automation workflow rule.","description":"Deletes an automation workflow rule by its ID.","operationId":"deleteRulesRuleid","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseNotFound"}}}}},"security":[{},{"httpAuth":[]}]}},"/triggers":{"get":{"tags":["Automation Workflow Triggers"],"summary":"Fetches a list of available automation workflow triggers.","description":"\nFetches a list of available automation workflow triggers.\n\nNote: The `RelativeDate` trigger must be used with the `Archived` condition.\n","operationId":"getTriggers","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationWorkflowTriggersResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}}},"security":[{},{"httpAuth":[]}]}},"/conditions":{"get":{"tags":["Automation Workflow Conditions"],"summary":"Fetches a list of available automation workflow conditions.","description":"\nFetches a list of available automation workflow conditions.\n\nSome conditions accept only specific predefined terms, which are included in the response for reference.\n\nNote: The `Archived` condition requires the `RelativeDate` trigger.\n ","operationId":"getConditions","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationWorkflowConditionsResponse"},"example":{"conditions":[{"name":"AssetType","operators":["CONTAINS","DOES_NOT_CONTAIN"],"terms":[{"asset_type":"IMAGE"},{"asset_type":"VIDEO"},{"asset_type":"DOCUMENT"},{"asset_type":"AUDIO"},{"asset_type":"3D"}]},{"name":"MetapropertyOption","operators":["CONTAINS","DOES_NOT_CONTAIN"],"terms":[{"metaproperty_id":"00000000-0000-0000-0000-000000000000","metaproperty_option_id":"00000000-0000-0000-0000-000000000000"}]},{"name":"Archived","operators":["STARTS_IN"],"terms":[{"offset_amount":1,"offset_unit":"DAY"},{"offset_amount":2,"offset_unit":"WEEKS"},{"offset_amount":3,"offset_unit":"MONTHS"}]}],"max_conditions_count":5}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}}},"security":[{},{"httpAuth":[]}]}},"/actions":{"get":{"tags":["Automation Workflow Actions"],"summary":"Fetches a list of available automation workflow actions.","description":"\nFetches a list of available automation workflow actions.\n\nNote: Only actions that the authenticated user has permission to use are included in the response.\nFor example, actions requiring specific features or roles may be omitted if the user lacks access.\n ","operationId":"getActions","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationWorkflowActionsResponse"},"example":{"actions":[{"action_type":"AGENT_ENRICHMENT"},{"action_type":"ADD_TO_COLLECTION"},{"action_type":"AGENT_TRANSFORMATION"},{"action_type":"AGENT_BRAND_COMPLIANCE"},{"action_type":"AGENT_GOVERNANCE"}],"max_actions_limit":5}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}}},"security":[{},{"httpAuth":[]}]}},"/rules/{ruleId}/status":{"patch":{"tags":["Automation Workflow Rules"],"summary":"Updates the status of an existing automation workflow rule.","description":"Updates the status of an existing automation workflow rule. The status must be one of the following: `PUBLISHED` or `PAUSED`.","operationId":"patchRulesRuleidStatus","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatusAutomationWorkflowRuleBody"}}},"required":true},"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorAuthorizationResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseNotFound"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseRuleAlreadyPaused"}}}}},"security":[{},{"httpAuth":[]}]}}},"components":{"schemas":{"AndCondition":{"title":"AndCondition","type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/LeafCondition"}}}},"ArchiveTerm":{"title":"ArchiveTerm","type":"object","required":["offset_amount","offset_unit"],"properties":{"offset_amount":{"type":"integer","format":"int32"},"offset_unit":{"type":"string"}}},"AssetTypeTerm":{"title":"AssetTypeTerm","type":"object","required":["asset_type"],"properties":{"asset_type":{"type":"string"}}},"AutomationWorkflowAction":{"title":"AutomationWorkflowAction","type":"object","required":["action_type"],"properties":{"action_type":{"type":"string"}}},"AutomationWorkflowActionsResponse":{"title":"AutomationWorkflowActionsResponse","type":"object","required":["max_actions_limit"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowAction"}},"max_actions_limit":{"type":"integer","format":"int32"}}},"AutomationWorkflowCondition":{"title":"AutomationWorkflowCondition","type":"object","required":["name","weight"],"properties":{"name":{"type":"string"},"weight":{"type":"integer","format":"int32"},"operators":{"type":"array","items":{"type":"string"}},"terms":{"type":"array","items":{"$ref":"#/components/schemas/Term"}}}},"AutomationWorkflowConditionsResponse":{"title":"AutomationWorkflowConditionsResponse","type":"object","required":["max_conditions_count"],"properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowCondition"}},"max_conditions_count":{"type":"integer","format":"int32"}}},"AutomationWorkflowResponse":{"title":"AutomationWorkflowResponse","type":"object","required":["id","status","name","created_by_id","date_created"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"name":{"type":"string"},"created_by_id":{"type":"string"},"date_created":{"type":"string"},"triggers":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowStep"}}}},"AutomationWorkflowRuleBody":{"title":"AutomationWorkflowRuleBody","type":"object","required":["name"],"properties":{"name":{"type":"string"},"triggers":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowStep"}}}},"AutomationWorkflowStep":{"title":"AutomationWorkflowStep","type":"object","properties":{"step_triggers":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowStepActionBase"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AndCondition"}}}},"AutomationWorkflowStepActionAgent":{"title":"AutomationWorkflowStepActionAgent","type":"object","required":["action_type","data"],"properties":{"action_type":{"type":"string"},"data":{"$ref":"#/components/schemas/StepActionAgentData"}}},"AutomationWorkflowStepActionBase":{"title":"AutomationWorkflowStepActionBase","oneOf":[{"$ref":"#/components/schemas/AutomationWorkflowStepActionAgent"},{"$ref":"#/components/schemas/AutomationWorkflowStepAddToCollectionAction"}]},"AutomationWorkflowStepAddToCollectionAction":{"title":"AutomationWorkflowStepAddToCollectionAction","type":"object","required":["action_type","data"],"properties":{"action_type":{"type":"string"},"data":{"$ref":"#/components/schemas/StepAddToCollectionActionData"}}},"AutomationWorkflowTrigger":{"title":"AutomationWorkflowTrigger","type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"AutomationWorkflowTriggersResponse":{"title":"AutomationWorkflowTriggersResponse","type":"object","properties":{"triggers":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowTrigger"}}}},"CreateAutomationWorkflowRuleResponse":{"title":"CreateAutomationWorkflowRuleResponse","type":"object","required":["id","status","name","account_id","created_by_id","date_created","date_modified"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"name":{"type":"string"},"account_id":{"type":"string"},"created_by_id":{"type":"string"},"edited_by_id":{"type":"string"},"date_created":{"type":"string"},"date_modified":{"type":"string"}}},"EditAutomationWorkflowRuleBody":{"title":"EditAutomationWorkflowRuleBody","type":"object","properties":{"name":{"type":"string"},"triggers":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowStep"}}}},"ErrorAuthorizationResponse":{"title":"ErrorAuthorizationResponse","type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"title":"ErrorResponse","type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponseNotFound":{"title":"ErrorResponseNotFound","type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponseRuleAlreadyPaused":{"title":"ErrorResponseRuleAlreadyPaused","type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"ExpressionCondition":{"title":"ExpressionCondition","type":"object","required":["operator"],"properties":{"term":{"type":"array","items":{"$ref":"#/components/schemas/Term"}},"operator":{"type":"string"}}},"LeafCondition":{"title":"LeafCondition","type":"object","required":["condition_type","expression"],"properties":{"condition_type":{"type":"string"},"expression":{"$ref":"#/components/schemas/ExpressionCondition"}}},"ListAutomationWorkflowRulesResponse":{"title":"ListAutomationWorkflowRulesResponse","type":"object","required":["metadata"],"properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowResponse"}},"metadata":{"$ref":"#/components/schemas/MetadataOutput"}}},"MetadataOutput":{"title":"MetadataOutput","type":"object","properties":{"previous_page":{"type":"string"},"next_page":{"type":"string"}}},"MetapropertyOptionTerm":{"title":"MetapropertyOptionTerm","type":"object","required":["metaproperty_id"],"properties":{"metaproperty_id":{"type":"string","format":"uuid"},"metaproperty_option_id":{"type":"string","format":"uuid"}}},"SingleRuleAutomationWorkflowResponse":{"title":"SingleRuleAutomationWorkflowResponse","type":"object","required":["id","status","name","date_created","created_by_id","date_modified"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"name":{"type":"string"},"date_created":{"type":"string"},"created_by_id":{"type":"string"},"date_modified":{"type":"string"},"edited_by_id":{"type":"string"},"date_removed":{"type":"string"},"triggers":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/AutomationWorkflowStep"}}}},"StepActionAgentData":{"title":"StepActionAgentData","type":"object","required":["agent_id"],"properties":{"agent_id":{"type":"string"}}},"StepAddToCollectionActionData":{"title":"StepAddToCollectionActionData","type":"object","required":["collection_id"],"properties":{"collection_id":{"type":"string"}}},"Term":{"title":"Term","oneOf":[{"$ref":"#/components/schemas/ArchiveTerm"},{"$ref":"#/components/schemas/AssetTypeTerm"},{"$ref":"#/components/schemas/MetapropertyOptionTerm"}]},"UpdateStatusAutomationWorkflowRuleBody":{"title":"UpdateStatusAutomationWorkflowRuleBody","type":"object","required":["status"],"properties":{"status":{"type":"string"}}}},"securitySchemes":{"httpAuth":{"type":"http","scheme":"bearer"}}}}