본문으로 건너뛰기

기기 삭제 DELETE ​

계정에서 기기를 삭제합니다. 이 작업은 되돌릴 수 없습니다.

엔드포인트 ​

DELETE https://api.pocketalert.app/v1/devices/{tid}

인증 ​

필수

요청에 다음 헤더 중 하나를 포함하세요:

  • Token: <your-api-key> — API 키에서 발급받으세요
  • Authorization: Bearer <jwt-token> — 로그인에서 발급받은 값

요청 ​

경로 매개변수 ​

매개변수타입필수설명
tidstring✅기기 고유 식별자

헤더 ​

헤더필수설명
Token✅API 키
Authorization✅Bearer <jwt-token>

요청 예제 ​

bash
curl -X DELETE "https://api.pocketalert.app/v1/devices/9dc24hqldvv2bfx2nlc6r" \
  -H "Token: your-api-key"
javascript
const tid = '9dc24hqldvv2bfx2nlc6r';
await fetch(`https://api.pocketalert.app/v1/devices/${tid}`, {
  method: 'DELETE',
  headers: { 'Token': 'your-api-key' }
});
python
import requests

tid = '9dc24hqldvv2bfx2nlc6r'
response = requests.delete(
    f'https://api.pocketalert.app/v1/devices/{tid}',
    headers={'Token': 'your-api-key'}
)
php
$tid = '9dc24hqldvv2bfx2nlc6r';
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->delete('https://api.pocketalert.app/v1/devices/'.$tid);

return $response->json();

응답 ​

성공 응답 ​

200 OK

기기가 성공적으로 삭제되었습니다

json
{
  "data": "success"
}

오류 응답 ​

상태설명
401Unauthorized — 토큰이 잘못되었거나 없습니다
404Not Found — 기기가 존재하지 않습니다

참고

기기를 삭제한 후에는 알림을 다시 받으려면 모바일 앱에서 기기를 다시 등록해야 합니다.

Pocket Alert 문서