# Update app address allowlist

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

PUT https://admin-api.alchemy.com/v1/apps/{id}/address-allowlist

Replaces the address allowlist for an application, controlling which wallet addresses are permitted to interact with the app. The provided list fully replaces the existing allowlist.

Reference: https://www.alchemy.com/docs/tutorials/tools/admin-api/admin-api-endpoints/update-app-address-allowlist

## Headers

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Authorization | string | Yes | Bearer authentication token |

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes |  |

## Code Examples

### cURL

```bash
curl --request PUT \
  --url https://admin-api.alchemy.com/v1/apps/string/address-allowlist \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "addressAllowlist": [
    {
      "name": "Primary",
      "value": "0x0000000000000000000000000000000000000001"
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    addressAllowlist: [{name: 'Primary', value: '0x0000000000000000000000000000000000000001'}]
  })
};

fetch('https://admin-api.alchemy.com/v1/apps/string/address-allowlist', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://admin-api.alchemy.com/v1/apps/string/address-allowlist"

payload = { "addressAllowlist": [
        {
            "name": "Primary",
            "value": "0x0000000000000000000000000000000000000001"
        }
    ] }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://admin-api.alchemy.com/v1/apps/string/address-allowlist"

	payload := strings.NewReader("{\n  \"addressAllowlist\": [\n    {\n      \"name\": \"Primary\",\n      \"value\": \"0x0000000000000000000000000000000000000001\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.put("https://admin-api.alchemy.com/v1/apps/string/address-allowlist")
  .header("Content-Type", "application/json")
  .header("Authorization", "Bearer <token>")
  .body("{\n  \"addressAllowlist\": [\n    {\n      \"name\": \"Primary\",\n      \"value\": \"0x0000000000000000000000000000000000000001\"\n    }\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://admin-api.alchemy.com/v1/apps/string/address-allowlist");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n  \"addressAllowlist\": [\n    {\n      \"name\": \"Primary\",\n      \"value\": \"0x0000000000000000000000000000000000000001\"\n    }\n  ]\n}", false);
var response = await client.PutAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /v1/apps/{id}/address-allowlist
method: PUT
operation:
  operationId: UpdateAppAddressAllowlist
  responses:
    '200':
      description: Updated app address allowlist successfully
      content:
        application/json:
          schema:
            description: |-
              Standard API response wrapper.
              All API responses are wrapped in this format for consistency.
            properties:
              data:
                properties:
                  id:
                    type: string
                    description: App ID
                  name:
                    type: string
                    description: Display name
                  description:
                    type: string
                    description: Description
                  apiKey:
                    type: string
                    description: API key to access chain network
                  webhookApiKey:
                    type: string
                    description: API key used to access webhook's management API
                  chainNetworks:
                    items:
                      properties:
                        name:
                          type: string
                          description: Display name
                        id:
                          type: string
                          description: Alchemy chain network id in the form of `{chain}_{network}` (e.g. `ETH_MAINNET`)
                        networkChainId:
                          type: string
                          nullable: true
                          description: EIP-155 network chain id when available. Null for non-EVM chains.
                        rpcUrl:
                          type: string
                          description: HTTPS RPC endpoint
                        wsUrl:
                          type: string
                          description: WebSocket endpoint
                        grpcUrl:
                          type: string
                          description: gRPC endpoint (when available, e.g. Solana)
                      required:
                        - name
                        - id
                        - rpcUrl
                      type: object
                      additionalProperties: false
                    type: array
                    description: Networks configured for this app
                  products:
                    items:
                      enum:
                        - node-api
                        - nft-api
                        - swaps-api
                        - block-timestamp-api
                        - token-api
                        - transfers-api
                        - bundler-api
                        - debug-api
                        - embedded-accounts
                        - gas-manager-api
                        - trace-api
                        - prices-api
                        - transaction-simulation-api
                        - transaction-receipts-api
                        - user-operations-api
                        - smart-websockets
                        - webhooks
                        - grpc
                      type: string
                    type: array
                    description: Products enabled for this app
                  addressAllowlist:
                    items:
                      properties:
                        name:
                          type: string
                          description: Label for the allowlist entry.
                          example: Primary
                        value:
                          type: string
                          description: Wallet address value.
                          example: '0x0000000000000000000000000000000000000001'
                      required:
                        - value
                      type: object
                      additionalProperties: false
                    type: array
                    description: Address allowlist entries for this app
                  originAllowlist:
                    items:
                      properties:
                        name:
                          type: string
                          description: Label for the allowlist entry.
                          example: Primary
                        value:
                          type: string
                          description: Origin value. Accepts full URLs or bare domains.
                          example: https://example.com
                      required:
                        - value
                      type: object
                      additionalProperties: false
                    type: array
                    description: Origin allowlist entries for this app
                  ipAllowlist:
                    items:
                      properties:
                        name:
                          type: string
                          description: Label for the allowlist entry.
                          example: Office
                        value:
                          type: string
                          description: IP address or CIDR range.
                          example: 203.0.113.1
                      required:
                        - value
                      type: object
                      additionalProperties: false
                    type: array
                    description: IP allowlist entries for this app
                  createdAt:
                    type: string
                    description: Creation timestamp (ISO 8601)
                required:
                  - id
                  - name
                  - apiKey
                  - webhookApiKey
                  - chainNetworks
                  - products
                  - addressAllowlist
                  - originAllowlist
                  - ipAllowlist
                  - createdAt
                type: object
                additionalProperties: false
            required:
              - data
            type: object
            additionalProperties: false
    '400':
      description: Invalid input
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 400
                  status: 400
                  message: Invalid input
    '401':
      description: Requires authentication
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 401
                  status: 401
                  message: Requires authentication
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 403
                  status: 403
                  message: Forbidden
    '404':
      description: App not found
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 404
                  status: 404
                  message: App not found
  description: Replaces the address allowlist for an application, controlling which wallet addresses are permitted to interact with the app. The provided list fully replaces the existing allowlist.
  summary: Update app address allowlist
  security:
    - api_key:
        - ADMIN_APPS_READ_WRITE
    - user_auth:
        - developer
        - admin
  parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
  requestBody:
    required: true
    content:
      application/json:
        schema:
          properties:
            addressAllowlist:
              items:
                properties:
                  name:
                    type: string
                    description: Label for the allowlist entry.
                    example: Primary
                  value:
                    type: string
                    description: Wallet address value.
                    example: '0x0000000000000000000000000000000000000001'
                required:
                  - value
                type: object
                additionalProperties: false
              type: array
              description: Updated address allowlist.
          required:
            - addressAllowlist
          type: object
          additionalProperties: false
```
