> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Admin Operations

## Article: About Admin Operations

## Article Link: https://dev.wix.com/docs/go-headless/authentication/admin/about-admin-operations.md

## Article Content:

# About Admin Operations

Admin operations are backend API calls that need more permissions than the current visitor or member has, such as creating members, updating inventory, issuing refunds, or querying all orders across your project.

## When to use admin operations

Use admin operations to perform actions that affect data beyond the current visitor's session. For example:

- Create, approve, or delete site members.
- Add products to your store or update inventory.
- Update order status, issue refunds, or fulfill orders.
- Confirm, cancel, or reschedule bookings.
- Query all orders, members, or bookings across your project.
- Send or read chat messages in a visitor's conversation, such as an automated response to a Wix Chat inquiry.

Run admin operations only in backend code, and validate who can trigger them.

## Choose a method

How you authorize admin operations depends on your setup, with one exception: for admin access beyond your project's own site, such as account-level operations or external integrations, use an [API key](https://dev.wix.com/docs/go-headless/authentication/admin/generate-an-api-key.md) regardless of setup. Otherwise:

- **With [Wix's Astro integration](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/about-the-astro-integration.md)**: [Elevate API call permissions](https://dev.wix.com/docs/go-headless/authentication/admin/elevate-api-call-permissions-with-the-astro-integration.md).
- **With any other setup**: Use [client credentials](https://dev.wix.com/docs/go-headless/authentication/admin/make-admin-api-calls-with-client-credentials.md).

## Elevation with the Astro integration

If your project uses the Astro integration, you don't manage credentials or tokens yourself. [`@wix/essentials`](https://dev.wix.com/docs/sdk/core-modules/essentials/auth.md#methods) handles authenticating as the project. Wrap a restricted SDK method with [`auth.elevate()`](https://dev.wix.com/docs/sdk/core-modules/essentials/auth.md#elevate) and call the elevated version. Learn how in [Elevate API Call Permissions with the Astro Integration](https://dev.wix.com/docs/go-headless/authentication/admin/elevate-api-call-permissions-with-the-astro-integration.md).

<blockquote class="warning">

__Warning:__ Elevation lets your code call methods it typically can't access. Use it intentionally and only in backend code. Pay special attention when using `elevate()` in backend code that can be triggered from the frontend or exposed to outside callers.

</blockquote>

## Client credentials

A headless project is its own [Wix app](https://dev.wix.com/docs/overview/auth-permissions/identities.md), and it can authenticate as itself. This exchanges the OAuth client ID and client secret for a short-lived access token, then you can use that token to authorize your admin API calls. Learn how in [Make Admin API Calls with Client Credentials](https://dev.wix.com/docs/go-headless/authentication/admin/make-admin-api-calls-with-client-credentials.md).

## API key

An API key represents administrative access to your Wix account, with a custom set of permissions. Use one when your access needs to reach beyond your project's own site, such as account-level operations or external integrations. You can also use an API key instead of client credentials for admin calls in a [self-managed headless project](https://dev.wix.com/docs/go-headless/self-managed-headless/about-self-managed-headless.md).

- [Generate an API key](https://dev.wix.com/docs/go-headless/authentication/admin/generate-an-api-key.md)
- [Create an SDK client with an API key](https://dev.wix.com/docs/go-headless/authentication/admin/create-an-sdk-client-with-an-api-key.md)
- [Make REST API calls with an API key](https://dev.wix.com/docs/go-headless/authentication/admin/make-rest-api-calls-with-an-api-key.md)

<blockquote class="important">

__Important:__ Store your API keys securely and only use them in backend code.

</blockquote>

## See also

- [Make Admin API Calls with Client Credentials](https://dev.wix.com/docs/go-headless/authentication/admin/make-admin-api-calls-with-client-credentials.md)
- [Elevate API Call Permissions with the Astro Integration](https://dev.wix.com/docs/go-headless/authentication/admin/elevate-api-call-permissions-with-the-astro-integration.md)
- [Generate an API Key](https://dev.wix.com/docs/go-headless/authentication/admin/generate-an-api-key.md)
- [About Authentication](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md)