Update Webhook PUT
Update a webhook's name, message template, or activity status.
Endpoint
PUT https://api.pocketalert.app/v1/webhooks/{tid}Authentication
Required
Include one of these headers in your request:
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tid | string | ✅ | Webhook unique identifier |
Headers
| Header | Required | Description |
|---|---|---|
Token | ✅ | Your API key |
Authorization | ✅ | Bearer <jwt-token> |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ❌ | New name |
message | string | ❌ | New message template |
is_active | boolean | ❌ | Enable/Disable webhook |
application_id | string | ❌ | New application TID |
device_id | string | ❌ | New device TID |
Example Request
bash
curl -X PUT "https://api.pocketalert.app/v1/webhooks/kblf7mh9j8jjyeh4fx" \
-H "Token: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub Push (Inactive)",
"is_active": false
}'javascript
const tid = 'kblf7mh9j8jjyeh4fx';
const response = await fetch(`https://api.pocketalert.app/v1/webhooks/${tid}`, {
method: 'PUT',
headers: {
'Token': 'your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'GitHub Push (Inactive)',
is_active: false
})
});python
import requests
tid = 'kblf7mh9j8jjyeh4fx'
response = requests.put(
f'https://api.pocketalert.app/v1/webhooks/{tid}',
headers={'Token': 'your-api-key'},
json={'name': 'GitHub Push (Inactive)', 'is_active': False}
)
print(response.json())php
$tid = 'kblf7mh9j8jjyeh4fx';
$response = Http::withHeaders([
'Token' => 'your-api-key',
])->put('https://api.pocketalert.app/v1/webhooks/'.$tid, [
'name' => 'GitHub Push (Inactive)',
'is_active' => false,
]);
return $response->json();Response
Success Response
200 OK
Webhook updated successfully
json
{
"data": "success"
}Error Responses
| Status | Description |
|---|---|
401 | Unauthorized — Invalid or missing token |
404 | Not Found — Webhook does not exist |
