The Address Check API allows customers to check the validity of addresses using the addr_check method.

Endpoint and Authentication

URL: https://bingmail.com.au/apiv2/jsonrpc
HTTP verb: POST
Content-Type: application/json

Authenticate using either:

  • An API key using Bearer authentication.
  • A username and password using HTTP Basic authentication.

For authorisation and assistance obtaining credentials, please contact Bing Customer Service.

Always use HTTPS. Keep your credentials secure and do not include them in URLs, source code or shared examples. Use one authentication method per request.

API Key Authentication

Include your API key in the Authorization header:

Authorization: Bearer <your-api-key>
  Content-Type: application/json

Username and Password Authentication

Use HTTP Basic authentication with your username and password. Most HTTP clients, including cURL, can generate the required Authorization header automatically.

Query

Each address must contain between 3 and 6 components (lines). You can submit a single address or multiple addresses in one request.

Single Address as an Array of Strings

Provide each address component as a separate string:

{
    "jsonrpc": "2.0",
    "method": "addr_check",
    "id": 1,
    "params": {
      "address": [
        "Joe Blogs",
        "10 Jones St",
        "Smithville NSW 2987"
      ]
    }
  }

Single Address as a String with Newlines

Separate the address components using escaped newline characters (\n):

{
    "jsonrpc": "2.0",
    "method": "addr_check",
    "id": 1,
    "params": {
      "address": "Joe Blogs\n10 Jones St\nSmithville NSW 2987"
    }
  }

Single Address as a Comma-Separated String

Comma-separated addresses are supported but not recommended because commas within address data can be misinterpreted as component separators.

{
    "jsonrpc": "2.0",
    "method": "addr_check",
    "id": 1,
    "params": {
      "address": "Joe Blogs, 10 Jones St, Smithville NSW 2987"
    }
  }

Multiple Addresses

For multiple addresses, use the addresses parameter instead of address. Each entry can be an array of strings or a single string in one of the formats shown above.

{
    "jsonrpc": "2.0",
    "method": "addr_check",
    "id": 1,
    "params": {
      "addresses": [
        [
          "Joe Blogs",
          "10 Jones St",
          "Smithville NSW 2987"
        ],
        [
          "Jane Blogs",
          "20 Jones St",
          "Jonesville NSW 2987"
        ],
        "Steve Blogs, 30 Jones St, Jonesville NSW 2987",
        "Bob Blogs\n40 Jones Street\nJonesville NSW 2987"
      ]
    }
  }

Response

The response includes the submitted address and its status. When multiple addresses are submitted, results are returned in the same order as the addresses in the request.

The examples below illustrate the response format. The sample addresses and status values are illustrative.

Single Address Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "status": "unmatched",
      "nation": "AUS",
      "address": [
        "Joe Blogs",
        "10 Jones St",
        "Smithville NSW 2987"
      ]
    }
  }

Multiple Address Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      {
        "status": "matched",
        "nation": "AUS",
        "address": [
          "Joe Blogs",
          "10 Jones St",
          "Smithville NSW 2987"
        ]
      },
      {
        "status": "matched",
        "nation": "AUS",
        "address": [
          "Jane Blogs",
          "20 Jones St",
          "Jonesville NSW 2987"
        ]
      },
      {
        "status": "matched",
        "nation": "AUS",
        "address": "Steve Blogs, 30 Jones St, Jonesville NSW 2987"
      },
      {
        "status": "matched",
        "nation": "AUS",
        "address": "Bob Blogs\n40 Jones Street\nJonesville NSW 2987"
      }
    ]
  }

Status

The status field can contain one of the following values:

  • invalid
  • unmatched
  • matched
  • international

A result with an invalid status includes a message field suggesting what is wrong with the submitted address.

Using cURL

Save your JSON-RPC query in a file named query.json, then use either authentication method below.

API Key Authentication

This shell example reads your API key from the BING_API_KEY environment variable, which must already be set securely:

curl --request POST \
    --url "https://bingmail.com.au/apiv2/jsonrpc" \
    --header "Authorization: Bearer ${BING_API_KEY}" \
    --header "Content-Type: application/json" \
    --data-binary @query.json

Username and Password Authentication

This example reads your username from the BING_USERNAME environment variable and prompts you to enter your password:

curl --request POST \
    --url "https://bingmail.com.au/apiv2/jsonrpc" \
    --user "${BING_USERNAME}" \
    --header "Content-Type: application/json" \
    --data-binary @query.json

Support

For authorisation, credentials or assistance using this API, please contact Bing Customer Service.