# 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 |
| --- | --- | --- |
| countries | [Countries](../../coverage-resources/countries/country-object.html#country-object-v34) | Specifies the country for the address. |
| identities | [Identities](../identities/identity-object.html#identity-object-v34) | Specifies the identity for the address. |

## Examples

Simple Resource PatchInvalid country.id Input

[[DIDWW-API-EXAMPLE-START]]

http

```
POST /v3/addresses HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "type": "addresses",
    "attributes": {
      "city_name": "string",
      "postal_code": "string",
      "address": "string",
      "description": "string"
    },
    "relationships": {
      "identity": {
        "data": {
          "id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d",
          "type": "identities"
        }
      },
      "country": {
        "data": {
          "id": "38003e8b-cccc-41d4-b1a6-d1e6fddf2c0f",
          "type": "countries"
        }
      }
    }
  }
}
```

curl

```
curl -i -X POST https://api.didww.com/v3/addresses -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --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

```
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
    "data": {
        "id": "49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0",
        "type": "addresses",
        "attributes": {
            "city_name": "string",
            "postal_code": "string",
            "address": "string",
            "description": "string",
            "created_at": "2020-09-16T10:23:07.846Z",
            "verified": false,
            "external_reference_id": null
        },
        "relationships": {
            "identity": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/identity",
                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/identity"
                }
            },
            "country": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/country",
                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/country"
                }
            },
            "proofs": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/proofs",
                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/proofs"
                }
            },
            "area": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/area",
                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/area"
                }
            },
            "city": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/city",
                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/city"
                }
            }
        }
    },
    "meta": {
        "api_version": "2026-04-16"
    }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
POST /v3/addresses HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "type": "addresses",
    "attributes": {
      "city_name": "Vilnius",
      "postal_code": "LT80001",
      "address": "Street 1",
      "description": "yellow house"
    },
    "relationships": {
      "identity": {
        "data": {
          "id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d",
          "type": "identities"
        }
      },
      "country": {
        "data": {
          "id": "country_id_string",
          "type": "countries"
        }
      }
    }
  }
}
```

curl

```
curl -i -X POST https://api.didww.com/v3/addresses -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --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

```
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/vnd.api+json

{"errors": [{
   "title": "is invalid",
   "detail": "country - is invalid",
   "code": "100",
   "source": {"pointer": "/data/relationships/country"},
   "status": "422"
}]}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 422 | No | [Unprocessable Entity](../../../specification/errors/index.html#api-validation-error-object) |
| 401 | No | [Unauthorized](../../../configuration.html#api-key) |

On this page
