CONNECT APP
Build with Bonusly
Human Resources
- API key
MCP
Give your agent Bonusly tools
Every Bonusly action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Bonusly account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "bonusly",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Get Company Participation Report:
const result = await mcp.callTool({
name: "bonusly-get-company-participation-report",
arguments: {
reportView: "Report View",
startDate: "Start Date",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "bonusly",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Get Company Participation Report:
result = await session.call_tool("bonusly-get-company-participation-report", {
"reportView": "Report View",
"startDate": "Start Date",
})API PROXY
Call the Bonusly API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Bonusly API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://bonus.ly/api/v1/users/me",
})
// Any allowed Bonusly endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://bonus.ly/api/v1/users/me
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9ib251cy5seS9hcGkvdjEvdXNlcnMvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Bonusly actions from your backend
Connect a user's Bonusly account once, then run Get Company Participation Report on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "bonusly-get-company-participation-report",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
bonusly: { authProvisionId: "apn_xxxxxxx" },
reportView: "Report View",
startDate: "Start Date",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="bonusly-get-company-participation-report",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"bonusly": {"authProvisionId": "apn_xxxxxxx"},
"reportView": "Report View",
"startDate": "Start Date",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "bonusly-get-company-participation-report",
"configured_props": {
"bonusly": { "authProvisionId": "apn_xxxxxxx" },
"reportView": "Report View",
"startDate": "Start Date"
}
}'TOOLS
Bonusly actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Get Company Participation Report
actionReturn company-level recognition participation analytics - giving/receiving rates by group (department, location, etc.) or by manager and team, for a given date range. See the documentationRead-onlyv0.0.2 -
Give Bonus
actionSend recognition (a bonus) to one or more colleagues on behalf of the authenticated caller. Do not include@mentionsor the point amount in thereasonyourself - Bonusly synthesizes those fromrecipientsandamountautomatically. See the documentationWritev0.0.2 -
List Departments
actionList the distinct departments configured for users in the authenticated caller's company, with a user count for each. Call this first to discover the exact department names accepted by List Users In Department, which matches exactly and returns nothing for a misspelled or differently-cased name. See the documentationRead-onlyv0.0.2 -
List Locations
actionList the distinct locations configured for users in the authenticated caller's company, with a user count for each. Call this first to discover the exact location names accepted by List Users In Location, which matches exactly and returns nothing for a misspelled or differently-cased name. See the documentationRead-onlyv0.0.2 -
List Reward Redemptions
actionReturn paginated reward redemption records for the caller's company, with optional filtering by user email, date range, and fulfillment status. This is a company-wide admin report, not just the caller's own redemptions. See the documentationRead-onlyv0.0.2 -
List Top-Level Users
actionList the users in the authenticated caller's company who have no manager - the roots of the org chart, typically executives. Use this to answer who sits at the top of the company, or as a starting point when you have no other identifier to work from. Takes no required input. See the documentationRead-onlyv0.0.2 -
List Users In Department
actionList the users in the authenticated caller's company who belong to a specific department. Use this to enumerate a department's roster - unlike Search Users, no search term is required, so it returns every member of the department. See the documentationRead-onlyv0.0.2 -
List Users In Location
actionList the users in the authenticated caller's company who belong to a specific location. Use this to enumerate a location's roster - unlike Search Users, no search term is required, so it returns everyone based at the location. See the documentationRead-onlyv0.0.2 -
Search Users
actionSearch users in the authenticated caller's company by name or email. This is a search, not a full company directory dump - aSearch Termis required and matches on name or email. To list users without a search term, use List Users In Department, List Users In Location, or List Top-Level Users instead. See the documentationRead-onlyv0.0.2
EVENTS
Bonusly triggers
Event sources your backend can deploy for users and receive through a webhook.
No Bonusly triggers are available yet.
- App slug
- bonusly
- Authentication
- API key
- Categories
- Human Resources
- Actions
- 9
- Triggers
- 0
- API proxy
- Available