Create Action
POST
/admin/automations/{id}/actions
const url = 'http://localhost:9000/admin/automations/example/actions';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","is_active":true,"action_type":"example","target_url":"example","signing_secret_id":"example","request_method":"example","target_headers":["example"],"medusa_workflow":"example","field_mappings":["example"],"static_values":["example"],"metadata":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:9000/admin/automations/example/actions \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "is_active": true, "action_type": "example", "target_url": "example", "signing_secret_id": "example", "request_method": "example", "target_headers": [ "example" ], "medusa_workflow": "example", "field_mappings": [ "example" ], "static_values": [ "example" ], "metadata": {} }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
description
string
is_active
boolean
action_type
required
string
target_url
string
signing_secret_id
string
request_method
string
target_headers
Array<string>
medusa_workflow
string
field_mappings
Array<string>
static_values
Array<string>
metadata
object
key
additional properties
any
Example generated
{ "name": "example", "description": "example", "is_active": true, "action_type": "example", "target_url": "example", "signing_secret_id": "example", "request_method": "example", "target_headers": [ "example" ], "medusa_workflow": "example", "field_mappings": [ "example" ], "static_values": [ "example" ], "metadata": {}}Responses
Section titled “ Responses ”OK
Media type application/json
object
Example generated
{}