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.
| Milestone | ISO 8601 (UTC) | Date |
|---|---|---|
| Window opens: responses carry both shapes, with the headers below | 2026-11-16T00:00:00Z | 16 November 2026, 00:00 UTC |
| Sunset: the old keys are removed | 2027-01-15T00:00:00Z | 15 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 key | Replacement |
|---|---|
address | addressLine1 and addressLine2 |
state | stateProvince |
country (a country name) | countryCode (an ISO 3166-1 alpha-2 code) |
cityandpostalCodekeep their names and are not deprecated.- Responses also gain
providerRef,latitudeandlongitude. 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 key | Replacement in a request | Replacement in a response |
|---|---|---|
street | primaryAddress.addressLine1 and primaryAddress.addressLine2 | primaryAddress and addresses[] |
city | primaryAddress.city | primaryAddress and addresses[] |
state | primaryAddress.stateProvince | primaryAddress and addresses[] |
postalCode | primaryAddress.postalCode | primaryAddress and addresses[] |
country (a country name) | primaryAddress.countryCode (an ISO 3166-1 alpha-2 code) | primaryAddress and addresses[] |
address (JSON object) | primaryAddress | primaryAddress and addresses[] |
- In a response,
primaryAddressis the company’s primary address andaddresses[]lists every address the company has. Each address object uses the canonical keys (addressLine1,addressLine2,city,stateProvince,postalCode,countryCode) and carries itsidandaddressType. - In a request,
primaryAddresschanges only the keys you send, andprimaryAddress: nullis the same as leaving it out. ItsproviderRef,latitudeandlongitude, and the whole ofaddresses[]with each address’sidandaddressType, 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 insideprimaryAddressis refused with400 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
countryreturns. From the opening date,countryholds the English name of the country incountryCode, such asUnited States, even where the stored text wasUSorUSA. If your code comparescountryagainst a code, comparecountryCodeinstead. - Where Horizon could not map the stored text to a code,
countryCodeisnullandcountryholds the text as it was entered. - In a request,
countryCodemust be an ISO 3166-1 alpha-2 code; any other value is refused with400.countryCode: nullclears 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 with409 ADDRESS_STALEand nothing is written: read the record again, or send only one address shape. A copy whoseupdatedAtis current, or whose two shapes agree, is written as usual.
Headers. While the window is open, every response from the routes above carries:
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
Linkrelations 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,SunsetandLinkheaders stop.
To migrate before 2027-01-15T00:00:00Z.
- Read addresses from the replacement keys:
addressLine1,addressLine2,stateProvinceandcountryCodeon a contact, andprimaryAddressoraddresses[]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.