Account
Who the token belongs to, and revoking it.
Common tasks
Only in the app: Creating, renewing and revoking tokens, and everything about your account.
How it works in the app: help article.
Any token can call these; no scope is needed.
Auth 2
Every endpoint below takes a token in the Authorization: Bearer header and answers JSON. Errors use the shared format in Errors. Base address: https://api.infranest.io/api.
Auth
Revoke the current token
Deletes the token that authenticated this request, so it stops working immediately. Other tokens on your account are not affected.
/auth/logoutAuthorizationheader
AuthorizationstringrequiredBearer and your API token: Bearer $INFRANEST_TOKEN. See Tokens and scopes.
Request
curl -X POST "https://api.infranest.io/api/auth/logout" \
-H "Authorization: Bearer $INFRANEST_TOKEN" \
-H "Accept: application/json"$headers = @{
Authorization = "Bearer $env:INFRANEST_TOKEN"
Accept = "application/json"
}
Invoke-RestMethod -Method Post -Uri "https://api.infranest.io/api/auth/logout" -Headers $headers<?php
// composer require guzzlehttp/guzzle
require "vendor/autoload.php";
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.infranest.io/api/auth/logout', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('INFRANEST_TOKEN'),
'Accept' => 'application/json',
],
]);
echo $response->getBody();import os
import requests
response = requests.post(
"https://api.infranest.io/api/auth/logout",
headers={
"Authorization": f"Bearer {os.environ['INFRANEST_TOKEN']}",
"Accept": "application/json",
},
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.infranest.io/api/auth/logout', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.INFRANEST_TOKEN}`,
Accept: 'application/json',
},
})
console.log(response.status, await response.text())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("POST", "https://api.infranest.io/api/auth/logout", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("INFRANEST_TOKEN"))
req.Header.Set("Accept", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Response
{
"message": "Logged out successfully."
}{
"code": "unauthenticated",
"message": "You are not signed in, or the API token is missing, wrong, expired or revoked.",
"hint": "Send a valid token in the Authorization header, as the word Bearer followed by the token. Create a new one under My account → Developer if it expired or was revoked.",
"retryable": false,
"docs_url": "https://developers.infranest.io/errors#unauthenticated",
"reference": "k3j9x0b2qa"
}{
"code": "write_disabled",
"message": "API write access is not switched on for this organization.",
"hint": "Ask an owner of the organization to switch on API write access. Reads keep working meanwhile.",
"retryable": false,
"docs_url": "https://developers.infranest.io/errors#write_disabled",
"reference": "k3j9x0b2qa"
}{
"code": "idempotency_in_progress",
"message": "A request with this Idempotency-Key is still being handled.",
"hint": "Wait a few seconds, then send the same request with the same key again to get its result.",
"retryable": true,
"docs_url": "https://developers.infranest.io/errors#idempotency_in_progress",
"reference": "k3j9x0b2qa"
}{
"code": "validation_failed",
"message": "The name field is required.",
"hint": "Fix the fields listed in \"errors\" and send the request again.",
"retryable": false,
"docs_url": "https://developers.infranest.io/errors#validation_failed",
"errors": {
"name": [
"The name field is required."
]
},
"reference": "k3j9x0b2qa"
}{
"code": "rate_limited",
"message": "This token made more than 300 requests in a minute.",
"hint": "Wait the number of seconds in \"retry_after\" (also the Retry-After header), then retry.",
"retryable": true,
"docs_url": "https://developers.infranest.io/errors#rate_limited",
"limit_key": "api_requests_per_minute",
"limit": 300,
"retry_after": 12,
"reference": "k3j9x0b2qa"
}401 unauthenticated
403 write_disabled organization_suspended
409 idempotency_in_progress
422 validation_failed idempotency_key_reused
429 rate_limited
Get the signed-in user
Your user profile, the organizations you belong to with your role in each, and the state of your account security (two-factor, passkeys, password). A token bound to one organization lists only that organization.
/auth/meAuthorizationheader
AuthorizationstringrequiredBearer and your API token: Bearer $INFRANEST_TOKEN. See Tokens and scopes.
Request
curl "https://api.infranest.io/api/auth/me" \
-H "Authorization: Bearer $INFRANEST_TOKEN" \
-H "Accept: application/json"$headers = @{
Authorization = "Bearer $env:INFRANEST_TOKEN"
Accept = "application/json"
}
Invoke-RestMethod -Method Get -Uri "https://api.infranest.io/api/auth/me" -Headers $headers<?php
// composer require guzzlehttp/guzzle
require "vendor/autoload.php";
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.infranest.io/api/auth/me', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('INFRANEST_TOKEN'),
'Accept' => 'application/json',
],
]);
echo $response->getBody();import os
import requests
response = requests.get(
"https://api.infranest.io/api/auth/me",
headers={
"Authorization": f"Bearer {os.environ['INFRANEST_TOKEN']}",
"Accept": "application/json",
},
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.infranest.io/api/auth/me', {
headers: {
Authorization: `Bearer ${process.env.INFRANEST_TOKEN}`,
Accept: 'application/json',
},
})
console.log(response.status, await response.text())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.infranest.io/api/auth/me", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("INFRANEST_TOKEN"))
req.Header.Set("Accept", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Response
{
"user": {
"id": 1,
"name": "Alex Rivera",
"email": "demo@example.com",
"email_verified_at": "2026-01-15T12:00:00.000000Z",
"created_at": "2026-01-15T12:00:00.000000Z",
"updated_at": "2026-01-15T12:00:00.000000Z",
"is_super_admin": false,
"blocked_at": null,
"block_reason": null,
"locked_until": null,
"notification_preferences": {
"quiet_hours": {
"from": "22:00",
"to": "07:00",
"tz": "Europe/Amsterdam"
}
},
"two_factor_confirmed_at": null,
"first_name": null,
"last_name": null,
"language": "en",
"avatar_url": "http://localhost/storage/avatars/docs-demo-alex.svg",
"dashboard_layout": null,
"platform_role": "user",
"email_format": "html",
"onboarding": null,
"password_changed_at": "2026-01-15T12:00:00.000000Z",
"pending_email": null,
"pending_email_sent_at": null,
"terms_accepted_at": null,
"terms_version": null,
"marketing_consent_at": null,
"timezone": null,
"time_format": "auto",
"force_password_reset": false,
"deleted_at": null,
"purge_after": null,
"purge_reminder_sent_at": null,
"deleted_by_id": null,
"deleted_by_label": null,
"deletion_reason": null,
"anonymized_at": null,
"analytics_opt_out": false,
"open_on_dashboard_id": null,
"default_organization_id": null,
"analytics_id": "api.infranest.io-4200017",
"organizations": [
{
"id": 1,
"name": "Northwind Cloud",
"slug": "northwind-demo",
"country": null,
"avatar_url": null,
"base_currency": "EUR",
"timezone": null,
"price_display": "net",
"vat_rate": "21.00",
"require_reauth_destructive": false,
"require_reauth_power": false,
"require_2fa": false,
"password_min_length": null,
"password_require_symbols": null,
"password_max_age_days": null,
"dynamic_ip_default_strict": false,
"dynamic_ip_default_fail_closed": false,
"recap_cadence": "monthly",
"sso_required": false,
"sso_required_since": null,
"is_demo": true,
"is_sandbox": false,
"users_count": 4,
"org_role": {
"id": 1,
"organization_id": null,
"name": "Owner",
"slug": "owner",
"is_system": true,
"permissions": {
"dns.read": true,
"dns.write": true,
"cloud.read": true,
"cloud.write": true,
"billing.read": true,
"domains.read": true,
"roles.manage": true,
"billing.write": true,
"domains.write": true,
"domains.delete": true,
"members.manage": true,
"monitoring.read": true,
"monitoring.write": true
},
"created_at": "2026-01-15T12:00:00.000000Z",
"updated_at": "2026-01-15T12:00:00.000000Z",
"deleted_at": null,
"purge_after": null,
"purge_reminder_sent_at": null,
"deleted_by_id": null,
"deleted_by_label": null,
"deletion_reason": null
},
"sso_admitted": true,
"effective_timezone": "UTC",
"managed_by": [
"Sam Okoye"
],
"analytics_id": null,
"pivot": {
"user_id": 1,
"organization_id": 1,
"org_role_id": 1,
"sso_external": false,
"created_at": "2026-01-15T12:00:00.000000Z",
"updated_at": "2026-01-15T12:00:00.000000Z"
}
}
]
},
"unread_notifications": 3,
"is_impersonated": false,
"is_standing_in": false,
"impersonated_by": null,
"session_country_code": null,
"session_region_code": null,
"two_factor_setup_required": false,
"password_reset_required": false,
"email_verification_required": false,
"email_undeliverable": false,
"email_security_phrase": null,
"has_passkeys": false,
"passkey_count": 0,
"has_password": true,
"sso_only": null,
"can_go_passwordless": false,
"recovery_codes_left": null,
"gravatar_enabled": false,
"gravatar_default": "mp",
"avatar_sources": [
"google",
"github"
],
"oauth_avatars": [],
"stripe_enabled": false,
"stripe_publishable_key": null
}{
"code": "unauthenticated",
"message": "You are not signed in, or the API token is missing, wrong, expired or revoked.",
"hint": "Send a valid token in the Authorization header, as the word Bearer followed by the token. Create a new one under My account → Developer if it expired or was revoked.",
"retryable": false,
"docs_url": "https://developers.infranest.io/errors#unauthenticated",
"reference": "k3j9x0b2qa"
}{
"code": "rate_limited",
"message": "This token made more than 300 requests in a minute.",
"hint": "Wait the number of seconds in \"retry_after\" (also the Retry-After header), then retry.",
"retryable": true,
"docs_url": "https://developers.infranest.io/errors#rate_limited",
"limit_key": "api_requests_per_minute",
"limit": 300,
"retry_after": 12,
"reference": "k3j9x0b2qa"
}401 unauthenticated
429 rate_limited