Account API
Read the account behind an API key and change its email or password.
The account endpoints tell you which account a key belongs to and let you change its email address or password.
Get the account
GET/api/account
The account the key belongs to. A good first call to check that a key works.
Needs: API key.
Example request
curl "https://siz.la/api/account" \
-H "Authorization: Bearer $SIZLA_API_KEY"const response = await fetch("https://siz.la/api/account", {
headers: {
Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://siz.la/api/account",
headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
)
print(response.json())$ch = curl_init('https://siz.la/api/account');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);Example answer, status 200
{
"error": 0,
"data": {
"id": 7,
"email": "[email protected]",
"username": "you",
"avatar": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp",
"status": "pro",
"expires": "",
"registered": "2026-10-02 14:05:11"
}
}Notes
statusisfreeon the free plan andproon every paid plan.
Update the account
PUT/api/account/update
Change the email address or the password. Changing either one also needs the current password, so a key alone cannot take an account over.
Needs: API key with write access.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
email | Body | string | The new email address. A confirmation message is sent to it. |
password | Body | string | The new password, at least 8 characters. |
current_password | Body | string | The current password. Required when you change the email or the password. |
Example request
curl -X PUT "https://siz.la/api/account/update" \
-H "Authorization: Bearer $SIZLA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","current_password":"your-current-password"}'const response = await fetch("https://siz.la/api/account/update", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "[email protected]",
"current_password": "your-current-password"
}),
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.put(
"https://siz.la/api/account/update",
headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
json={
"email": "[email protected]",
"current_password": "your-current-password",
},
)
print(response.json())$ch = curl_init('https://siz.la/api/account/update');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'current_password' => 'your-current-password',
]),
]);
$data = json_decode(curl_exec($ch), true);Example answer, status 200
{
"error": 0,
"message": "Account has been successfully updated."
}Errors specific to this call
400: The email or password is not valid.403: The current password is missing or wrong.429: Five wrong passwords in ten minutes. Wait ten minutes.