Mergent
Search…
Ruby

Creating a Task

1
Mergent.api_key = "..." # Only needs to be set once when your app starts, e.g. in an initializer
2
3
params = {
4
request: {
5
headers: { "Authorization": "Bearer ..." }, # Optional
6
url: "https://example.com/webhook",
7
body: "..." # Optional
8
},
9
scheduled_for: "2021-10-01T15:53:05Z", # Optional: Set an exact time (ISO 8601), OR
10
delay: "PT5M" # Optional: Set a 5 minute delay (ISO 8601 Duration)
11
}
12
Mergent::Task.create(params)
Copied!
For a list of all of the available parameters, please visit the API reference.
Copy link