# Create Addresses

Creates an Address that can be assigned to an Identity.

## Request

HTTP Method: `POST`

URI Path: `/v3/addresses`

### Request Body Object Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| city\_name | `string` | Yes | City name of the address. |
| postal\_code | `string` | Yes | Postal code of the address. |
| address | `string` | Yes | Full address. |
| description | `string` | No | The description of the address. |
| external\_reference\_id | `string` | No | Optional identifier for the address in the customer's external system. Maximum length is 100 characters. |

### Request Body Object Relationships

| Title | Type | Description |
| --- | --- | --- |
| country | [Countries](../../coverage-resources/countries/country-object.html#country-object-v35) | Specifies the country for the address. |
| identity | [Identities](../identities/identity-object.html#identity-object-v35) | Specifies the identity for the address. |

## Examples

Create AddressInvalid country.id Input

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/addresses HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "addresses",
10    "attributes": {
11      "city_name": "string",
12      "postal_code": "string",
13      "address": "string",
14      "description": "string"
15    },
16    "relationships": {
17      "identity": {
18        "data": {
19          "id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d",
20          "type": "identities"
21        }
22      },
23      "country": {
24        "data": {
25          "id": "38003e8b-cccc-41d4-b1a6-d1e6fddf2c0f",
26          "type": "countries"
27        }
28      }
29    }
30  }
31}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/addresses -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"address": "string", "city_name": "string", "description": "string", "postal_code": "string"}, "relationships": {"country": {"data": {"id": "38003e8b-cccc-41d4-b1a6-d1e6fddf2c0f", "type": "countries"}}, "identity": {"data": {"id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d", "type": "identities"}}}, "type": "addresses"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "data": {
 6        "id": "49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0",
 7        "type": "addresses",
 8        "attributes": {
 9            "city_name": "string",
10            "postal_code": "string",
11            "address": "string",
12            "description": "string",
13            "created_at": "2020-09-16T10:23:07.846Z",
14            "verified": false,
15            "external_reference_id": null
16        },
17        "relationships": {
18            "identity": {
19                "links": {
20                    "self": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/identity",
21                    "related": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/identity"
22                }
23            },
24            "country": {
25                "links": {
26                    "self": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/country",
27                    "related": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/country"
28                }
29            },
30            "proofs": {
31                "links": {
32                    "self": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/proofs",
33                    "related": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/proofs"
34                }
35            },
36            "area": {
37                "links": {
38                    "self": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/area",
39                    "related": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/area"
40                }
41            },
42            "city": {
43                "links": {
44                    "self": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/city",
45                    "related": "https://api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/city"
46                }
47            }
48        }
49    },
50    "meta": {
51        "api_version": "2026-11-19"
52    }
53}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/addresses HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "addresses",
10    "attributes": {
11      "city_name": "Vilnius",
12      "postal_code": "LT80001",
13      "address": "Street 1",
14      "description": "yellow house"
15    },
16    "relationships": {
17      "identity": {
18        "data": {
19          "id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d",
20          "type": "identities"
21        }
22      },
23      "country": {
24        "data": {
25          "id": "country_id_string",
26          "type": "countries"
27        }
28      }
29    }
30  }
31}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/addresses -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"address": "Street 1", "city_name": "Vilnius", "description": "yellow house", "postal_code": "LT80001"}, "relationships": {"country": {"data": {"id": "country_id_string", "type": "countries"}}, "identity": {"data": {"id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d", "type": "identities"}}}, "type": "addresses"}}'
```

response

```
 1HTTP/1.1 422 Unprocessable Entity
 2Content-Type: application/vnd.api+json
 3
 4{"errors": [{
 5   "title": "is invalid",
 6   "detail": "country - is invalid",
 7   "code": "100",
 8   "source": {"pointer": "/data/relationships/country"},
 9   "status": "422"
10}]}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-bad-request). The body carries a member the API does not accept. |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 403 | No | The access token carries the `read` scope, which does not cover this method (title `Insufficient scope`). The response carries `WWW-Authenticate: Bearer error="insufficient_scope"`. See [Scopes](../../authentication.html#authentication-scopes-v35). |
| 422 | No | [Unprocessable Entity](../../../specification/errors/index.html#api-validation-error-object) |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
