From 5401182007e65022d9a59ff6b52d49b54d5edfd0 Mon Sep 17 00:00:00 2001 From: Ilyaas Kapadia <86218345+IlyaasK@users.noreply.github.com> Date: Mon, 22 Jun 2026 10:23:45 -0400 Subject: [PATCH 1/2] Correct X-Kernel-Project-Id header: takes a project ID, not a name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header is resolved server-side by project ID only (the middleware looks up entproject.IDEQ); passing a name returns 404 project_not_found. Name resolution is a client-side convenience — the CLI's --project flag and the SDKs resolve names to IDs before sending the header. docs#409 incorrectly said the header accepts "a project ID or name". Co-Authored-By: Claude Fable 5 --- info/projects.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/info/projects.mdx b/info/projects.mdx index 79ff2f4..7d5683f 100644 --- a/info/projects.mdx +++ b/info/projects.mdx @@ -25,7 +25,7 @@ A project must also be empty before it can be deleted — archive or remove its ## Scoping Requests to a Project -Pass the `X-Kernel-Project-Id` header — a project ID or name — on any API request to scope it to a specific project. Without the header (and without a project-scoped API key), requests act on your organization's **default project**: reads return the default project's resources, and writes create resources in it. +Pass the `X-Kernel-Project-Id` header — a project ID — on any API request to scope it to a specific project. The header takes the project's ID, not its name; the CLI's `--project` flag and the SDKs resolve names to IDs for you. Without the header (and without a project-scoped API key), requests act on your organization's **default project**: reads return the default project's resources, and writes create resources in it. ```bash curl https://api.onkernel.com/browsers \ From ee5ece81b047aaf99a404822c447d3dacaa9c739 Mon Sep 17 00:00:00 2001 From: Ilyaas Kapadia <86218345+IlyaasK@users.noreply.github.com> Date: Mon, 22 Jun 2026 10:27:51 -0400 Subject: [PATCH 2/2] Lead project scoping with name-based workflow; ID header is the direct-API detail Per review: don't steer users to hunt for and paste an opaque project ID. Scope by name via the CLI --project flag or an SDK client (both resolve the name to the ID); the raw X-Kernel-Project-Id header (ID-only) is documented as the underlying mechanism for direct REST callers. Co-Authored-By: Claude Fable 5 --- info/projects.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/info/projects.mdx b/info/projects.mdx index 7d5683f..9faa245 100644 --- a/info/projects.mdx +++ b/info/projects.mdx @@ -25,7 +25,7 @@ A project must also be empty before it can be deleted — archive or remove its ## Scoping Requests to a Project -Pass the `X-Kernel-Project-Id` header — a project ID — on any API request to scope it to a specific project. The header takes the project's ID, not its name; the CLI's `--project` flag and the SDKs resolve names to IDs for you. Without the header (and without a project-scoped API key), requests act on your organization's **default project**: reads return the default project's resources, and writes create resources in it. +Scope a request to a project **by name** with the CLI's `--project ` flag or by setting the project on an SDK client — both look the name up and send the project's ID for you, so you never handle the raw ID. When calling the REST API directly, send that ID yourself in the `X-Kernel-Project-Id` header (the header takes a project ID, not a name). Without it (and without a project-scoped API key), requests act on your organization's **default project**: reads return the default project's resources, and writes create resources in it. ```bash curl https://api.onkernel.com/browsers \