Mergent
Search
⌃K
Links

Ruby

Creating a Task

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