Deprecation of @current in API paths
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:
To find the IDs:
- Project ID: open project settings. The ID is also in the URL of any page in the app, after
/project/. - Organization ID: open organization settings.
- 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:
Deprecationis the date the path was deprecated, in Unix seconds.Sunsetis the date after which the path stops resolving.- The
successor-versionlink is the same request with the ID that@currentresolved 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 authenticated with a project secret API key already identify their project, so they keep working. LLM prompt requests from the PostHog SDKs that include the project token keep working too.





