API reference / Apps
Connect an app
Connects a service to this workspace with its API key, which Troopy checks with the service and stores sealed. Troopy only reads. GitHub connects from Settings instead: it installs Troopy's GitHub App on the repos you pick. For Stripe, use a restricted key (rk_live_ or rk_test_) with Read access to Customers, Subscriptions, Invoices and Charges. To have Troopy answer disputes, add Read and Write access to Disputes and Write access to Files: the evidence of a dispute is the one thing that Troopy writes in Stripe. For PostHog (US or EU cloud), use a personal API key (phx_) with Query read and Project read; send project when the key reaches more than one project. Connecting again replaces the key. Needs an owner or admin.
/api/v1/apps/{provider}Other ways to call it
troopy apps connectPath parameters
provider*enum<string>The app, like stripe
stripeposthoggithubnotionhunterlemonsqueezypolarpaddledodopaymentssearchconsolemetaadsgooglecalendargeminiopenaifalreplicate
Body
application/jsonkey*stringThe service's API key
At least 8 characters · At most 300 characters
projectintegerPostHog: the project's ID, when the key reaches more than one
scopestringLemon Squeezy: the ID of the store. Polar: the ID of the organization. Then Troopy reads only that one
modelstringAn image provider: the model that makes the pictures, when not its default
Response
200 · application/jsondata*object11 properties
provider*enum<string>The app, like stripe
stripeposthoggithubnotionhunterlemonsqueezypolarpaddledodopaymentssearchconsolemetaadsgooglecalendargeminiopenaifalreplicate
name*stringstatus*enum<string>connectednot_connected
mode*enum<string> | nullFor Stripe: whether the key reads test or live data
testlive
account*string | nullFor PostHog: the project it reads, like Viraloop (US). For an image provider: its model
pictures*booleanAn image provider: whether the workspace makes its pictures with this one
hint*string | nullThe key's last four characters
connectedBy*object | null3 properties
type*enum<string>personagentapi
id*stringname*stringconnectedAt*string | nulllastUsedAt*string | nullchoices*array<object> | nullWhat the connection can read, and what a person chose of it. Search Console has properties, and Meta Ads has ad accounts. null for the other services
3 properties
id*stringlabel*stringchosen*boolean