Getting Started
Last updated
Was this helpful?
Last updated
Was this helpful?
Welcome to the HostedHooks Tasks feature! This guide will walk you through creating and managing tasks via our API. These tasks are designed to handle background jobs efficiently, allowing you to schedule and process crucial operations for your application.
An active account on HostedHooks.
API Key for authentication ().
Basic knowledge of API requests (e.g., using curl
).
event_type: A string to label your task. Must match your webhook endpoints in the dashboard.
scheduled_run_time: An optional ISO8601 timestamp to schedule tasks. Leave blank for immediate execution.
data: A JSON blob containing data for your task. This data is sent back to your application upon task completion. For example this could be the first name and email of a user that you need to send an email to.
Ensure you have curl
installed, or use any API client of your choice.
Have your HostedHooks API key at hand for authorization.
Construct your API request:
URL: POST https://hostedhooks.com/api/v1/apps/:app_uuid/tasks
The app_uuid is the ID of an app within your HostedHooks instance.
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Data: A JSON object with event_type
(required), scheduled_run_time
(optional), and data (required)
.
Use the following curl
command template:
Replace YOUR_API_KEY
, your.event.type
, YOUR_SCHEDULED_TIME
, and the JSON payload data
with your specific details.
Upon successful task creation, the API returns a JSON response with details like task ID, event type, status, and more.
Example response:
Check the status of your tasks in the HostedHooks dashboard or via the API
Use the task ID from the response for any troubleshooting or support requests.
Ensure your event_type
matches exactly with what's configured in your dashboard.
For scheduled tasks, verify the timezone and format of your scheduled_run_time
.
You're now ready to integrate HostedHooks Tasks into your application. For any additional questions or feedback, please reach out to our support team.