Delete the account
DELETE
/v1/account
const url = 'https://api.pocketbell.dev/v1/account';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"identity_token":"example","nonce":"example","authorization_code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.pocketbell.dev/v1/account \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "identity_token": "example", "nonce": "example", "authorization_code": "example" }'Deletes the account and everything in it: Sources, devices, notifications. The app signs in with Apple again first; its authorization code lets the server revoke the app’s access to the Apple ID.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
identity_token
required
From signing in with Apple again, to confirm.
string
nonce
required
The nonce from POST /v1/auth/nonce, unhashed.
string
authorization_code
required
From the same Apple sign-in; used once, to revoke the app’s access.
string
Examplegenerated
{ "identity_token": "example", "nonce": "example", "authorization_code": "example"}Responses
Section titled “Responses”Deleted.
The request was invalid.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Which fields were wrong, for invalid_request.
Array<object>
object
field
required
string
message
required
string
Example
{ "error": { "code": "invalid_request" }}The session, or the Apple sign-in confirming the deletion, was not valid.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Which fields were wrong, for invalid_request.
Array<object>
object
field
required
string
message
required
string
Example
{ "error": { "code": "invalid_request" }}Apple could not be reached; try again.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Which fields were wrong, for invalid_request.
Array<object>
object
field
required
string
message
required
string
Example
{ "error": { "code": "invalid_request" }}