Versioning

REST puts the version in the URL. WebSocket and webhooks use the same address for every version and pick the format per subscription. This page explains both, the status of each version, and what can change within v3.


How the version is chosen

ChannelWhere the version is setv3
RESTIn the pathhttps://api.finlight.me/v3/...
WebSocket (enriched and raw)payloadVersion in each subscribe message"payloadVersion": 3
Webhooks (enriched and raw)The payload format of each webhookv3 in the dashboard

All three channels send the same v3 article object. See The article object.


REST

The version is part of the path. v1, v2 and v3 routes live side by side on https://api.finlight.me:

https://api.finlight.me/v3/articles/search
https://api.finlight.me/v2/articles

A v3 route never answers in v2 form, and a v2 route never answers in v3 form. You can move one call at a time. The v3 routes are listed on REST Basics.


WebSocket

The WebSocket URL is the same for every version: wss://wss.finlight.me (and wss://wss.finlight.me/raw). You choose the format in the subscribe message you send after connecting.

Subscribe message

{
  "payloadVersion": 3,
  "query": "ticker:NVDA",
  "include": ["companies", "events"]
}
  • Only the JSON number 3 selects v3.
  • Anything else means v2, without an error: a missing payloadVersion, the string "3", 2 or 4. You then get v2 frames, which look different.
  • The version belongs to the subscription, not to the connection. A new subscribe message on the same connection sets it again.

The official clients always send the number 3. If you write your own client, check that your JSON encoder does not turn the number into a string. See Subscribe.


Webhooks

Each webhook has a payload format, v2 or v3. You choose it in the dashboard under Payload format. v2 is marked as deprecated there.

  • New webhooks should use v3.
  • An existing v2 webhook can be switched to v3 in the dashboard. Deliveries that are already waiting for a retry can still arrive in the old format for up to about 2 hours. See Webhooks overview & setup.
  • Webhooks created through the Zapier and Make integrations use v2.

Version status

VersionStatusWhat it means
v3CurrentAll new features arrive here: events, roles, relevance, source types, lookups.
v2DeprecatedStill available. It is frozen: no new fields or features, only fixes. It has no events, roles or relevance.
v1LegacyStill answers. Move to v3.

v1 and v2 keep their own response and error formats. To move a v2 integration, follow Migrate from v2 to v3.


Client library versions

The official client libraries have their own version numbers. A new major version of each library speaks API v3. The older major speaks v2 and gets no further releases.

LanguagePackageAPI v3API v2 (no further releases)
TypeScriptfinlight-client4.x3.x
Pythonfinlight-client3.x2.x
Gogithub.com/callbk/finlight-client-gov2.x (module path /v2)v1.x
.NETFinlight.Client2.x1.x
Javame.finlight:finlight-client1.x0.1.x
Rustfinlight-client0.2.x0.1.x
PHPfinlight/client2.x1.x
Rubyfinlight-client1.x0.x
  • New API fields and values arrive in compatible releases of the same major. You do not need a new major for them.
  • Pin the major in your package manager. A range such as ^3 (npm) or "0.1" (Cargo) stays on the old major. An open range such as * or >=3 can jump to a new major without warning, so avoid it.

See Client Libraries for install commands and requirements.


What can change within v3

finlight extends v3 over time without a new version number. Build your client so these changes do not break it:

  • New response fields. New keys can appear in any object, also at the top level of a response. Ignore keys you do not know. In Java and C#, configure your JSON mapper to ignore unknown properties.
  • New values in response lists. Fields such as sentiment.label, companies[].role, events[].type, events[].direction, events[].importance, source.type, categories, the WebSocket event names, the error code and the limitType of a 429 can get new values. Treat them as strings with known values, not as a closed enum. Handle an unknown value instead of failing.
  • New values in request fields. Request values are checked strictly. An unknown value, for example in eventTypes, gets a 400 that lists the allowedValues. When finlight adds a value, the server accepts it right away. The official clients do not block unknown values, so they work with new values before you update them.
  • Unknown request keys are dropped. A key the server does not know, for example a typo like limt, is ignored without an error, and the request still uses a credit. The official clients reject unknown keys before sending. If you call the API directly, check your key names.
  • New request keys. Client library releases add a new request key only after the server supports it. An older server would ignore it silently.
  • Opaque values. Do not parse the pagination cursor, the webhook eventId or the article id. Their format can change. Store and send them back as they are.