automations create
POST {{baseUrl}}/automations
Creates an Automation
object with the given values.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
is_debug_mode | boolean | Whether to include debug fields (such as log file links) in the response. | |
run_async | boolean | Whether or not third-party updates should be run asynchronously. |
Request Body
[{"name"=>"actions", "value"=>"52ce940b-ecfe-43a6-955f-629f799f7f73", "datatype"=>"string"}, {"name"=>"name", "value"=>"Welcome Email", "datatype"=>"string"}, {"name"=>"trigger_type", "value"=>"RECURRENCE", "datatype"=>"string"}, {"name"=>"start_date", "value"=>"2022-12-23T00:00:00Z", "datatype"=>"string"}, {"name"=>"end_date", "value"=>"2022-12-23T00:00:00Z", "datatype"=>"string"}, {"name"=>"description", "value"=>"This sends a welcome email to new customers.", "datatype"=>"string"}, {"name"=>"status", "value"=>"Published", "datatype"=>"string"}, {"name"=>"automation_trigger", "value"=>"[object Object]", "datatype"=>"string"}, {"name"=>"integration_params", "value"=>"[object Object]", "datatype"=>"string"}, {"name"=>"linked_account_params", "value"=>"[object Object]", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Account-Token | string | (Required) Token identifying the end user. | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"errors":[{"detail":"custom_fields is a required field on model.","problem_type":"MISSING_REQUIRED_FIELD","title":"Missing Required Field","source":{"pointer":"ad veniam"}},{"detail":"custom_fields is a required field on model.","problem_type":"MISSING_REQUIRED_FIELD","title":"Missing Required Field","source":{"pointer":"cillum"}}],"model":{"actions":["52ce940b-ecfe-43a6-955f-629f799f7f73"],"name":"Welcome Email","trigger_type":"RECURRENCE","start_date":"2022-12-23T00:00:00Z","end_date":"2022-12-23T00:00:00Z","description":"This sends a welcome email to new customers.","status":"Published","automation_trigger":{"recurrence_schedule":{"days":["Sunday"],"hours":{"type":"send_asap"}},"trigger_settings":{"trigger_event":"NEW_CUSTOMER"}},"id":"urn:uuid:ebf527cc-1a4b-ffe6-cc08-7d01d904d4cb","remote_id":"12"},"warnings":[{"detail":"An unrecognized field, age, was passed in with request data.","problem_type":"UNRECOGNIZED_FIELD","title":"Unrecognized Field","source":{"pointer":"Duis in dolore"}},{"detail":"An unrecognized field, age, was passed in with request data.","problem_type":"UNRECOGNIZED_FIELD","title":"Unrecognized Field","source":{"pointer":"sunt"}}],"logs":[{"dashboard_view":"https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_id":"99433219-8017-4acd-bb3c-ceb23d663832","log_summary":{"method":"POST","status_code":200,"url":"https://harvest.greenhouse.io/v1/candidates/"}},{"dashboard_view":"https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_id":"99433219-8017-4acd-bb3c-ceb23d663832","log_summary":{"method":"POST","status_code":200,"url":"https://harvest.greenhouse.io/v1/candidates/"}}]}