> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Deprecation of @current in API paths Canonical URL: https://posthog.com/docs/api/current-alias-deprecation > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Why we're removing it](#why-were-removing-it) - [What to change](#what-to-change) - [How to find calls that still use it](#how-to-find-calls-that-still-use-it) - [What happens after April 30, 2027](#what-happens-after-april-30-2027) API paths that use `@current` in place of a project, environment, or organization ID are deprecated. Replace `@current` with the ID before **April 30, 2027**. These paths are affected: - `/api/projects/@current/...` - `/api/environments/@current/...` - `/api/organizations/@current/...` `/api/personal_api_keys/@current/` is not affected, because it refers to the key that signs the request. ## Why we're removing it `@current` resolves to the project or organization that the key's user last opened in PostHog. That changes whenever the user switches projects in the app, so the same request can read from or write to a different project from one call to the next. An ID in the path always refers to the same project or organization. ## What to change Replace `@current` with the project or organization ID: ```diff - GET /api/projects/@current/feature_flags/ + GET /api/projects/12345/feature_flags/ ``` To find the IDs: - **Project ID:** open [project settings](https://app.posthog.com/settings/project). The ID is also in the URL of any page in the app, after `/project/`. - **Organization ID:** open [organization settings](https://app.posthog.com/settings/organization-details). - **From the API:** `GET /api/projects/` lists the projects your key can access, with their IDs. ## How to find calls that still use it Every response to a path with `@current` includes these headers: ```http Deprecation: @1795564800 Sunset: Fri, 30 Apr 2027 23:59:59 GMT Link: ; rel="successor-version", ; rel="deprecation" ``` - `Deprecation` is the date the path was deprecated, in Unix seconds. - `Sunset` is the date after which the path stops resolving. - The `successor-version` link is the same request with the ID that `@current` resolved to. It's only included in successful responses. Log these headers, or search your code for `@current`, to find the calls to change. ## What happens after April 30, 2027 A request that uses `@current` and doesn't identify its project in another way gets an error. The error names the ID to use instead. **Requests that already identify their project** Requests authenticated with a [project secret API key](https://posthog.com/docs/api/project-secret-api-keys.md) already identify their project, so they keep working. LLM prompt requests from the PostHog SDKs that include the project token keep working too.