Skip to content
ApiqDevelopers
API v1.64.0Open console

Delete device

DELETE/v1/devices/{deviceId}
Accepts bearer

Stop pushing to one of the caller's devices — the apps call it on sign-out

The device stops receiving pushes at once.Show moreThe device stops receiving pushes at once. A deviceId that is unknown, already deleted, moved to another user, or another user's is a 404, indistinguishable from none — an app signing out treats that 404 as done. No Idempotency-Key: deleting is idempotent in effect. Human session only (the devices tag).

Path parameters

  • deviceIdstringRequired
    The deviceId returned by POST /v1/devices

Request body

This operation takes no request body.

Responses

  • 204Deleted; nothing more is pushed to this device
  • 401
    UNAUTHENTICATED — missing or expired token.Show moreUNAUTHENTICATED — missing or expired token. Declared on every operation because `security` is declared globally at the document root: every route is authenticated, so every route can answer 401.
    ApiErrorResponse
  • 403
    The 403 of the /v1/devices routes: PERMISSION_DENIED with details.reason SESSION_REQUIRED when the credential is not a human session — an API key (X-Api-Key) or a service token from POST…Show moreThe 403 of the /v1/devices routes: PERMISSION_DENIED with details.reason SESSION_REQUIRED when the credential is not a human session — an API key (X-Api-Key) or a service token from POST /v1/oauth/token, whatever its scopes. A device belongs to a person, and only a person's session can register, list or delete one.
    ApiErrorResponse
  • 404NOT_FOUND — the deviceId is unknown, already deleted, moved to another user, or another user's: all four answer alike.ApiErrorResponse
  • 405
    VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge).Show moreVALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge). Not retryable as sent.
    ApiErrorResponse
  • 414
    VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge).Show moreVALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge). Not retryable as sent: send long input in the body of a POST.
    ApiErrorResponse
  • 500INTERNAL — a bug, and traceId is the support handle.ApiErrorResponse

Errors you should handle

Branch on code and honour retryable — never on the HTTP status alone.

401UNAUTHENTICATED
The bearer token is expired. Re-authenticate and retry.
not retryable
403PERMISSION_DENIED
Devices are registered by a signed-in person only. Sign in with POST /v1/auth/login; API keys and service tokens are refused here whatever their scopes.
not retryable
404NOT_FOUND
Device dev_7Qm2c9Lx4Rt8 was not found.
not retryable
405VALIDATION
This method is not served.
not retryable
414VALIDATION
The request URI is longer than 8 KiB.
not retryable
500INTERNAL
An unexpected error occurred. Quote the traceId to support.
retryable