Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
66108ba
feat(api): api update
stainless-app[bot] Jan 26, 2026
60a3e0c
feat(api): api update
stainless-app[bot] Oct 27, 2025
edfc07c
codegen metadata
stainless-app[bot] Oct 28, 2025
6385a1f
feat(api): api update
stainless-app[bot] Nov 3, 2025
e0f0106
codegen metadata
stainless-app[bot] Nov 4, 2025
03c7271
feat(api): update automated code reviewer selection
stainless-app[bot] Jan 26, 2026
f5c5bbc
feat(api): api update
stainless-app[bot] Nov 4, 2025
e4f5130
feat(api): api update
stainless-app[bot] Nov 9, 2025
0844ac5
fix(java): Resolve name collisions
stainless-app[bot] Nov 21, 2025
1ed52cf
feat(api): manual updates
stainless-app[bot] Nov 21, 2025
6708aac
feat(api): api update
stainless-app[bot] Nov 25, 2025
d81328e
codegen metadata
stainless-app[bot] Dec 1, 2025
da796cf
chore(internal): codegen related update
stainless-app[bot] Dec 5, 2025
fe9cc50
chore: elide duplicate aliases
stainless-app[bot] Dec 5, 2025
78d27b1
fix(mcp): correct code tool API endpoint
stainless-app[bot] Dec 5, 2025
a23c9b2
fix: rename param to avoid collision
stainless-app[bot] Dec 5, 2025
6753366
codegen metadata
stainless-app[bot] Dec 17, 2025
8064da5
codegen metadata
stainless-app[bot] Dec 17, 2025
21809e9
codegen metadata
stainless-app[bot] Dec 18, 2025
2e87c84
chore(internal): codegen related update
stainless-app[bot] Dec 18, 2025
294b3c4
codegen metadata
stainless-app[bot] Dec 19, 2025
97407f5
chore(internal): codegen related update
stainless-app[bot] Jan 5, 2026
0e69b17
feat(api): api update
stainless-app[bot] Jan 5, 2026
8d0c7b6
docs: prominently feature MCP server setup in root SDK readmes
stainless-app[bot] Jan 5, 2026
d869d30
feat(api): api update
stainless-app[bot] Jan 6, 2026
842d28f
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 16, 2026
5aba5fa
fix(docs): add missing pointer prefix to api.md return types
stainless-app[bot] Jan 16, 2026
4f6a61c
feat(api): add per endpoint security
stainless-app[bot] Jan 23, 2026
513bd70
chore(internal): codegen related update
stainless-app[bot] Jan 26, 2026
2a9c325
fix(tests): skip broken date validation test
stainless-app[bot] Jan 26, 2026
ad830d2
fix(docs): fix mcp installation instructions for remote servers
stainless-app[bot] Jan 28, 2026
ba1566a
release: 1.35.0
stainless-app[bot] Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup go
uses: actions/setup-go@v5
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/finch-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup go
uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.34.1"
".": "1.35.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 45
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-9c32d7e477bd1c441abd65db0dfe6220948aa00face05fc8b57395e368ee2099.yml
openapi_spec_hash: 3da940ffc5da8000a4f359c958ed341f
config_hash: 6d3585c0032e08d723d077d660fc8448
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-46f433f34d440aa1dfcc48cc8d822c598571b68be2f723ec99e1b4fba6c13b1e.yml
openapi_spec_hash: 5b5cd728776723ac773900f7e8a32c05
config_hash: ccdf6a5b4aaa2a0897c89ac8685d8eb0
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## 1.35.0 (2026-01-28)

