Agent API changelog

Changes to the agent API that callers need to act on, one entry per change, with the date each one opens and the date the old behaviour is removed.

This page lists the changes to the Horizon agent API (/api/v2/agent/*) that you may need to act on, newest first. Each change has one entry and one anchor, and a response whose Link header carries rel="deprecation" points at the entry it belongs to.

CRM canonical addresses

Contacts and companies move to the address keys the rest of Horizon uses, and country moves from a name to an ISO 3166-1 alpha-2 code. Both shapes are served side by side until the Sunset date, when the old keys are removed.

MilestoneISO 8601 (UTC)Date
Window opens: responses carry both shapes, with the headers below2026-11-16T00:00:00Z16 November 2026, 00:00 UTC
Sunset: the old keys are removed2027-01-15T00:00:00Z15 January 2027, 00:00 UTC

The Sunset date is 60 days after the opening date. It can move once, later and never earlier, and a move is announced in this entry and in the Sunset header.

Where it applies. Every agent payload that carries a contact or a company: the /agent/crm/contacts and /agent/crm/companies routes, and every deal or quote that embeds a contact or company.

Contact keys.

Deprecated keyReplacement
addressaddressLine1 and addressLine2
statestateProvince
country (a country name)countryCode (an ISO 3166-1 alpha-2 code)
  • city and postalCode keep their names and are not deprecated.
  • Responses also gain providerRef, latitude and longitude. They are read-only: a create or update that sends any of them is accepted and the values are ignored, so you can send back a contact exactly as you read it.
  • Create and update accept the deprecated keys, the replacements, or both.

Company keys.

Deprecated keyReplacement in a requestReplacement in a response
streetprimaryAddress.addressLine1 and primaryAddress.addressLine2primaryAddress and addresses[]
cityprimaryAddress.cityprimaryAddress and addresses[]
stateprimaryAddress.stateProvinceprimaryAddress and addresses[]
postalCodeprimaryAddress.postalCodeprimaryAddress and addresses[]
country (a country name)primaryAddress.countryCode (an ISO 3166-1 alpha-2 code)primaryAddress and addresses[]
address (JSON object)primaryAddressprimaryAddress and addresses[]
  • In a response, primaryAddress is the company’s primary address and addresses[] lists every address the company has. Each address object uses the canonical keys (addressLine1, addressLine2, city, stateProvince, postalCode, countryCode) and carries its id and addressType.
  • In a request, primaryAddress changes only the keys you send, and primaryAddress: null is the same as leaving it out. Its providerRef, latitude and longitude, and the whole of addresses[] with each address’s id and addressType, are read-only: sent in a request, they are accepted and ignored, so you can send back a company exactly as you read it. Any other unknown key inside primaryAddress is refused with 400 VALIDATION_ERROR.

Street lines. The deprecated address (contact) and street (company) hold both lines of the street joined by a line break. Sent in a request, blank lines are dropped, then the text before the first line break becomes addressLine1 and the rest becomes addressLine2.

Country. Until the window opens, country holds the text as it was entered, which is usually a country name and sometimes a code, such as United States or US. Its replacement, countryCode, holds an ISO 3166-1 alpha-2 code, such as US.

  • This changes what country returns. From the opening date, country holds the English name of the country in countryCode, such as United States, even where the stored text was US or USA. If your code compares country against a code, compare countryCode instead.
  • Where Horizon could not map the stored text to a code, countryCode is null and country holds the text as it was entered.
  • In a request, countryCode must be an ISO 3166-1 alpha-2 code; any other value is refused with 400. countryCode: null clears the country.

Sending both shapes. A request may carry a deprecated key and its replacement together. Where both name the same part of the address, the part takes the value they agree on, or the one that changes it. Two different changes to one part are refused with 422 ADDRESS_SHAPE_CONFLICT, and nothing is written.

  • Sending back a stale copy. If you send back a record you read earlier, with its updatedAt, and the record has changed since then, Horizon can no longer tell which shape holds your edit. When the two shapes disagree in such a request, it is refused with 409 ADDRESS_STALE and nothing is written: read the record again, or send only one address shape. A copy whose updatedAt is current, or whose two shapes agree, is written as usual.

Headers. While the window is open, every response from the routes above carries:

http
Deprecation: @1794787200
Sunset: Fri, 15 Jan 2027 00:00:00 GMT
Link: <https://docs.horizonplatform.ai/api/changelog/#crm-canonical-addresses>; rel="deprecation", <https://docs.horizonplatform.ai/api/changelog/#crm-canonical-addresses>; rel="sunset"
  • Deprecation (RFC 9745) marks the response as carrying deprecated fields. It does not mean the route is going away: the contacts and companies routes stay. Its value is the opening date in Unix seconds.
  • Sunset (RFC 8594) gives the date the deprecated keys are removed.
  • Both Link relations point at this entry.

At Sunset.

  • Responses stop carrying the deprecated keys.
  • A request that sends a deprecated key is refused with 400, and the error names the replacement. Until Sunset the old keys are accepted.
  • The Deprecation, Sunset and Link headers stop.

To migrate before 2027-01-15T00:00:00Z.

  • Read addresses from the replacement keys: addressLine1, addressLine2, stateProvince and countryCode on a contact, and primaryAddress or addresses[] on a company.
  • Write contact addresses with those keys, and company addresses with primaryAddress.
  • Send and expect ISO 3166-1 alpha-2 codes in countryCode, not country names.