# Account Who the token belongs to, and revoking it. **Common tasks** - [Who this token belongs to](#get-auth-me) **Only in the app:** Creating, renewing and revoking tokens, and everything about your account. **How it works in the app:** [help article](https://infranest.io/docs/api-tokens). Any token can call these; no scope is needed.
[Auth](#auth) 2
Every endpoint below takes a token in the `Authorization: Bearer` header and answers JSON. Errors use the shared format in [Errors](../errors.md). Base address: `https://api.infranest.io/api`. ## Auth ### Revoke the current token {#post-auth-logout}
`POST` `/auth/logout` **Scope:** any token · **Changes data:** yes — only where API writes are switched on for the organization Deletes the token that authenticated this request, so it stops working immediately. Other tokens on your account are not affected. **Errors:** [`unauthenticated`](../errors.md#unauthenticated), [`write_disabled`](../errors.md#write_disabled), [`organization_suspended`](../errors.md#organization_suspended), [`idempotency_in_progress`](../errors.md#idempotency_in_progress), [`validation_failed`](../errors.md#validation_failed), [`idempotency_key_reused`](../errors.md#idempotency_key_reused), [`rate_limited`](../errors.md#rate_limited)
**Request** ```sh curl -X POST "https://api.infranest.io/api/auth/logout" \ -H "Authorization: Bearer $INFRANEST_TOKEN" \ -H "Accept: application/json" ``` **Response** · 200 ```json { "message": "Logged out successfully." } ```
--- ### Get the signed-in user {#get-auth-me}
`GET` `/auth/me` **Scope:** any token · **Changes data:** no 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. **Errors:** [`unauthenticated`](../errors.md#unauthenticated), [`rate_limited`](../errors.md#rate_limited)
**Request** ```sh curl "https://api.infranest.io/api/auth/me" \ -H "Authorization: Bearer $INFRANEST_TOKEN" \ -H "Accept: application/json" ``` **Response** · 200 ```json { "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 } ```