younifyd
Menu

Create CORS Entry

Create a CORS entry

POST/projects/{projectId}/cors

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Create CORS Entry action (under Projects).
  3. Fill in the fields below, then reference the result from later steps as {{createCorsEntry.response.data}}.

Request

Path parameters

projectIdstringrequired

The unique ID of the project.

Request body

Enter the body as JSON in the step's Body field.

originstringrequired

The origin to allow, including the protocol. It can't include a path. Use `*` to allow all origins.

allowCredentialsboolean

Whether to allow authenticated requests from this origin. Can't be `true` when `origin` is `*`.

Default false

json
{
  "origin": "https://www.example.com",
  "allowCredentials": false
}

Response

Returns 201 with an object. Read it in later steps with {{createCorsEntry.response.data.<field>}}.

idinteger
originstring
allowCredentialsboolean
createdAtstring (date-time)
json
{
  "id": 0,
  "origin": "string",
  "allowCredentials": false,
  "createdAt": "2025-01-01T00:00:00Z"
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.