Keys

Update Details

Updates a key's settings and returns its private details. Only the fields you send change. A key on an unlimited plan ignores changes to datasets, daily_limit and monthly_limit.

put/keys/{key}/details

Request

  • Base URL: https://api.addresszen.com/v1
  • URL: https://api.addresszen.com/v1/keys/{key}/details
  • Auth: HTTP bearer

Path parameters

keystring required

API Key

The API Key to retrieve. Begins ak_.

Query parameters

user_tokenstring

Management Key

A secret key used to manage your account and API Keys. It was previously called the user token.

Your management key can be retrieved and managed from your accounts page.

Typically begins uk_.... Prefer the Authorization: Bearer uk_... header.

Request body

namestring

A name for the key

allowed_urlsstring[]

A list of allowed URLs. An empty list disables the check. Up to 10 allowed.

A request is allowed when its Origin or Referer header matches an entry. Use one of these formats:

  • https://www.example.com allows one site. Scheme and host must match
  • *.example.com allows the domain and all its subdomains

See Allowed URLs.

redact_daysinteger

Number of days to preserve personal data stored in your key usage history. Set to 0 to prevent personal data storage

ip_forwardingboolean

Accept IP addresses forwarded in the AZ-Source-IP header

Example request

{
  "name": "My API Key",
  "daily_limit": {
    "limit": 1000
  },
  "monthly_limit": {
    "limit": 10000
  },
  "individual_limit": {
    "limit": 30
  },
  "notifications": {
    "emails": [
      "person@example.com"
    ],
    "balance_threshold": 500
  },
  "datasets": {
    "usps": true,
    "hereap": true,
    "herehk": true,
    "herei": true,
    "herem": true,
    "heremea": true,
    "heremeas": true,
    "herena": true,
    "hereo": true,
    "heresa": true,
    "heret": true,
    "hereee": true,
    "herewe": true,
    "phone": true,
    "email": true,
    "gnaf": true,
    "kadaster": true,
    "kartverket": true,
    "sdfi": true,
    "cannar": true,
    "fodbosa": true,
    "mois": true,
    "upujp": true,
    "bev": true,
    "ban": true,
    "swt": true,
    "gbrcleanse": true,
    "uspscleanse": true
  }
}

Response

Success

code2000 required
message'Success' required

Example response

{
  "result": {
    "name": "My API Key",
    "contexts": [
      {
        "iso_3": "USA",
        "iso_2": "US",
        "description": "United States",
        "emoji": "🇺🇸",
        "rgeo": true
      }
    ],
    "lookups_remaining": 19889,
    "daily_limit": {
      "limit": 1000,
      "consumed": 288
    },
    "monthly_limit": {
      "limit": 10000,
      "consumed": 2500
    },
    "individual_limit": {
      "limit": 30
    },
    "notifications": {
      "emails": [
        "person@example.com"
      ],
      "balance_threshold": 500
    },
    "datasets": {
      "paf": true,
      "mr": true,
      "usps": true,
      "gnaf": true,
      "hereap": true,
      "herehk": true,
      "herei": true,
      "herem": true,
      "heremea": true,
      "heremeas": true,
      "herena": true,
      "hereo": true,
      "heresa": true,
      "heret": true,
      "hereee": true,
      "herewe": true,
      "phone": true,
      "email": true,
      "kartverket": true,
      "mois": true,
      "sdfi": true,
      "cannar": true,
      "fodbosa": true,
      "upujp": true,
      "bev": true,
      "ban": true,
      "swt": true,
      "gbrcleanse": true,
      "uspscleanse": true
    },
    "automated_topups": {
      "enabled": true
    },
    "current_purchases": [
      {
        "expires": "2022-01-06T11:41:27.092Z",
        "purchased": 20000,
        "consumed": 121
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.