Docs

Remove an origin pattern

POST
/projects/{project_id}/origins/remove

Removes one 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 a pattern that is already absent is idempotent and answers 204.

Authorization

headerAuthorizationBearer <token>

Scope: origin.delete

Path Parameters

project_id*string

The unique identifier of the project.

Match^[a-zA-Z0-9_-]+$

Request Body

application/json
  1. body
pattern*string

The origin pattern exactly as stored on the project (same string returned by create/get or addOrigin).

Response Body

The pattern was removed.

Example Request
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.removeOrigin("proj_01KWH1P4MYS7F0N9WD3P2E4YM5", { pattern: "string" });
Example Response
Empty

Was this helpful?