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
| Channel | Where the version is set | v3 |
|---|---|---|
| REST | In the path | https://api.finlight.me/v3/... |
| WebSocket (enriched and raw) | payloadVersion in each subscribe message | "payloadVersion": 3 |
| Webhooks (enriched and raw) | The payload format of each webhook | v3 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
3selects v3. - Anything else means v2, without an error: a missing
payloadVersion, the string"3",2or4. 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
| Version | Status | What it means |
|---|---|---|
| v3 | Current | All new features arrive here: events, roles, relevance, source types, lookups. |
| v2 | Deprecated | Still available. It is frozen: no new fields or features, only fixes. It has no events, roles or relevance. |
| v1 | Legacy | Still 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.
| Language | Package | API v3 | API v2 (no further releases) |
|---|---|---|---|
| TypeScript | finlight-client | 4.x | 3.x |
| Python | finlight-client | 3.x | 2.x |
| Go | github.com/callbk/finlight-client-go | v2.x (module path /v2) | v1.x |
| .NET | Finlight.Client | 2.x | 1.x |
| Java | me.finlight:finlight-client | 1.x | 0.1.x |
| Rust | finlight-client | 0.2.x | 0.1.x |
| PHP | finlight/client | 2.x | 1.x |
| Ruby | finlight-client | 1.x | 0.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>=3can 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 WebSocketeventnames, the errorcodeand thelimitTypeof a429can 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 a400that lists theallowedValues. 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 webhookeventIdor the articleid. Their format can change. Store and send them back as they are.