Full Changelog: [v1.34.1...v1.35.0](https://github.com/Finch-API/finch-api-go/compare/v1.34.1...v1.35.0)

### Features

* **api:** add per endpoint security ([4f6a61c](https://github.com/Finch-API/finch-api-go/commit/4f6a61cb9e3290136a7c3d8564ebb4ce0b493c55))
* **api:** api update ([d869d30](https://github.com/Finch-API/finch-api-go/commit/d869d30065f591dea7781b6dc3124306e26e88fe))
* **api:** api update ([0e69b17](https://github.com/Finch-API/finch-api-go/commit/0e69b1715d0da0aaba88240f51dc8950bb893015))
* **api:** api update ([6708aac](https://github.com/Finch-API/finch-api-go/commit/6708aacc01982e5141ac1ca52412987994f3aecd))
* **api:** api update ([e4f5130](https://github.com/Finch-API/finch-api-go/commit/e4f5130e25eb506c09204f69d6085e9b243cfd76))
* **api:** api update ([f5c5bbc](https://github.com/Finch-API/finch-api-go/commit/f5c5bbcf3cf0d07df31e2330159de37d36e946f2))
* **api:** api update ([6385a1f](https://github.com/Finch-API/finch-api-go/commit/6385a1ff8de901c11dd7452adc89f44542144247))
* **api:** api update ([60a3e0c](https://github.com/Finch-API/finch-api-go/commit/60a3e0c4abdcac96bb7ca1a5ce64f99367fb5a12))
* **api:** api update ([66108ba](https://github.com/Finch-API/finch-api-go/commit/66108ba1d8a47acf7663432e1d9b5744800575e6))
* **api:** manual updates ([1ed52cf](https://github.com/Finch-API/finch-api-go/commit/1ed52cffc078b436f3899b736e5deb7e8cb5f703))
* **api:** update automated code reviewer selection ([03c7271](https://github.com/Finch-API/finch-api-go/commit/03c7271b89082892da533f8e9fb102ce18de39da))


### Bug Fixes

* **docs:** add missing pointer prefix to api.md return types ([5aba5fa](https://github.com/Finch-API/finch-api-go/commit/5aba5fa426a29a3084302bc382a7d15af2eb8bea))
* **docs:** fix mcp installation instructions for remote servers ([ad830d2](https://github.com/Finch-API/finch-api-go/commit/ad830d20499fffdd11c6b197f921177b4abd65f3))
* **java:** Resolve name collisions ([0844ac5](https://github.com/Finch-API/finch-api-go/commit/0844ac58ae69b2d0c1274bac8cf7c1ee0eb8e349))
* **mcp:** correct code tool API endpoint ([78d27b1](https://github.com/Finch-API/finch-api-go/commit/78d27b1c7b5a74781897a42d948994a923957e28))
* rename param to avoid collision ([a23c9b2](https://github.com/Finch-API/finch-api-go/commit/a23c9b2b69248225624750994cc66775535fe3f9))
* **tests:** skip broken date validation test ([2a9c325](https://github.com/Finch-API/finch-api-go/commit/2a9c325c2352c3b2cd113b412c621cf611cecd3a))


### Chores

* elide duplicate aliases ([fe9cc50](https://github.com/Finch-API/finch-api-go/commit/fe9cc50323a51a6caafe44cebf2628f3dd788c4a))
* **internal:** codegen related update ([513bd70](https://github.com/Finch-API/finch-api-go/commit/513bd70b2b8fa7d55c23e6ee3d80f025a47e96e9))
* **internal:** codegen related update ([97407f5](https://github.com/Finch-API/finch-api-go/commit/97407f552709b01565f5f627a182ac3bebbb2ed4))
* **internal:** codegen related update ([2e87c84](https://github.com/Finch-API/finch-api-go/commit/2e87c84e8db41801091a7d05df535abe45831140))
* **internal:** codegen related update ([da796cf](https://github.com/Finch-API/finch-api-go/commit/da796cf9a6f4f8bb56d92c6a13707a1eb3c8e762))
* **internal:** update `actions/checkout` version ([842d28f](https://github.com/Finch-API/finch-api-go/commit/842d28fa959584aef8f23bb9e7984295faf61980))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([8d0c7b6](https://github.com/Finch-API/finch-api-go/commit/8d0c7b66a2c2dc08f0d93b299416c76e7fc4dd90))

## 1.34.1 (2025-10-31)

Full Changelog: [v1.34.0...v1.34.1](https://github.com/Finch-API/finch-api-go/compare/v1.34.0...v1.34.1)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Finch
Copyright 2026 Finch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
84 changes: 82 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ from applications written in Go.

It is generated with [Stainless](https://www.stainless.com/).

## MCP Server

Use the Finch MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40tryfinch%2Ffinch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl0sImVudiI6eyJGSU5DSF9BQ0NFU1NfVE9LRU4iOiJNeSBBY2Nlc3MgVG9rZW4iLCJGSU5DSF9DTElFTlRfSUQiOiI0YWIxNWU1MS0xMWFkLTQ5ZjQtYWNhZS1mMzQzYjc3OTQzNzUiLCJGSU5DSF9DTElFTlRfU0VDUkVUIjoiTXkgQ2xpZW50IFNlY3JldCIsIkZJTkNIX1dFQkhPT0tfU0VDUkVUIjoiTXkgV2ViaG9vayBTZWNyZXQifX0)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40tryfinch%2Ffinch-api-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tryfinch%2Ffinch-api-mcp%22%5D%2C%22env%22%3A%7B%22FINCH_ACCESS_TOKEN%22%3A%22My%20Access%20Token%22%2C%22FINCH_CLIENT_ID%22%3A%224ab15e51-11ad-49f4-acae-f343b7794375%22%2C%22FINCH_CLIENT_SECRET%22%3A%22My%20Client%20Secret%22%2C%22FINCH_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

## Installation

<!-- x-release-please-start-version -->
Expand All @@ -24,7 +33,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/Finch-API/finch-api-go@v1.34.1'
go get -u 'github.com/Finch-API/finch-api-go@v1.35.0'
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -199,7 +208,7 @@ When the API returns a non-success status code, we return an error with type
To handle errors, we recommend that you use the `errors.As` pattern:

```go
_, err := client.HRIS.Company.Get(context.TODO())
_, err := client.HRIS.Company.Get(context.TODO(), finchgo.HRISCompanyGetParams{})
if err != nil {
var apierr *finchgo.Error
if errors.As(err, &apierr) {
Expand Down Expand Up @@ -267,6 +276,77 @@ client.HRIS.Directory.List(
)
```

### Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when
you need to examine response headers, status codes, or other details.

```go
// Create a variable to store the HTTP response
var response *http.Response
page, err := client.HRIS.Directory.List(
context.TODO(),
finchgo.HRISDirectoryListParams{},
option.WithResponseInto(&response),
)
if err != nil {
// handle error
}
fmt.Printf("%+v\n", page)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
```

### Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented
endpoints, params, or response properties, the library can still be used.

#### Undocumented endpoints

To make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.
`RequestOptions` on the client, such as retries, will be respected when making these requests.

```go
var (
// params can be an io.Reader, a []byte, an encoding/json serializable object,
// or a "…Params" struct defined in this library.
params map[string]interface{}

// result can be an []byte, *http.Response, a encoding/json deserializable object,
// or a model defined in this library.
result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
}
```

#### Undocumented request params

To make requests using undocumented parameters, you may use either the `option.WithQuerySet()`
or the `option.WithJSONSet()` methods.

```go
params := FooNewParams{
ID: finchgo.F("id_xxxx"),
Data: finchgo.F(FooNewParamsData{
FirstName: finchgo.F("John"),
}),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
```

#### Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string
with `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with
`result.JSON.Foo.Raw()`.

Any fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.

### Middleware

We provide `option.WithMiddleware` which applies the given
Expand Down
3 changes: 3 additions & 0 deletions accesstoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ type CreateAccessTokenResponse struct {
// - `provider` - connection to an external provider
// - `finch` - finch-generated data.
ConnectionType CreateAccessTokenResponseConnectionType `json:"connection_type,required"`
// An array of entity IDs that can be accessed with this access token
EntityIDs []string `json:"entity_ids,required" format:"uuid"`
// An array of the authorized products associated with the `access_token`
Products []string `json:"products,required"`
// The ID of the provider associated with the `access_token`
Expand Down Expand Up @@ -118,6 +120,7 @@ type createAccessTokenResponseJSON struct {
ClientType apijson.Field
ConnectionID apijson.Field
ConnectionType apijson.Field
EntityIDs apijson.Field
Products apijson.Field
ProviderID apijson.Field
TokenType apijson.Field
Expand Down
3 changes: 3 additions & 0 deletions accesstoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
)

func TestAccessTokenNewWithOptionalParams(t *testing.T) {
t.Skip("prism doesnt like the format for the API-Version header")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -24,6 +25,8 @@ func TestAccessTokenNewWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.AccessTokens.New(context.TODO(), finchgo.AccessTokenNewParams{
Code: finchgo.F("code"),
Expand Down
32 changes: 32 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ type Introspection struct {
// The name of your customer you provided to Finch when a connect session was
// created for this connection
CustomerName string `json:"customer_name,nullable"`
// Array of detailed entity information for each connected account in multi-account
// mode
Entities []IntrospectionEntity `json:"entities"`
// Whether the connection associated with the `access_token` uses the Assisted
// Connect Flow. (`true` if using Assisted Connect, `false` if connection is
// automated)
Expand Down Expand Up @@ -141,6 +144,7 @@ type introspectionJSON struct {
CustomerEmail apijson.Field
CustomerID apijson.Field
CustomerName apijson.Field
Entities apijson.Field
Manual apijson.Field
PayrollProviderID apijson.Field
Username apijson.Field
Expand Down Expand Up @@ -333,3 +337,31 @@ func init() {
},
)
}

type IntrospectionEntity struct {
// The connection account ID for this entity
ID string `json:"id,required" format:"uuid"`
// The name of the entity (payroll provider company name)
Name string `json:"name,required,nullable"`
// The source ID of the entity
SourceID string `json:"source_id,required,nullable"`
JSON introspectionEntityJSON `json:"-"`
}

// introspectionEntityJSON contains the JSON metadata for the struct
// [IntrospectionEntity]
type introspectionEntityJSON struct {
ID apijson.Field
Name apijson.Field
SourceID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *IntrospectionEntity) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r introspectionEntityJSON) RawJSON() string {
return r.raw
}
4 changes: 4 additions & 0 deletions account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ func TestAccountDisconnect(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.Account.Disconnect(context.TODO())
if err != nil {
Expand All @@ -46,6 +48,8 @@ func TestAccountIntrospect(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.Account.Introspect(context.TODO())
if err != nil {
Expand Down
Loading
Loading