> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create addresses

> Learn how to create a new address on your account. Optionally, you can look up the addresses for a given UK postcode to check that your details are co

Learn how to create a new address on your account. Optionally, you can look up the addresses for a given UK postcode to check that your details are correct before you do so.

## Create an address

<Note>
  **POST** `/v2/addresses?accountId={accountId}`
</Note>

### Request

Use this request to create a new address.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/addresses?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "type": "office",
      "nickName": "Head Office",
      "addressLine1": "Great Building",
      "addressLine2": "4 Maple Street",
      "addressLine3": "Southwark",
      "addressContact": "Jane Doe",
      "city": "London",
      "postcode": "SE13UB",
      "country": "England"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/addresses?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "type": "string",
      "nickName": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "addressLine3": "string",
      "addressContact": "string",
      "city": "string",
      "postcode": "string",
      "country": "string"
    }'
  ```
</CodeGroup>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to create an address for.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="type" type="string" required>
  The address type. This can be anything except `registered`.

  Allowable values: A valid string
</ParamField>

<ParamField body="nickName" type="string or null">
  The nickname of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressLine1" type="string" required>
  The first line of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressLine2" type="string or null">
  The second line of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressLine3" type="string or null">
  The third line of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressContact" type="string or null">
  The name of the contact associated with the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="city" type="string" required>
  The city of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="postcode" type="string" required>
  The postal or ZIP code of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="country" type="string" required>
  The country of the address.

  Allowable values: ≤ 256 characters
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing details about your newly-created address. This includes the `id` which you can provide when [converting a card](/pages/cards/order-physical-cards).

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "55ddc56e-f605-49c6-9862-0e8b55fa368f",
    "type": "office",
    "nickName": "Head Office",
    "addressLine1": "Great Building",
    "addressLine2": "4 Maple Street",
    "addressLine3": "Southwark",
    "addressContact": "Jane Doe",
    "city": "London",
    "postcode": "SE13UB",
    "country": "England"
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "type": "string",
    "nickName": "string",
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "addressContact": "string",
    "city": "string",
    "postcode": "string",
    "country": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/addresses/create-an-address).

## Look up an address

<Note>
  **GET** `/v2/addresses/lookup`
</Note>

### Request

Use this request get a list of all addresses for a given UK postcode (5-7 alphanumeric characters). You can use this to confirm that an address exists before adding it to your account.

<Info>
  By default, this endpoint isn't enabled. If you'd like to use it, please ask your account manager.
</Info>

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/addresses/lookup?postcode=SE13UB' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/addresses/lookup?postcode={postcode}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

#### Query parameters

<ParamField body="postcode" type="string" required>
  The UK postcode that you want to retrieve addresses for.

  Allowable values: 5-7 characters
</ParamField>

### Response

If your request is successful, you'll receive a `200` response.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "data": [
      {
        "id": "55ddc56e-f605-49c6-9862-0e8b55fa368f",
        "type": "office",
        "nickName": "Head Office",
        "addressLine1": "Great Building",
        "addressLine2": "4 Maple Street",
        "addressLine3": "Southwark",
        "addressContact": "Jane Doe",
        "city": "London",
        "postcode": "SE13UB",
        "country": "England",
        "createdAt": "2022-01-30T08:30:00Z",
        "updatedAt": "2022-01-30T08:30:00Z"
      }
    ]
  }
  ```

  ```json Response structure theme={null}
  {
    "data": [
      {
        "id": "string",
        "type": "string",
        "nickName": "string",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "addressContact": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "createdAt": "string",
        "updatedAt": "string"
      }
    ]
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/address-lookup/look-up-an-address).
