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
tidstringWebhook unique identifier

Headers

HeaderRequiredDescription
TokenYour API key
AuthorizationBearer <jwt-token>

Body Parameters

ParameterTypeRequiredDescription
namestringNew name
messagestringNew message template
is_activebooleanEnable/Disable webhook
application_idstringNew application TID
device_idstringNew 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

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

Pocket Alert Documentation