Skip to content

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:

  • Token: <your-api-key> — Get it from API Keys
  • Authorization: Bearer <jwt-token> — From Login

Request ​

Path Parameters ​

ParameterTypeRequiredDescription
tidstring✅Webhook unique identifier

Headers ​

HeaderRequiredDescription
Token✅Your API key
Authorization✅Bearer <jwt-token>

Body Parameters ​

ParameterTypeRequiredDescription
namestring❌New name
messagestring❌New message template
is_activeboolean❌Enable/Disable webhook
application_idstring❌New application TID
device_idstring❌New device TID

Disabling a webhook

A webhook with is_active: false still accepts incoming requests and answers 200, but no alert is created. Those calls are recorded in Webhook History with error_code: inactive.

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 ​

StatusDescription
401Unauthorized — Invalid or missing token
404Not Found — Webhook does not exist

Pocket Alert Documentation