---
title: Create Address Map
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Addressing](https://developers.cloudflare.com/api/python/resources/addressing)

[Address Maps](https://developers.cloudflare.com/api/python/resources/addressing/subresources/address_maps)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Create Address Map

addressing.address\_maps.create(AddressMapCreateParams\*\*kwargs) -> [AddressMapCreateResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/addressing/address\_maps

Create a new address map under the account.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Address Maps Write`

##### ParametersExpand Collapse

account\_id: str

Identifier of a Cloudflare account.

maxLength32

[Link to this property](<#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

description: Optional\[str]

An optional description field which may be used to describe the types of IPs or zones on the map.

[Link to this property](<#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20description%20%3E%20(schema)>)

enabled: Optional\[bool]

Whether the Address Map is enabled or not. Cloudflare’s DNS will not respond with IP addresses on an Address Map until the map is enabled.

[Link to this property](<#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20enabled%20%3E%20(schema)>)

ips: Optional\[Sequence\[str]]

[Link to this property](<#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20ips%20%3E%20(schema)>)

<details>

<summary>

memberships: Optional\[Iterable\[Membership]]

Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.

</summary>

identifier: Optional\[str]

The identifier for the membership (eg. a zone or account tag).

maxLength32

<a href="#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20memberships%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20identifier">Link to this property</a>

<details>

<summary>

kind: Optional\[<a href="https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.address_maps%20%3E%20(model)%20kind%20%3E%20(schema)">Kind</a>]

The type of the membership.

</summary>

One of the following:

"zone"

<a href="#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20memberships%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20kind%20%2B%20(resource)%20addressing.address_maps%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"account"

<a href="#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20memberships%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20kind%20%2B%20(resource)%20addressing.address_maps%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20memberships%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20kind">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.address_maps%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20memberships%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class AddressMapCreateResponse: …

</summary>

id: Optional\[str]

Identifier of an Address Map.

maxLength32

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

can\_delete: Optional\[bool]

If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20can_delete">Link to this property</a>

can\_modify\_ips: Optional\[bool]

If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20can_modify_ips">Link to this property</a>

created\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

default\_sni: Optional\[str]

If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20default_sni">Link to this property</a>

description: Optional\[str]

An optional description field which may be used to describe the types of IPs or zones on the map.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled: Optional\[bool]

Whether the Address Map is enabled or not. Cloudflare’s DNS will not respond with IP addresses on an Address Map until the map is enabled.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

ips: Optional\[IPs]

The set of IPs on the Address Map.

</summary>

created\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20ips%20%2B%20(resource)%20ips%20%3E%20(model)%20ips%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20created_at">Link to this property</a>

ip: Optional\[str]

An IPv4 or IPv6 address.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20ips%20%2B%20(resource)%20ips%20%3E%20(model)%20ips%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20ip">Link to this property</a>

</details>

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20ips">Link to this property</a>

<details>

<summary>

memberships: Optional\[List\[Membership]]

Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.

</summary>

can\_delete: Optional\[bool]

Controls whether the membership can be deleted via the API or not.

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships%20%3E%20(items)%20%3E%20(property)%20can_delete">Link to this property</a>

created\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships%20%3E%20(items)%20%3E%20(property)%20created_at">Link to this property</a>

identifier: Optional\[str]

The identifier for the membership (eg. a zone or account tag).

maxLength32

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships%20%3E%20(items)%20%3E%20(property)%20identifier">Link to this property</a>

<details>

<summary>

kind: Optional\[Kind]

The type of the membership.

</summary>

One of the following:

"zone"

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships%20%3E%20(items)%20%3E%20(property)%20kind%20%2B%20(resource)%20addressing.address_maps%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"account"

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships%20%3E%20(items)%20%3E%20(property)%20kind%20%2B%20(resource)%20addressing.address_maps%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships%20%3E%20(items)%20%3E%20(property)%20kind">Link to this property</a>

</details>

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20memberships">Link to this property</a>

modified\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.address_maps%20%3E%20(model)%20address_map_create_response%20%3E%20(schema)>)

### Create Address Map

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
address_map = client.addressing.address_maps.create(
    account_id="258def64c72dae45f3e4c8516e2111f2",
)
print(address_map.id)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "055817b111884e0227e1be16a0be6ee0",
    "can_delete": true,
    "can_modify_ips": true,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "default_sni": "*.example.com",
    "description": "My Ecommerce zones",
    "enabled": true,
    "ips": [
      {
        "created_at": "2014-01-01T05:20:00.12345Z",
        "ip": "192.0.2.1"
      }
    ],
    "memberships": [
      {
        "can_delete": true,
        "created_at": "2014-01-01T05:20:00.12345Z",
        "identifier": "023e105f4ecef8ad9ca31a8372d0c353",
        "kind": "zone"
      }
    ],
    "modified_at": "2014-01-01T05:20:00.12345Z"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "055817b111884e0227e1be16a0be6ee0",
    "can_delete": true,
    "can_modify_ips": true,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "default_sni": "*.example.com",
    "description": "My Ecommerce zones",
    "enabled": true,
    "ips": [
      {
        "created_at": "2014-01-01T05:20:00.12345Z",
        "ip": "192.0.2.1"
      }
    ],
    "memberships": [
      {
        "can_delete": true,
        "created_at": "2014-01-01T05:20:00.12345Z",
        "identifier": "023e105f4ecef8ad9ca31a8372d0c353",
        "kind": "zone"
      }
    ],
    "modified_at": "2014-01-01T05:20:00.12345Z"
  }
}
```