diff --git a/content/admin-api/DOCUMENTATION-PLAN.md b/content/admin-api/DOCUMENTATION-PLAN.md index 24e94cd9a..98b6d1ce5 100644 --- a/content/admin-api/DOCUMENTATION-PLAN.md +++ b/content/admin-api/DOCUMENTATION-PLAN.md @@ -6,7 +6,7 @@ Internal planning doc. Not published on the docs site unless added to `docs.yml` ## Target -Admin API stays under **Tools & Resources → Tools**. Nested sections are Apps, Chains, and Usage. Nested sections do not have their own overview or quickstart. +Admin API stays under **Tools & Resources → Tools**. Nested sections are Apps, Chains, Usage, and Gas Policies. Nested sections do not have their own overview or quickstart. ``` Tools @@ -15,16 +15,17 @@ Tools ├── Quickstart /docs/reference/admin-api/quickstart ├── Apps /docs/admin-api/apps/{operation} ├── Chains /docs/admin-api/chains/{operation} - └── Usage /docs/admin-api/usage/{operation} + ├── Usage /docs/admin-api/usage/{operation} + └── Gas Policies /docs/admin-api/gas-policies/{operation} ``` ## How URLs work -Prose pages set `slug:` in frontmatter (`reference/admin-api/overview`). Endpoint pages inherit the parent section path. Each of Apps, Chains, and Usage uses `url-path` so endpoints do not pick up the Tools tab slug `tutorials`. +Prose pages set `slug:` in frontmatter (`reference/admin-api/overview`). Endpoint pages inherit the parent section path. Each of Apps, Chains, Usage, and Gas Policies uses `url-path` so endpoints do not pick up the Tools tab slug `tutorials`. ## Visibility -Each of Overview, Quickstart, Apps, Chains, and Usage can set `hidden: true` independently. Hidden pages still load by URL and stay out of search. +Each of Overview, Quickstart, Apps, Chains, Usage, and Gas Policies can set `hidden: true` independently. Hidden pages still load by URL and stay out of search. Until a docs-site follow-up ships, a hidden URL does not show that section in the sidebar. The follow-up should show only the hidden section that contains the current URL (a Usage link shows Usage, not Apps). @@ -50,3 +51,4 @@ Until a docs-site follow-up ships, a hidden URL does not show that section in th | 2026-08-07 | Initial plan from IA discussion | | 2026-08-07 | Tightened for stakeholder review | | 2026-08-13 | Stay under Tools; split URL prefixes; nest Apps, Chains, Usage; docs-site sidebar filter is a follow-up | +| 2026-08-27 | Move Gas Policy Admin APIs under Admin API; wallets hub page only | diff --git a/content/admin-api/overview.mdx b/content/admin-api/overview.mdx index 158fc4ca7..b5c70d9fd 100644 --- a/content/admin-api/overview.mdx +++ b/content/admin-api/overview.mdx @@ -1,15 +1,17 @@ --- title: Admin API Overview -subtitle: Programmatically manage Alchemy apps, networks, and usage. +subtitle: Programmatically manage Alchemy apps, networks, usage, and gas policies. slug: reference/admin-api/overview --- -The Admin API lets you manage Alchemy apps, list supported networks, and inspect compute unit usage without using the Alchemy Dashboard. Use it for automation, compliance, billing alerts, and enterprise workflows. +The Admin API lets you manage Alchemy apps, list supported networks, inspect compute unit usage, and create gas sponsorship policies without using the Alchemy Dashboard. Use it for automation, compliance, billing alerts, and enterprise workflows. An App represents a single Alchemy project. You create an app, configure which networks it can access, and optionally restrict usage via allowlists. All app changes are applied immediately. Usage data includes compute unit totals, estimated USD cost, billing period boundaries, and optional breakdowns by app, network, method, and request type. +Gas policy requests create and manage sponsorship rules for an app. Those endpoints use `https://manage.g.alchemy.com` and need a Gas Manager access-key permission. + *** ## What you can do @@ -25,6 +27,9 @@ Use this API to: * Query usage time series with hourly or daily granularity * Filter usage by app, network, method, and request type * Group usage results by request type, app, network, or method +* Create, update, replace, and delete gas sponsorship policies +* Activate or deactivate a policy +* Retrieve policy stats and sponsorship history Each request is authenticated and returns JSON responses. @@ -36,6 +41,7 @@ All requests must include an access key. Grant only the permissions the caller n * **App Management** read or read and write, for apps and chains * **Usage** read (`ADMIN_USAGE_READ`), for Usage API endpoints +* **Gas Manager** read or read and write, for gas policy endpoints You can also authenticate usage requests with a dashboard user session token that has the `viewer`, `developer`, or `admin` role. @@ -43,7 +49,7 @@ To create an access key: 1. Go to the [security tab](https://dashboard.alchemy.com/settings/security?utm_source=docs&utm_medium=referral&utm_content=reference_admin-api_overview) in the Alchemy Dashboard 2. Create a new access key -3. Enable App Management and/or Usage with the permissions you need +3. Enable App Management, Usage, and/or Gas Manager with the permissions you need *** diff --git a/content/admin-api/quickstart.mdx b/content/admin-api/quickstart.mdx index 26f4b20a7..a3a1dadca 100644 --- a/content/admin-api/quickstart.mdx +++ b/content/admin-api/quickstart.mdx @@ -288,3 +288,4 @@ curl -X DELETE "$ALCHEMY_ADMIN_BASE_URL/apps/$APP_ID" \ ## Next steps * Use the [Alchemy CLI](/docs/alchemy-cli#usage) to query usage from the terminal without writing HTTP requests +* Create and manage gas sponsorship policies with the [Create Policy](/docs/admin-api/gas-policies/create-policy) endpoint diff --git a/content/docs.yml b/content/docs.yml index e24dde48f..f64e9b8b0 100644 --- a/content/docs.yml +++ b/content/docs.yml @@ -1950,8 +1950,6 @@ navigation: contents: - api: Gas Abstraction API Endpoints api-name: gas-manager-coverage - - api: Admin API Endpoints - api-name: admin slug: gas-manager-admin-api - section: Bundler contents: @@ -2171,6 +2169,13 @@ navigation: api-name: usage-api skip-slug: true flattened: true + - section: Gas Policies + url-path: admin-api/gas-policies + contents: + - api: Gas Policies + api-name: admin + skip-slug: true + flattened: true - page: Sandbox path: tutorials/getting-started/dashboard/alchemy-sandbox.mdx - page: Alerts diff --git a/content/redirects.yml b/content/redirects.yml index 9403fdf39..1bb7816b7 100644 --- a/content/redirects.yml +++ b/content/redirects.yml @@ -2257,6 +2257,14 @@ redirects: destination: /docs/admin-api/apps/update-app-ip-allowlist permanent: true + # Gas Policy Admin API moved under Tools → Admin API + - source: /docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/:method + destination: /docs/admin-api/gas-policies/:method + permanent: true + - source: /docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/:method + destination: /docs/admin-api/gas-policies/:method + permanent: true + # Dynamic Redirect MUST be at the end of the redirects list. This is because redirects are processed in order # and we want static redirects to take precedence over dynamic redirects. # ======================================= Dynamic Redirects ======================================== diff --git a/content/wallets/pages/gas-manager-admin-api/gas-manager-admin-api-endpoints/gas-manager-admin-api-endpoints.mdx b/content/wallets/pages/gas-manager-admin-api/gas-manager-admin-api-endpoints/gas-manager-admin-api-endpoints.mdx index 70aac24ed..3150aebe1 100644 --- a/content/wallets/pages/gas-manager-admin-api/gas-manager-admin-api-endpoints/gas-manager-admin-api-endpoints.mdx +++ b/content/wallets/pages/gas-manager-admin-api/gas-manager-admin-api-endpoints/gas-manager-admin-api-endpoints.mdx @@ -16,17 +16,17 @@ To use Gas Manager Admin API, follow these steps: 1. **Create an app**: to create gas policies, first create an app [through your dashboard](https://dashboard.alchemy.com/). 2. **Create access keys for your account**: To call Gas Manager Admin APIs, an authorization header is required in all the requests. This `auth` header should be your access key. Follow this [guide for creating access keys](/docs/how-to-create-access-keys). -3. **Create the policy**: Next, make a request to the [Create Policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/create-policy) endpoint with your policy rules. +3. **Create the policy**: Next, make a request to the [Create Policy](/docs/admin-api/gas-policies/create-policy) endpoint with your policy rules. ## Methods | Method | Description | | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| [Create Policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/create-policy) | Creates a new gas manager policy with the specified rules. Returns the policy id of a successfully created policy. | -| [Get Policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy) | Returns policy information by id. | -| [Delete Policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/delete-policy) | Deletes a policy by id. | -| [Replace Policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/replace-policy) | Accepts a rules object and replaces all rules in an existing policy by id. | -| [Get All Policies](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-all-policies) | Accepts an app id and returns all policies under that app. | -| [Update Policy Status](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/update-policy-status) | Modifies the status of a policy to either "active" or "inactive". | -| [Get Policy Stats](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy-stats) | Returns stats about a policy specified by ID, including signatures mined, signatures expired, signatures pending, USD mined, and USD pending. | -| [Get Sponsorships](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-sponsorships) | Returns a list of sponsorships associated with the specified policy ID. The results are paginated. | +| [Create Policy](/docs/admin-api/gas-policies/create-policy) | Creates a new gas manager policy with the specified rules. Returns the policy id of a successfully created policy. | +| [Get Policy](/docs/admin-api/gas-policies/get-policy) | Returns policy information by id. | +| [Delete Policy](/docs/admin-api/gas-policies/delete-policy) | Deletes a policy by id. | +| [Replace Policy](/docs/admin-api/gas-policies/replace-policy) | Accepts a rules object and replaces all rules in an existing policy by id. | +| [Get All Policies](/docs/admin-api/gas-policies/get-all-policies) | Accepts an app id and returns all policies under that app. | +| [Update Policy Status](/docs/admin-api/gas-policies/update-policy-status) | Modifies the status of a policy to either "active" or "inactive". | +| [Get Policy Stats](/docs/admin-api/gas-policies/get-policy-stats) | Returns stats about a policy specified by ID, including signatures mined, signatures expired, signatures pending, USD mined, and USD pending. | +| [Get Sponsorships](/docs/admin-api/gas-policies/get-sponsorships) | Returns a list of sponsorships associated with the specified policy ID. The results are paginated. | diff --git a/content/wallets/pages/gas-manager-admin-api/gas-manager-faqs.mdx b/content/wallets/pages/gas-manager-admin-api/gas-manager-faqs.mdx index 646938cdf..06a839f98 100644 --- a/content/wallets/pages/gas-manager-admin-api/gas-manager-faqs.mdx +++ b/content/wallets/pages/gas-manager-admin-api/gas-manager-faqs.mdx @@ -43,7 +43,7 @@ The Gas Abstraction API charges fees on gas sponsorships and ERC-20 gas payments The dashboard shows tokens that you can enable in **Tokens & Networks** in the [Gas Manager Dashboard](https://dashboard.alchemy.com/apps/latest/gas-sponsorship). -The dashboard list is not the limit. To configure a custom ERC-20 token through the Admin API, use the [custom-token guide](/docs/wallets/transactions/pay-gas-with-any-token#configure-a-custom-erc-20-token) and the [Create Policy reference](https://www.alchemy.com/docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/create-policy). Testnet tokens require a compatible price-reference token; mainnet tokens can use a price supported by the [Token Prices By Address API](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-token-prices-by-address) or an optional reference token. Choose a reference token with the same number of decimals as the payment token. +The dashboard list is not the limit. To configure a custom ERC-20 token through the Admin API, use the [custom-token guide](/docs/wallets/transactions/pay-gas-with-any-token#configure-a-custom-erc-20-token) and the [Create Policy reference](https://www.alchemy.com/docs/admin-api/gas-policies/create-policy). Testnet tokens require a compatible price-reference token; mainnet tokens can use a price supported by the [Token Prices By Address API](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-token-prices-by-address) or an optional reference token. Choose a reference token with the same number of decimals as the payment token. ### How is the exchange rate for an ERC-20 token calculated? diff --git a/content/wallets/pages/low-level-infra/gas-manager/gas-sponsorship/using-sdk/conditional-gas-sponsorship.mdx b/content/wallets/pages/low-level-infra/gas-manager/gas-sponsorship/using-sdk/conditional-gas-sponsorship.mdx index 84b0e7c60..da01d2856 100644 --- a/content/wallets/pages/low-level-infra/gas-manager/gas-sponsorship/using-sdk/conditional-gas-sponsorship.mdx +++ b/content/wallets/pages/low-level-infra/gas-manager/gas-sponsorship/using-sdk/conditional-gas-sponsorship.mdx @@ -50,7 +50,7 @@ A gas manager policy defines which transactions (userOps) are eligible for gas s * **URL**: the webhook URL the Gas Manager will make a POST request to every time you request gas sponsorship * **Sponsor on error or timeout**: when selected, the userOp will be sponsored in the event of an error or timeout. -Create a policy via the [Gas Manager dashboard](https://dashboard.alchemy.com/apps/latest/gas-sponsorship) or the [Create policy API](https://www.alchemy.com/docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/create-policy). +Create a policy via the [Gas Manager dashboard](https://dashboard.alchemy.com/apps/latest/gas-sponsorship) or the [Create policy API](https://www.alchemy.com/docs/admin-api/gas-policies/create-policy). ### 3. Get Gas Manager's signature diff --git a/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx b/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx index ad4dade99..08ff8e002 100644 --- a/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx +++ b/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx @@ -30,7 +30,7 @@ Post-operation mode is recommended for most use cases. If the token approval is ## Configure a custom ERC-20 token To accept a token that is not listed in the dashboard, create an ERC-20 policy -with the [Create Policy Admin API](/docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/create-policy). +with the [Create Policy Admin API](/docs/admin-api/gas-policies/create-policy). Testnet tokens must set `priceReferenceNetwork` and `priceReferenceTokenAddress`; the reference token provides the conversion price. Mainnet tokens can omit both fields when their token price is supported diff --git a/content/wallets/pages/transactions/sponsor-gas/bundler-sponsored-operations.mdx b/content/wallets/pages/transactions/sponsor-gas/bundler-sponsored-operations.mdx index 475fbe9da..adad9625b 100644 --- a/content/wallets/pages/transactions/sponsor-gas/bundler-sponsored-operations.mdx +++ b/content/wallets/pages/transactions/sponsor-gas/bundler-sponsored-operations.mdx @@ -160,5 +160,5 @@ BSO gas is priced as the onchain settlement cost plus a BSO service fee for adva ## Related documentation * [Sponsor gas overview](/docs/wallets/transactions/sponsor-gas/overview) -* [Gas Manager Admin API](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy) +* [Gas Manager Admin API](/docs/admin-api/gas-policies/get-policy) * [Wallet APIs documentation](/docs/wallets) diff --git a/content/wallets/pages/transactions/sponsor-gas/conditional-sponsorship-rules.mdx b/content/wallets/pages/transactions/sponsor-gas/conditional-sponsorship-rules.mdx index 4951c58e2..36ba9f18e 100644 --- a/content/wallets/pages/transactions/sponsor-gas/conditional-sponsorship-rules.mdx +++ b/content/wallets/pages/transactions/sponsor-gas/conditional-sponsorship-rules.mdx @@ -17,7 +17,7 @@ Use it to: You can configure the same policy logic in two ways: 1. **Dashboard**: Create or edit a Gas Manager policy in the [dashboard](https://dashboard.alchemy.com/apps/latest/gas-sponsorship) -2. **Admin API**: Create or update policies programmatically with the [Gas Manager Admin API](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy) +2. **Admin API**: Create or update policies programmatically with the [Gas Manager Admin API](/docs/admin-api/gas-policies/get-policy) Most teams start in the dashboard, then move to API-based management for automation. diff --git a/content/wallets/pages/transactions/sponsor-gas/monitor-sponsorship-usage.mdx b/content/wallets/pages/transactions/sponsor-gas/monitor-sponsorship-usage.mdx index 62dad1338..1e88fb827 100644 --- a/content/wallets/pages/transactions/sponsor-gas/monitor-sponsorship-usage.mdx +++ b/content/wallets/pages/transactions/sponsor-gas/monitor-sponsorship-usage.mdx @@ -30,8 +30,8 @@ You can also see: ## More detailed usage -* Use [Get Policy Stats](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy-stats) for a more detailed usage breakdown. -* Use [Get Sponsorships](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-sponsorships) for a paginated history per policy including individual transaction spend. +* Use [Get Policy Stats](/docs/admin-api/gas-policies/get-policy-stats) for a more detailed usage breakdown. +* Use [Get Sponsorships](/docs/admin-api/gas-policies/get-sponsorships) for a paginated history per policy including individual transaction spend. ## Next steps diff --git a/content/wallets/shared/infra/api-endpoints/gas-manager-policy.mdx b/content/wallets/shared/infra/api-endpoints/gas-manager-policy.mdx index bea264010..b6cdc69cb 100644 --- a/content/wallets/shared/infra/api-endpoints/gas-manager-policy.mdx +++ b/content/wallets/shared/infra/api-endpoints/gas-manager-policy.mdx @@ -4,11 +4,11 @@ The Gas Manager Admin APIs allow you to programmatically manage gas sponsorship | Method | Description | | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| [create-policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/create-policy) | Creates a new gas manager policy with the specified rules. | -| [get-policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy) | Returns a policy by id. | -| [replace-policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/replace-policy) | Replaces all rules in an existing policy by id. | -| [delete-policy](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/delete-policy) | Deletes a policy by id. | -| [get-all-policies](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-all-policies) | Returns all policies. The results are paginated. | -| [update-policy-status](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/update-policy-status) | Modifies the status of a policy to either “active” or “inactive”. | -| [get-policy-stats](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-policy-stats) | Returns stats about a policy specified by ID. | -| [get-sponsorships](/docs/wallets/api-reference/gas-manager-admin-api/admin-api-endpoints/get-sponsorships) | Returns a list of sponsorships associated with the specified policy ID. The results are paginated. | +| [create-policy](/docs/admin-api/gas-policies/create-policy) | Creates a new gas manager policy with the specified rules. | +| [get-policy](/docs/admin-api/gas-policies/get-policy) | Returns a policy by id. | +| [replace-policy](/docs/admin-api/gas-policies/replace-policy) | Replaces all rules in an existing policy by id. | +| [delete-policy](/docs/admin-api/gas-policies/delete-policy) | Deletes a policy by id. | +| [get-all-policies](/docs/admin-api/gas-policies/get-all-policies) | Returns all policies. The results are paginated. | +| [update-policy-status](/docs/admin-api/gas-policies/update-policy-status) | Modifies the status of a policy to either “active” or “inactive”. | +| [get-policy-stats](/docs/admin-api/gas-policies/get-policy-stats) | Returns stats about a policy specified by ID. | +| [get-sponsorships](/docs/admin-api/gas-policies/get-sponsorships) | Returns a list of sponsorships associated with the specified policy ID. The results are paginated. |