Remove an origin pattern
Removes one origin pattern from the project's origins.
Requests from URLs only that pattern admitted are refused from then on.
Live previews and deployment history are untouched. Removing the last
pattern leaves an empty list, which admits no origin except a loopback
origin.
Removing a pattern that is already absent is idempotent and answers 204.
The body's pattern is a pattern addProjectOrigin (POST /projects/{project_id}/origins) stored.
AuthorizationBearer <token>Scope: origin.delete
project_id*stringThe project ID: the id that createProject (POST /projects) returns, which zitadel setup
also prints as project_id.
^[a-zA-Z0-9_-]+$application/json- body
pattern*stringThe origin pattern exactly as stored on the project: the string
that createProject (POST /projects), getProject (GET /projects/{project_id}) or addProjectOrigin (POST /projects/{project_id}/origins) returns.
The pattern was removed.
import { configureZitadel, getApi } from "@zitadel/api/config";import { setApiCsrfToken } from "@zitadel/api/runtime/auth";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));// A write the session cookie authenticates carries the session's CSRF token.setApiCsrfToken((await client.getMySessionCsrfToken()).csrf_token);await client.removeProjectOrigin("proj_01KWH1P4MYS7F0N9WD3P2E4YM5", { pattern: "string" });Was this helpful?