Skip to content

Delete the account

DELETE
/v1/account
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.

Media typeapplication/json
object
identity_token
required

From signing in with Apple again, to confirm.

string
>= 1 characters <= 8192 characters
nonce
required

The nonce from POST /v1/auth/nonce, unhashed.

string
>= 1 characters <= 256 characters
authorization_code
required

From the same Apple sign-in; used once, to revoke the app’s access.

string
>= 1 characters <= 1024 characters
Examplegenerated
{
"identity_token": "example",
"nonce": "example",
"authorization_code": "example"
}

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"
}
}