When you create a new webhook in our application, you will be provided with a unique URL. This URL is designed to accept HTTP POST requests. The data you send to this URL must be in JSON format.
Below are examples of how you can send data to a webhook using JavaScript and cURL.
const webhook_url = "https://api.observely.app/webhook/r/uuid/token";
const data = {
name: "John Doe",
contact: "johndoe@observely.app",
message: "Hello, world!"
};
fetch(webhook_url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => {
console.error('Error:', error);
});
curl -X POST https://api.observely.app/webhook/r/uuid/token \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"contact": "johndoe@observely.app",
"message": "Hello, world!"
}'
<div class="text-gray-700 text-base">
<p>Name: </p>
<p>Contact: </p>
<p>Message: </p>
</div>