diff --git a/admin-api/authentication.mdx b/admin-api/authentication.mdx new file mode 100644 index 0000000..9fc846d --- /dev/null +++ b/admin-api/authentication.mdx @@ -0,0 +1,15 @@ +--- +title: Authentication +description: Integrate securely with the API using account-level API keys + transmitted in the `X-API-KEY` header. +og:description: Integrate securely with the Trophy API using account-level API + keys transmitted in the `X-API-KEY` header. +icon: key +--- + +The Trophy Admin API is authenticated using the same API keys as the [Application API](/api-reference/authentication). + +## Get Support {#get-support} + +Want to get in touch with the Trophy team? Reach out to us via [email](mailto:support@trophy.so). We're here to help! + diff --git a/admin-api/client-libraries.mdx b/admin-api/client-libraries.mdx new file mode 100644 index 0000000..e038f08 --- /dev/null +++ b/admin-api/client-libraries.mdx @@ -0,0 +1,36 @@ +--- +title: Client Libraries +description: Use Trophy's type-safe SDKs to integrate with the API. +og:description: Use Trophy's type-safe SDKs to integrate with the API and start + building gamified product experiences. +icon: code-xml +--- + +The Trophy Admin API is available in the same SDKs as the [Application API](/api-reference/client-libraries), under the `trophy.admin` namespace. + +For example in NodeJs you can use the following code to create a points boost through the `admin` namespace: + +```javascript Admin API Usage +import { TrophyApiClient } from '@trophyso/node'; + +const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' +}); + +const response = await trophy.admin.points.boosts.create({ + systemKey: 'xp', + boosts: [ + { + userId: 'user-123', + name: 'Double XP Weekend', + start: '2024-01-01', + end: '2024-01-03', + multiplier: 2 + } + ] +}); +``` + +## Get Support {#get-support} + +Want to get in touch with the Trophy team? Reach out to us via [email](mailto:support@trophy.so). We're here to help! diff --git a/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx b/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx index 3746a50..84dd971 100644 --- a/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx +++ b/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx @@ -1,6 +1,6 @@ --- title: Create attributes in bulk -openapi: openapi.yml post /attributes +openapi: openapi/admin.yml post /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx b/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx index ba55ce7..40e9e44 100644 --- a/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx +++ b/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx @@ -1,6 +1,6 @@ --- title: Delete attributes in bulk -openapi: openapi.yml delete /attributes +openapi: openapi/admin.yml delete /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/attributes/get-an-attribute.mdx b/admin-api/endpoints/attributes/get-an-attribute.mdx index 3697d29..64d4e18 100644 --- a/admin-api/endpoints/attributes/get-an-attribute.mdx +++ b/admin-api/endpoints/attributes/get-an-attribute.mdx @@ -1,6 +1,6 @@ --- title: Get an attribute -openapi: openapi.yml get /attributes/{id} +openapi: openapi/admin.yml get /attributes/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/attributes/list-attributes.mdx b/admin-api/endpoints/attributes/list-attributes.mdx index e3edfdf..d4a97ba 100644 --- a/admin-api/endpoints/attributes/list-attributes.mdx +++ b/admin-api/endpoints/attributes/list-attributes.mdx @@ -1,6 +1,6 @@ --- title: List attributes -openapi: openapi.yml get /attributes +openapi: openapi/admin.yml get /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx b/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx index 6b647ae..e885016 100644 --- a/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx +++ b/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx @@ -1,6 +1,6 @@ --- title: Update attributes in bulk -openapi: openapi.yml patch /attributes +openapi: openapi/admin.yml patch /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/leaderboards/create-leaderboards-in-bulk.mdx b/admin-api/endpoints/leaderboards/create-leaderboards-in-bulk.mdx new file mode 100644 index 0000000..1cca602 --- /dev/null +++ b/admin-api/endpoints/leaderboards/create-leaderboards-in-bulk.mdx @@ -0,0 +1,10 @@ +--- +title: Create leaderboards in bulk +openapi: openapi/admin.yml post /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk.mdx b/admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk.mdx new file mode 100644 index 0000000..5f8c0cd --- /dev/null +++ b/admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk.mdx @@ -0,0 +1,10 @@ +--- +title: Delete leaderboards in bulk +openapi: openapi/admin.yml delete /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/endpoints/leaderboards/get-a-leaderboard.mdx b/admin-api/endpoints/leaderboards/get-a-leaderboard.mdx new file mode 100644 index 0000000..7e10591 --- /dev/null +++ b/admin-api/endpoints/leaderboards/get-a-leaderboard.mdx @@ -0,0 +1,10 @@ +--- +title: Get a leaderboard +openapi: openapi/admin.yml get /leaderboards/{id} +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/endpoints/leaderboards/list-leaderboards.mdx b/admin-api/endpoints/leaderboards/list-leaderboards.mdx new file mode 100644 index 0000000..4f909a4 --- /dev/null +++ b/admin-api/endpoints/leaderboards/list-leaderboards.mdx @@ -0,0 +1,10 @@ +--- +title: List leaderboards +openapi: openapi/admin.yml get /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/endpoints/leaderboards/update-leaderboards-in-bulk.mdx b/admin-api/endpoints/leaderboards/update-leaderboards-in-bulk.mdx new file mode 100644 index 0000000..2657e0d --- /dev/null +++ b/admin-api/endpoints/leaderboards/update-leaderboards-in-bulk.mdx @@ -0,0 +1,10 @@ +--- +title: Update leaderboards in bulk +openapi: openapi/admin.yml patch /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx b/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx index fef87a8..fac044b 100644 --- a/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx +++ b/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx @@ -1,6 +1,6 @@ --- title: Create metrics in bulk -openapi: openapi.yml post /metrics +openapi: openapi/admin.yml post /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx b/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx index bc3bbc3..51374fb 100644 --- a/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx +++ b/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx @@ -1,6 +1,6 @@ --- title: Delete metrics in bulk -openapi: openapi.yml delete /metrics +openapi: openapi/admin.yml delete /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/metrics/get-a-metric-by-id.mdx b/admin-api/endpoints/metrics/get-a-metric-by-id.mdx index fc1bf5f..b45a150 100644 --- a/admin-api/endpoints/metrics/get-a-metric-by-id.mdx +++ b/admin-api/endpoints/metrics/get-a-metric-by-id.mdx @@ -1,6 +1,6 @@ --- title: Get a metric by ID -openapi: openapi.yml get /metrics/{id} +openapi: openapi/admin.yml get /metrics/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/metrics/list-metrics.mdx b/admin-api/endpoints/metrics/list-metrics.mdx index 1c605dc..9aa9977 100644 --- a/admin-api/endpoints/metrics/list-metrics.mdx +++ b/admin-api/endpoints/metrics/list-metrics.mdx @@ -1,6 +1,6 @@ --- title: List metrics -openapi: openapi.yml get /metrics +openapi: openapi/admin.yml get /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx b/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx index 9a869ed..a1c0b3f 100644 --- a/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx +++ b/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx @@ -1,6 +1,6 @@ --- title: Update metrics in bulk -openapi: openapi.yml patch /metrics +openapi: openapi/admin.yml patch /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/points/archive-boosts-batch.mdx b/admin-api/endpoints/points/archive-boosts-batch.mdx index d41344a..56e7c72 100644 --- a/admin-api/endpoints/points/archive-boosts-batch.mdx +++ b/admin-api/endpoints/points/archive-boosts-batch.mdx @@ -1,6 +1,6 @@ --- title: Delete multiple points boosts -openapi: openapi.yml delete /points/boosts +openapi: openapi/admin.yml delete /points/boosts --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/points/create-boosts.mdx b/admin-api/endpoints/points/create-boosts.mdx index 29a17b1..0c5be1d 100644 --- a/admin-api/endpoints/points/create-boosts.mdx +++ b/admin-api/endpoints/points/create-boosts.mdx @@ -1,6 +1,6 @@ --- title: Create points boosts for multiple users -openapi: openapi.yml post /points/boosts +openapi: openapi/admin.yml post /points/boosts --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/streaks/grant-freezes.mdx b/admin-api/endpoints/streaks/grant-freezes.mdx index 92a7398..5d3822b 100644 --- a/admin-api/endpoints/streaks/grant-freezes.mdx +++ b/admin-api/endpoints/streaks/grant-freezes.mdx @@ -1,6 +1,6 @@ --- title: Create streak freezes for multiple users -openapi: openapi.yml post /streaks/freezes +openapi: openapi/admin.yml post /streaks/freezes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/endpoints/streaks/restore-streaks.mdx b/admin-api/endpoints/streaks/restore-streaks.mdx index 79fef52..a1d5d09 100644 --- a/admin-api/endpoints/streaks/restore-streaks.mdx +++ b/admin-api/endpoints/streaks/restore-streaks.mdx @@ -1,6 +1,6 @@ --- title: Restore streaks for multiple users -openapi: openapi.yml post /streaks/restore +openapi: openapi/admin.yml post /streaks/restore --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/admin-api/introduction.mdx b/admin-api/introduction.mdx index 0b617ed..fdaa47e 100644 --- a/admin-api/introduction.mdx +++ b/admin-api/introduction.mdx @@ -16,6 +16,26 @@ The Admin API is accessible through **the same SDKs** as the Application API or, https://admin.trophy.so/v1 ``` +## Get Started {#get-started} + +Learn more about how to integrate with the Trophy Admin API below. + + + + Securely integrate your applications with the Trophy Admin API. + + + Learn about the Trophy Admin API and request rate limiting. + + + Use Trophy’s type-safe SDKs to integrate with the Admin API. + + + Have a use case you think you need an admin API for? [Tell us about it](mailto:support@trophy.so) and we'll build it! diff --git a/admin-api/rate-limiting.mdx b/admin-api/rate-limiting.mdx new file mode 100644 index 0000000..7c800f6 --- /dev/null +++ b/admin-api/rate-limiting.mdx @@ -0,0 +1,19 @@ +--- +title: Rate Limiting +description: Learn about the Trophy API and request rate limiting. +og:description: Learn about the Trophy API and request rate limiting. +icon: circle-gauge +--- + +import { RateLimitBadge } from "../components/rate-limit-badge.jsx"; + +All admin API endpoints are rate limited according to of the application API's [rate limiting](/api-reference/rate-limiting) model. + + + If you feel you need a higher rate limit, then please [contact + us](mailto:support@trophy.so) and we'll be happy to discuss your needs. + + +## Get Support {#get-support} + +Want to get in touch with the Trophy team? Reach out to us via [email](mailto:support@trophy.so). We're here to help! diff --git a/api-reference/endpoints/achievements/all-achievements.mdx b/api-reference/endpoints/achievements/all-achievements.mdx index cee5461..81fa0d1 100644 --- a/api-reference/endpoints/achievements/all-achievements.mdx +++ b/api-reference/endpoints/achievements/all-achievements.mdx @@ -1,6 +1,6 @@ --- title: Get all achievements and their completion stats -openapi: openapi.yml get /achievements +openapi: openapi/application.yml get /achievements --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx b/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx index 91a27da..1d4cb3c 100644 --- a/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx +++ b/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx @@ -1,6 +1,6 @@ --- title: Mark an achievement as completed -openapi: openapi.yml post /achievements/{key}/complete +openapi: openapi/application.yml post /achievements/{key}/complete --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx b/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx index b68365d..d29e096 100644 --- a/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx +++ b/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx @@ -1,6 +1,6 @@ --- title: Get all leaderboards -openapi: openapi.yml get /leaderboards +openapi: openapi/application.yml get /leaderboards --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/leaderboards/get-leaderboard.mdx b/api-reference/endpoints/leaderboards/get-leaderboard.mdx index 8bb9b92..adca376 100644 --- a/api-reference/endpoints/leaderboards/get-leaderboard.mdx +++ b/api-reference/endpoints/leaderboards/get-leaderboard.mdx @@ -1,6 +1,6 @@ --- title: Get a single leaderboard -openapi: openapi.yml get /leaderboards/{key} +openapi: openapi/application.yml get /leaderboards/{key} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/metrics/send-a-metric-change-event.mdx b/api-reference/endpoints/metrics/send-a-metric-change-event.mdx index aa3d61e..0da4777 100644 --- a/api-reference/endpoints/metrics/send-a-metric-change-event.mdx +++ b/api-reference/endpoints/metrics/send-a-metric-change-event.mdx @@ -1,6 +1,6 @@ --- title: Send a metric change event -openapi: openapi.yml post /metrics/{key}/event +openapi: openapi/application.yml post /metrics/{key}/event --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/points/get-points-boosts.mdx b/api-reference/endpoints/points/get-points-boosts.mdx index 45fd675..a1685f8 100644 --- a/api-reference/endpoints/points/get-points-boosts.mdx +++ b/api-reference/endpoints/points/get-points-boosts.mdx @@ -1,6 +1,6 @@ --- title: Get boosts for a points system -openapi: openapi.yml get /points/{key}/boosts +openapi: openapi/application.yml get /points/{key}/boosts --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/points/get-points-level-summary.mdx b/api-reference/endpoints/points/get-points-level-summary.mdx index 3405dca..e283c6c 100644 --- a/api-reference/endpoints/points/get-points-level-summary.mdx +++ b/api-reference/endpoints/points/get-points-level-summary.mdx @@ -1,6 +1,6 @@ --- title: Get level summary for a points system -openapi: openapi.yml get /points/{key}/level-summary +openapi: openapi/application.yml get /points/{key}/level-summary --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/points/get-points-levels.mdx b/api-reference/endpoints/points/get-points-levels.mdx index 94ae83e..195949e 100644 --- a/api-reference/endpoints/points/get-points-levels.mdx +++ b/api-reference/endpoints/points/get-points-levels.mdx @@ -1,6 +1,6 @@ --- title: Get levels for a points system -openapi: openapi.yml get /points/{key}/levels +openapi: openapi/application.yml get /points/{key}/levels --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/points/get-points-summary.mdx b/api-reference/endpoints/points/get-points-summary.mdx index 8dea737..c64dc24 100644 --- a/api-reference/endpoints/points/get-points-summary.mdx +++ b/api-reference/endpoints/points/get-points-summary.mdx @@ -1,6 +1,6 @@ --- title: Get a breakdown of users by points -openapi: openapi.yml get /points/{key}/summary +openapi: openapi/application.yml get /points/{key}/summary --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/points/get-points.mdx b/api-reference/endpoints/points/get-points.mdx index 1628566..283d7bc 100644 --- a/api-reference/endpoints/points/get-points.mdx +++ b/api-reference/endpoints/points/get-points.mdx @@ -1,6 +1,6 @@ --- title: Get a points system with its triggers -openapi: openapi.yml get /points/{key} +openapi: openapi/application.yml get /points/{key} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/streaks/get-streak-rankings.mdx b/api-reference/endpoints/streaks/get-streak-rankings.mdx index 593b2e8..c1d737b 100644 --- a/api-reference/endpoints/streaks/get-streak-rankings.mdx +++ b/api-reference/endpoints/streaks/get-streak-rankings.mdx @@ -1,6 +1,6 @@ --- title: Get top users by streak length -openapi: openapi.yml get /streaks/rankings +openapi: openapi/application.yml get /streaks/rankings --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/streaks/get-streaks.mdx b/api-reference/endpoints/streaks/get-streaks.mdx index 43f27b3..56aea17 100644 --- a/api-reference/endpoints/streaks/get-streaks.mdx +++ b/api-reference/endpoints/streaks/get-streaks.mdx @@ -1,6 +1,6 @@ --- title: Get the streak lengths of a list of users -openapi: openapi.yml get /streaks +openapi: openapi/application.yml get /streaks --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/create-a-user.mdx b/api-reference/endpoints/users/create-a-user.mdx index ed42782..a96eaea 100644 --- a/api-reference/endpoints/users/create-a-user.mdx +++ b/api-reference/endpoints/users/create-a-user.mdx @@ -1,6 +1,6 @@ --- title: Create a new user -openapi: openapi.yml post /users +openapi: openapi/application.yml post /users --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx b/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx index 4034b4a..2ca1fd2 100644 --- a/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx +++ b/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx @@ -1,6 +1,6 @@ --- title: Get a summary of metric events over time -openapi: openapi.yml get /users/{id}/metrics/{key}/event-summary +openapi: openapi/application.yml get /users/{id}/metrics/{key}/event-summary --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx b/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx index 4e7121b..29dfc2f 100644 --- a/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx +++ b/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx @@ -1,6 +1,6 @@ --- title: Get a single metric for a user -openapi: openapi.yml get /users/{id}/metrics/{key} +openapi: openapi/application.yml get /users/{id}/metrics/{key} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-single-user.mdx b/api-reference/endpoints/users/get-a-single-user.mdx index bf3ac3e..5a52e06 100644 --- a/api-reference/endpoints/users/get-a-single-user.mdx +++ b/api-reference/endpoints/users/get-a-single-user.mdx @@ -1,6 +1,6 @@ --- title: Get a single user -openapi: openapi.yml get /users/{id} +openapi: openapi/application.yml get /users/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-completed-achievements.mdx b/api-reference/endpoints/users/get-a-users-completed-achievements.mdx index 200e4dd..408514e 100644 --- a/api-reference/endpoints/users/get-a-users-completed-achievements.mdx +++ b/api-reference/endpoints/users/get-a-users-completed-achievements.mdx @@ -1,6 +1,6 @@ --- title: Get a user's achievements -openapi: openapi.yml get /users/{id}/achievements +openapi: openapi/application.yml get /users/{id}/achievements --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-leaderboard.mdx b/api-reference/endpoints/users/get-a-users-leaderboard.mdx index 3565749..535e56b 100644 --- a/api-reference/endpoints/users/get-a-users-leaderboard.mdx +++ b/api-reference/endpoints/users/get-a-users-leaderboard.mdx @@ -1,6 +1,6 @@ --- title: Get a user's leaderboard data -openapi: openapi.yml get /users/{id}/leaderboards/{key} +openapi: openapi/application.yml get /users/{id}/leaderboards/{key} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-points-boosts.mdx b/api-reference/endpoints/users/get-a-users-points-boosts.mdx index e2bbb24..cb8ae93 100644 --- a/api-reference/endpoints/users/get-a-users-points-boosts.mdx +++ b/api-reference/endpoints/users/get-a-users-points-boosts.mdx @@ -1,6 +1,6 @@ --- title: Get a user's active points boosts -openapi: openapi.yml get /users/{id}/points/{key}/boosts +openapi: openapi/application.yml get /users/{id}/points/{key}/boosts --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-points-summary.mdx b/api-reference/endpoints/users/get-a-users-points-summary.mdx index eb7d5de..df0e1fb 100644 --- a/api-reference/endpoints/users/get-a-users-points-summary.mdx +++ b/api-reference/endpoints/users/get-a-users-points-summary.mdx @@ -1,6 +1,6 @@ --- title: Get a summary of points events over time -openapi: openapi.yml get /users/{id}/points/{key}/event-summary +openapi: openapi/application.yml get /users/{id}/points/{key}/event-summary --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-points.mdx b/api-reference/endpoints/users/get-a-users-points.mdx index 6162fcf..54c3c3f 100644 --- a/api-reference/endpoints/users/get-a-users-points.mdx +++ b/api-reference/endpoints/users/get-a-users-points.mdx @@ -1,6 +1,6 @@ --- title: Get a user's points data -openapi: openapi.yml get /users/{id}/points/{key} +openapi: openapi/application.yml get /users/{id}/points/{key} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-streak.mdx b/api-reference/endpoints/users/get-a-users-streak.mdx index 8ca4248..3c3fa84 100644 --- a/api-reference/endpoints/users/get-a-users-streak.mdx +++ b/api-reference/endpoints/users/get-a-users-streak.mdx @@ -1,6 +1,6 @@ --- title: Get a user's streak status -openapi: openapi.yml get /users/{id}/streak +openapi: openapi/application.yml get /users/{id}/streak --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-a-users-wrapped.mdx b/api-reference/endpoints/users/get-a-users-wrapped.mdx index d3e7903..a4bd626 100644 --- a/api-reference/endpoints/users/get-a-users-wrapped.mdx +++ b/api-reference/endpoints/users/get-a-users-wrapped.mdx @@ -1,6 +1,6 @@ --- title: Get a user's wrapped data -openapi: openapi.yml get /users/{id}/wrapped +openapi: openapi/application.yml get /users/{id}/wrapped --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx b/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx index 8e7b903..2e2f2f1 100644 --- a/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx +++ b/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx @@ -1,6 +1,6 @@ --- title: Get all metrics for a user -openapi: openapi.yml get /users/{id}/metrics +openapi: openapi/application.yml get /users/{id}/metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/get-user-preferences.mdx b/api-reference/endpoints/users/get-user-preferences.mdx index 33cfa36..8016c53 100644 --- a/api-reference/endpoints/users/get-user-preferences.mdx +++ b/api-reference/endpoints/users/get-user-preferences.mdx @@ -1,6 +1,6 @@ --- title: Get a user's preferences -openapi: openapi.yml get /users/{id}/preferences +openapi: openapi/application.yml get /users/{id}/preferences --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/identify-a-user.mdx b/api-reference/endpoints/users/identify-a-user.mdx index 70d5e21..d5918dc 100644 --- a/api-reference/endpoints/users/identify-a-user.mdx +++ b/api-reference/endpoints/users/identify-a-user.mdx @@ -1,6 +1,6 @@ --- title: Identify a user -openapi: openapi.yml put /users/{id} +openapi: openapi/application.yml put /users/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/update-a-user.mdx b/api-reference/endpoints/users/update-a-user.mdx index 8b422a3..4bb153e 100644 --- a/api-reference/endpoints/users/update-a-user.mdx +++ b/api-reference/endpoints/users/update-a-user.mdx @@ -1,6 +1,6 @@ --- title: Update a user -openapi: openapi.yml patch /users/{id} +openapi: openapi/application.yml patch /users/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/endpoints/users/update-user-preferences.mdx b/api-reference/endpoints/users/update-user-preferences.mdx index 218210c..25d562f 100644 --- a/api-reference/endpoints/users/update-user-preferences.mdx +++ b/api-reference/endpoints/users/update-user-preferences.mdx @@ -1,6 +1,6 @@ --- title: Update a user's preferences -openapi: openapi.yml patch /users/{id}/preferences +openapi: openapi/application.yml patch /users/{id}/preferences --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/api-reference/introduction.mdx b/api-reference/introduction.mdx index 8401806..fa8ae63 100644 --- a/api-reference/introduction.mdx +++ b/api-reference/introduction.mdx @@ -14,6 +14,10 @@ The Application API is accessible through [SDKs](/api-reference/client-libraries https://api.trophy.so/v1 ``` +## Get Started {#get-started} + +Learn more about how to integrate with the Trophy Application API below. + Securely integrate your applications with the Trophy API using API keys. @@ -25,6 +29,9 @@ https://api.trophy.so/v1 > Learn about the Trophy API and request rate limiting. + + Learn how to prevent unintended side effects when retrying requests. + Use Trophy’s type-safe SDKs to integrate with the API. diff --git a/docs.json b/docs.json index f7800b0..a6a7477 100644 --- a/docs.json +++ b/docs.json @@ -199,7 +199,10 @@ { "group": "Overview", "pages": [ - "admin-api/introduction" + "admin-api/introduction", + "admin-api/authentication", + "admin-api/rate-limiting", + "admin-api/client-libraries" ] }, { @@ -235,6 +238,16 @@ "admin-api/endpoints/points/create-boosts", "admin-api/endpoints/points/archive-boosts-batch" ] + }, + { + "group": "Leaderboards", + "pages": [ + "admin-api/endpoints/leaderboards/list-leaderboards", + "admin-api/endpoints/leaderboards/get-a-leaderboard", + "admin-api/endpoints/leaderboards/update-leaderboards-in-bulk", + "admin-api/endpoints/leaderboards/create-leaderboards-in-bulk", + "admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk" + ] } ] }, @@ -627,4 +640,4 @@ "destination": "/:slug*" } ] -} \ No newline at end of file +} diff --git a/es/admin-api/authentication.mdx b/es/admin-api/authentication.mdx new file mode 100644 index 0000000..e07c0e0 --- /dev/null +++ b/es/admin-api/authentication.mdx @@ -0,0 +1,16 @@ +--- +title: Autenticación +description: Integre de forma segura con la API utilizando claves API a nivel de + cuenta transmitidas en el encabezado + `X-API-KEY`. +og:description: Integre de forma segura con la API de Trophy utilizando claves + API a nivel de cuenta transmitidas en el encabezado + `X-API-KEY`. +icon: key +--- + +La API de administración de Trophy se autentica utilizando las mismas claves API que la [API de aplicación](/es/api-reference/authentication). + +## Obtener soporte {#get-support} + +¿Desea ponerse en contacto con el equipo de Trophy? Comuníquese con nosotros por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarle! diff --git a/es/admin-api/client-libraries.mdx b/es/admin-api/client-libraries.mdx new file mode 100644 index 0000000..30d8b92 --- /dev/null +++ b/es/admin-api/client-libraries.mdx @@ -0,0 +1,36 @@ +--- +title: Bibliotecas de Cliente +description: Utiliza los SDK con seguridad de tipos de Trophy para integrarte con la API. +og:description: Utiliza los SDK con seguridad de tipos de Trophy para integrarte + con la API y comenzar a crear experiencias de producto gamificadas. +icon: code-xml +--- + +La API de Administración de Trophy está disponible en los mismos SDK que la [API de Aplicación](/es/api-reference/client-libraries), bajo el espacio de nombres `trophy.admin`. + +Por ejemplo, en Node.js puedes usar el siguiente código para crear un impulso de puntos a través del espacio de nombres `admin`: + +```javascript Admin API Usage +import { TrophyApiClient } from '@trophyso/node'; + +const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' +}); + +const response = await trophy.admin.points.boosts.create({ + systemKey: 'xp', + boosts: [ + { + userId: 'user-123', + name: 'Double XP Weekend', + start: '2024-01-01', + end: '2024-01-03', + multiplier: 2 + } + ] +}); +``` + +## Obtener Soporte {#get-support} + +¿Quieres ponerte en contacto con el equipo de Trophy? Comunícate con nosotros por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx b/es/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx index c301927..668ea62 100644 --- a/es/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx +++ b/es/admin-api/endpoints/attributes/create-attributes-in-bulk.mdx @@ -1,10 +1,10 @@ --- -title: Crear atributos en lote -openapi: openapi.yml post /attributes +title: Crear atributos en masa +openapi: openapi/admin.yml post /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx b/es/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx index 386437a..848cfbe 100644 --- a/es/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx +++ b/es/admin-api/endpoints/attributes/delete-attributes-in-bulk.mdx @@ -1,10 +1,10 @@ --- -title: Eliminar atributos en lote -openapi: openapi.yml delete /attributes +title: Eliminar atributos de forma masiva +openapi: openapi/admin.yml delete /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de frecuencia** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/attributes/get-an-attribute.mdx b/es/admin-api/endpoints/attributes/get-an-attribute.mdx index cc86bac..1ec98af 100644 --- a/es/admin-api/endpoints/attributes/get-an-attribute.mdx +++ b/es/admin-api/endpoints/attributes/get-an-attribute.mdx @@ -1,6 +1,6 @@ --- title: Obtener un atributo -openapi: openapi.yml get /attributes/{id} +openapi: openapi/admin.yml get /attributes/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/es/admin-api/endpoints/attributes/list-attributes.mdx b/es/admin-api/endpoints/attributes/list-attributes.mdx index 178a8cc..c592153 100644 --- a/es/admin-api/endpoints/attributes/list-attributes.mdx +++ b/es/admin-api/endpoints/attributes/list-attributes.mdx @@ -1,10 +1,10 @@ --- title: Listar atributos -openapi: openapi.yml get /attributes +openapi: openapi/admin.yml get /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx b/es/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx index 2ff0fab..532cdc5 100644 --- a/es/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx +++ b/es/admin-api/endpoints/attributes/update-attributes-in-bulk.mdx @@ -1,10 +1,10 @@ --- -title: Actualizar atributos en masa -openapi: openapi.yml patch /attributes +title: Actualizar atributos de forma masiva +openapi: openapi/admin.yml patch /attributes --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/leaderboards/create-leaderboards-in-bulk.mdx b/es/admin-api/endpoints/leaderboards/create-leaderboards-in-bulk.mdx new file mode 100644 index 0000000..c5dfa0a --- /dev/null +++ b/es/admin-api/endpoints/leaderboards/create-leaderboards-in-bulk.mdx @@ -0,0 +1,10 @@ +--- +title: Crear clasificaciones en lote +openapi: openapi/admin.yml post /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk.mdx b/es/admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk.mdx new file mode 100644 index 0000000..dbc36db --- /dev/null +++ b/es/admin-api/endpoints/leaderboards/delete-leaderboards-in-bulk.mdx @@ -0,0 +1,10 @@ +--- +title: Eliminar clasificaciones en masa +openapi: openapi/admin.yml delete /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/admin-api/endpoints/leaderboards/get-a-leaderboard.mdx b/es/admin-api/endpoints/leaderboards/get-a-leaderboard.mdx new file mode 100644 index 0000000..2c4b1a8 --- /dev/null +++ b/es/admin-api/endpoints/leaderboards/get-a-leaderboard.mdx @@ -0,0 +1,10 @@ +--- +title: Obtener una clasificación +openapi: openapi/admin.yml get /leaderboards/{id} +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/admin-api/endpoints/leaderboards/list-leaderboards.mdx b/es/admin-api/endpoints/leaderboards/list-leaderboards.mdx new file mode 100644 index 0000000..e6f978e --- /dev/null +++ b/es/admin-api/endpoints/leaderboards/list-leaderboards.mdx @@ -0,0 +1,10 @@ +--- +title: Listar clasificaciones +openapi: openapi/admin.yml get /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/admin-api/endpoints/leaderboards/update-leaderboards-in-bulk.mdx b/es/admin-api/endpoints/leaderboards/update-leaderboards-in-bulk.mdx new file mode 100644 index 0000000..f758777 --- /dev/null +++ b/es/admin-api/endpoints/leaderboards/update-leaderboards-in-bulk.mdx @@ -0,0 +1,10 @@ +--- +title: Actualizar clasificaciones de forma masiva +openapi: openapi/admin.yml patch /leaderboards +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx b/es/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx index 78d3490..45f429e 100644 --- a/es/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx +++ b/es/admin-api/endpoints/metrics/create-metrics-in-bulk.mdx @@ -1,10 +1,10 @@ --- -title: Crear métricas en masa -openapi: openapi.yml post /metrics +title: Crear métricas en lote +openapi: openapi/admin.yml post /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de frecuencia** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx b/es/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx index 95d57a0..b0ed6f6 100644 --- a/es/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx +++ b/es/admin-api/endpoints/metrics/delete-metrics-in-bulk.mdx @@ -1,10 +1,10 @@ --- title: Eliminar métricas en lote -openapi: openapi.yml delete /metrics +openapi: openapi/admin.yml delete /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/metrics/get-a-metric-by-id.mdx b/es/admin-api/endpoints/metrics/get-a-metric-by-id.mdx index f79ade5..c7fd1fb 100644 --- a/es/admin-api/endpoints/metrics/get-a-metric-by-id.mdx +++ b/es/admin-api/endpoints/metrics/get-a-metric-by-id.mdx @@ -1,6 +1,6 @@ --- title: Obtener una métrica por ID -openapi: openapi.yml get /metrics/{id} +openapi: openapi/admin.yml get /metrics/{id} --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; diff --git a/es/admin-api/endpoints/metrics/list-metrics.mdx b/es/admin-api/endpoints/metrics/list-metrics.mdx index 4ef80a7..fbde714 100644 --- a/es/admin-api/endpoints/metrics/list-metrics.mdx +++ b/es/admin-api/endpoints/metrics/list-metrics.mdx @@ -1,10 +1,10 @@ --- title: Listar métricas -openapi: openapi.yml get /metrics +openapi: openapi/admin.yml get /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx b/es/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx index 7bddafc..68c7794 100644 --- a/es/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx +++ b/es/admin-api/endpoints/metrics/update-metrics-in-bulk.mdx @@ -1,10 +1,10 @@ --- title: Actualizar métricas en lote -openapi: openapi.yml patch /metrics +openapi: openapi/admin.yml patch /metrics --- import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/points/archive-boosts-batch.mdx b/es/admin-api/endpoints/points/archive-boosts-batch.mdx index 501a5a0..b366d46 100644 --- a/es/admin-api/endpoints/points/archive-boosts-batch.mdx +++ b/es/admin-api/endpoints/points/archive-boosts-batch.mdx @@ -1,10 +1,10 @@ --- -title: Archivar múltiples impulsos de puntos -openapi: openapi.yml delete /points/boosts +title: Eliminar múltiples impulsos de puntos +openapi: openapi/admin.yml delete /points/boosts --- -import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/points/create-boosts.mdx b/es/admin-api/endpoints/points/create-boosts.mdx index 5c4bbe5..8fd9b2d 100644 --- a/es/admin-api/endpoints/points/create-boosts.mdx +++ b/es/admin-api/endpoints/points/create-boosts.mdx @@ -1,10 +1,10 @@ --- -title: Crear impulsos de puntos para múltiples usuarios -openapi: openapi.yml post /points/boosts +title: Crear aumentos de puntos para múltiples usuarios +openapi: openapi/admin.yml post /points/boosts --- -import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/streaks/grant-freezes.mdx b/es/admin-api/endpoints/streaks/grant-freezes.mdx index 396f7fc..3787145 100644 --- a/es/admin-api/endpoints/streaks/grant-freezes.mdx +++ b/es/admin-api/endpoints/streaks/grant-freezes.mdx @@ -1,10 +1,10 @@ --- title: Crear congelaciones de racha para múltiples usuarios -openapi: openapi.yml post /streaks/freezes +openapi: openapi/admin.yml post /streaks/freezes --- -import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** diff --git a/es/admin-api/endpoints/streaks/restore-streaks.mdx b/es/admin-api/endpoints/streaks/restore-streaks.mdx index 054c6ce..ed267c5 100644 --- a/es/admin-api/endpoints/streaks/restore-streaks.mdx +++ b/es/admin-api/endpoints/streaks/restore-streaks.mdx @@ -1,9 +1,9 @@ --- title: Restaurar rachas para múltiples usuarios -openapi: openapi.yml post /streaks/restore +openapi: openapi/admin.yml post /streaks/restore --- -import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; **Límites de velocidad** diff --git a/es/admin-api/introduction.mdx b/es/admin-api/introduction.mdx index 39e4f9b..fc0e2cc 100644 --- a/es/admin-api/introduction.mdx +++ b/es/admin-api/introduction.mdx @@ -1,25 +1,45 @@ --- title: Introducción -description: Aprenda sobre la API de administración de Trophy y cómo utilizarla - para impulsar flujos de trabajo personalizados usando datos de Trophy. -subtitle: Aprenda sobre la API de administración de Trophy y cómo utilizarla - para impulsar flujos de trabajo personalizados usando datos de Trophy. +description: Aprende sobre la API de administración de Trophy y cómo usarla para + crear flujos de trabajo personalizados con datos de Trophy. +subtitle: Aprende sobre la API de administración de Trophy y cómo usarla para + crear flujos de trabajo personalizados con datos de Trophy. --- La API de administración de Trophy es un conjunto de endpoints para crear flujos de trabajo de gamificación personalizados. -Mientras que la [API de aplicación](/es/api-reference/introduction) modela los datos y las interacciones necesarias para ofrecer una experiencia de gamificación dentro de la aplicación, la API de administración modela acciones administrativas que solo realiza su equipo o la lógica de negocio fuera de su aplicación. +Mientras que la [API de aplicación](/es/api-reference/introduction) modela los datos y las interacciones necesarias para ofrecer una experiencia de gamificación dentro de la aplicación, la API de administración modela acciones administrativas que solo realiza tu equipo o la lógica de negocio fuera de tu aplicación. -La API de administración es accesible a través de **los mismos SDK** que la API de aplicación o, para quienes gestionan sus propios clientes HTTP, está disponible en la siguiente URL base. +Se puede acceder a la API de administración a través de **los mismos SDKs** que la API de aplicación o, para quienes gestionan sus propios clientes HTTP, está disponible en la siguiente URL base. ```bash Base URL https://admin.trophy.so/v1 ``` +## Comienza {#get-started} + +Aprende más sobre cómo integrar la API de administración de Trophy a continuación. + + + + Integra de forma segura tus aplicaciones con la API de administración de Trophy. + + + Aprende sobre la API de administración de Trophy y el límite de solicitudes. + + + Usa los SDKs con tipado seguro de Trophy para integrar con la API de administración. + + + - ¿Tiene un caso de uso para el que cree que necesita una API de administración? [Cuéntenoslo](mailto:support@trophy.so) y lo desarrollaremos. + ¿Tienes un caso de uso para el que crees que necesitas una API de administración? [Cuéntanos sobre ello](mailto:support@trophy.so) y lo construiremos. -## Obtener soporte {#get-support} +## Obtén soporte {#get-support} -¿Desea ponerse en contacto con el equipo de Trophy? Comuníquese con nosotros por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarlo! +¿Quieres ponerte en contacto con el equipo de Trophy? Contáctanos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/admin-api/rate-limiting.mdx b/es/admin-api/rate-limiting.mdx new file mode 100644 index 0000000..c656530 --- /dev/null +++ b/es/admin-api/rate-limiting.mdx @@ -0,0 +1,18 @@ +--- +title: Límite de solicitudes +description: Aprende sobre la API de Trophy y el límite de solicitudes. +og:description: Aprende sobre la API de Trophy y el límite de solicitudes. +icon: circle-gauge +--- + +import { RateLimitBadge } from "../components/rate-limit-badge.jsx"; + +Todos los endpoints de la API de administración están sujetos al límite de solicitudes según del modelo de [límite de solicitudes](/es/api-reference/rate-limiting) de la API de la aplicación. + + + Si consideras que necesitas un límite de solicitudes más alto, [contáctanos](mailto:support@trophy.so) y estaremos encantados de discutir tus necesidades. + + +## Obtener soporte {#get-support} + +¿Quieres comunicarte con el equipo de Trophy? Contáctanos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/api-reference/endpoints/achievements/all-achievements.mdx b/es/api-reference/endpoints/achievements/all-achievements.mdx index ba3087e..51ff60b 100644 --- a/es/api-reference/endpoints/achievements/all-achievements.mdx +++ b/es/api-reference/endpoints/achievements/all-achievements.mdx @@ -1,10 +1,10 @@ --- title: Obtener todos los logros y sus estadísticas de finalización -openapi: openapi.yml get /achievements +openapi: openapi/application.yml get /achievements --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de Tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx b/es/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx index 9f2952b..fbc8664 100644 --- a/es/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx +++ b/es/api-reference/endpoints/achievements/mark-an-achievement-as-completed.mdx @@ -1,10 +1,10 @@ --- title: Marcar un logro como completado -openapi: openapi.yml post /achievements/{key}/complete +openapi: openapi/application.yml post /achievements/{key}/complete --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx b/es/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx index b016d24..07ef729 100644 --- a/es/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx +++ b/es/api-reference/endpoints/leaderboards/get-all-active-leaderboards.mdx @@ -1,6 +1,6 @@ --- title: Obtener todas las clasificaciones -openapi: openapi.yml get /leaderboards +openapi: openapi/application.yml get /leaderboards --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/leaderboards/get-leaderboard.mdx b/es/api-reference/endpoints/leaderboards/get-leaderboard.mdx index 8c357e5..58fefb8 100644 --- a/es/api-reference/endpoints/leaderboards/get-leaderboard.mdx +++ b/es/api-reference/endpoints/leaderboards/get-leaderboard.mdx @@ -1,10 +1,10 @@ --- title: Obtener una clasificación individual -openapi: openapi.yml get /leaderboards/{key} +openapi: openapi/application.yml get /leaderboards/{key} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/metrics/send-a-metric-change-event.mdx b/es/api-reference/endpoints/metrics/send-a-metric-change-event.mdx index 770b729..3620b05 100644 --- a/es/api-reference/endpoints/metrics/send-a-metric-change-event.mdx +++ b/es/api-reference/endpoints/metrics/send-a-metric-change-event.mdx @@ -1,6 +1,6 @@ --- title: Enviar un evento de cambio de métrica -openapi: openapi.yml post /metrics/{key}/event +openapi: openapi/application.yml post /metrics/{key}/event --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/points/get-points-boosts.mdx b/es/api-reference/endpoints/points/get-points-boosts.mdx index 2831588..052b6af 100644 --- a/es/api-reference/endpoints/points/get-points-boosts.mdx +++ b/es/api-reference/endpoints/points/get-points-boosts.mdx @@ -1,6 +1,6 @@ --- title: Obtener potenciadores para un sistema de puntos -openapi: openapi.yml get /points/{key}/boosts +openapi: openapi/application.yml get /points/{key}/boosts --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/points/get-points-level-summary.mdx b/es/api-reference/endpoints/points/get-points-level-summary.mdx index 41756bc..7db877f 100644 --- a/es/api-reference/endpoints/points/get-points-level-summary.mdx +++ b/es/api-reference/endpoints/points/get-points-level-summary.mdx @@ -1,6 +1,6 @@ --- title: Obtener resumen de nivel para un sistema de puntos -openapi: openapi.yml get /points/{key}/level-summary +openapi: openapi/application.yml get /points/{key}/level-summary --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/points/get-points-levels.mdx b/es/api-reference/endpoints/points/get-points-levels.mdx index 0faa515..366c32f 100644 --- a/es/api-reference/endpoints/points/get-points-levels.mdx +++ b/es/api-reference/endpoints/points/get-points-levels.mdx @@ -1,10 +1,10 @@ --- title: Obtener niveles para un sistema de puntos -openapi: openapi.yml get /points/{key}/levels +openapi: openapi/application.yml get /points/{key}/levels --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de Velocidad** +**Límites de velocidad** diff --git a/es/api-reference/endpoints/points/get-points-summary.mdx b/es/api-reference/endpoints/points/get-points-summary.mdx index d4b69e3..e56b11f 100644 --- a/es/api-reference/endpoints/points/get-points-summary.mdx +++ b/es/api-reference/endpoints/points/get-points-summary.mdx @@ -1,6 +1,6 @@ --- title: Obtener un desglose de usuarios por puntos -openapi: openapi.yml get /points/{key}/summary +openapi: openapi/application.yml get /points/{key}/summary --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/points/get-points.mdx b/es/api-reference/endpoints/points/get-points.mdx index af8f939..aa8eeec 100644 --- a/es/api-reference/endpoints/points/get-points.mdx +++ b/es/api-reference/endpoints/points/get-points.mdx @@ -1,6 +1,6 @@ --- title: Obtener un sistema de puntos con sus activadores -openapi: openapi.yml get /points/{key} +openapi: openapi/application.yml get /points/{key} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/streaks/get-streak-rankings.mdx b/es/api-reference/endpoints/streaks/get-streak-rankings.mdx index 545aaa7..d65b12c 100644 --- a/es/api-reference/endpoints/streaks/get-streak-rankings.mdx +++ b/es/api-reference/endpoints/streaks/get-streak-rankings.mdx @@ -1,10 +1,10 @@ --- title: Obtener usuarios principales por longitud de racha -openapi: openapi.yml get /streaks/rankings +openapi: openapi/application.yml get /streaks/rankings --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de Tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/streaks/get-streaks.mdx b/es/api-reference/endpoints/streaks/get-streaks.mdx index e700533..93edecc 100644 --- a/es/api-reference/endpoints/streaks/get-streaks.mdx +++ b/es/api-reference/endpoints/streaks/get-streaks.mdx @@ -1,10 +1,10 @@ --- title: Obtener las longitudes de racha de una lista de usuarios -openapi: openapi.yml get /streaks +openapi: openapi/application.yml get /streaks --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/create-a-user.mdx b/es/api-reference/endpoints/users/create-a-user.mdx index 644dbb7..f8d15a7 100644 --- a/es/api-reference/endpoints/users/create-a-user.mdx +++ b/es/api-reference/endpoints/users/create-a-user.mdx @@ -1,6 +1,6 @@ --- title: Crear un nuevo usuario -openapi: openapi.yml post /users +openapi: openapi/application.yml post /users --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx b/es/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx index 92ec7a6..1076a83 100644 --- a/es/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx +++ b/es/api-reference/endpoints/users/get-a-single-metric-event-summary-for-a-user.mdx @@ -1,10 +1,10 @@ --- title: Obtener un resumen de eventos de métricas a lo largo del tiempo -openapi: openapi.yml get /users/{id}/metrics/{key}/event-summary +openapi: openapi/application.yml get /users/{id}/metrics/{key}/event-summary --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx b/es/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx index 0529f5a..6e7f808 100644 --- a/es/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx +++ b/es/api-reference/endpoints/users/get-a-single-metric-for-a-user.mdx @@ -1,10 +1,10 @@ --- title: Obtener una métrica individual para un usuario -openapi: openapi.yml get /users/{id}/metrics/{key} +openapi: openapi/application.yml get /users/{id}/metrics/{key} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/get-a-single-user.mdx b/es/api-reference/endpoints/users/get-a-single-user.mdx index d967bbb..ae1bd1c 100644 --- a/es/api-reference/endpoints/users/get-a-single-user.mdx +++ b/es/api-reference/endpoints/users/get-a-single-user.mdx @@ -1,10 +1,10 @@ --- title: Obtener un único usuario -openapi: openapi.yml get /users/{id} +openapi: openapi/application.yml get /users/{id} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/get-a-users-completed-achievements.mdx b/es/api-reference/endpoints/users/get-a-users-completed-achievements.mdx index adc7318..6d13353 100644 --- a/es/api-reference/endpoints/users/get-a-users-completed-achievements.mdx +++ b/es/api-reference/endpoints/users/get-a-users-completed-achievements.mdx @@ -1,10 +1,10 @@ --- title: Obtener los logros de un usuario -openapi: openapi.yml get /users/{id}/achievements +openapi: openapi/application.yml get /users/{id}/achievements --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/get-a-users-leaderboard.mdx b/es/api-reference/endpoints/users/get-a-users-leaderboard.mdx index f7e19bb..45af9e2 100644 --- a/es/api-reference/endpoints/users/get-a-users-leaderboard.mdx +++ b/es/api-reference/endpoints/users/get-a-users-leaderboard.mdx @@ -1,6 +1,6 @@ --- title: Obtener los datos de clasificación de un usuario -openapi: openapi.yml get /users/{id}/leaderboards/{key} +openapi: openapi/application.yml get /users/{id}/leaderboards/{key} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/get-a-users-points-boosts.mdx b/es/api-reference/endpoints/users/get-a-users-points-boosts.mdx index c7ae521..e49b332 100644 --- a/es/api-reference/endpoints/users/get-a-users-points-boosts.mdx +++ b/es/api-reference/endpoints/users/get-a-users-points-boosts.mdx @@ -1,6 +1,6 @@ --- title: Obtener los potenciadores de puntos activos de un usuario -openapi: openapi.yml get /users/{id}/points/{key}/boosts +openapi: openapi/application.yml get /users/{id}/points/{key}/boosts --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/get-a-users-points-summary.mdx b/es/api-reference/endpoints/users/get-a-users-points-summary.mdx index 00cb921..cdd7292 100644 --- a/es/api-reference/endpoints/users/get-a-users-points-summary.mdx +++ b/es/api-reference/endpoints/users/get-a-users-points-summary.mdx @@ -1,6 +1,6 @@ --- title: Obtener un resumen de eventos de puntos a lo largo del tiempo -openapi: openapi.yml get /users/{id}/points/{key}/event-summary +openapi: openapi/application.yml get /users/{id}/points/{key}/event-summary --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/get-a-users-points.mdx b/es/api-reference/endpoints/users/get-a-users-points.mdx index 4b160af..9f07993 100644 --- a/es/api-reference/endpoints/users/get-a-users-points.mdx +++ b/es/api-reference/endpoints/users/get-a-users-points.mdx @@ -1,10 +1,10 @@ --- title: Obtener los datos de puntos de un usuario -openapi: openapi.yml get /users/{id}/points/{key} +openapi: openapi/application.yml get /users/{id}/points/{key} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/get-a-users-streak.mdx b/es/api-reference/endpoints/users/get-a-users-streak.mdx index 734c664..bc1e319 100644 --- a/es/api-reference/endpoints/users/get-a-users-streak.mdx +++ b/es/api-reference/endpoints/users/get-a-users-streak.mdx @@ -1,10 +1,10 @@ --- title: Obtener el estado de racha de un usuario -openapi: openapi.yml get /users/{id}/streak +openapi: openapi/application.yml get /users/{id}/streak --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/get-a-users-wrapped.mdx b/es/api-reference/endpoints/users/get-a-users-wrapped.mdx index ec49d34..1392797 100644 --- a/es/api-reference/endpoints/users/get-a-users-wrapped.mdx +++ b/es/api-reference/endpoints/users/get-a-users-wrapped.mdx @@ -1,6 +1,6 @@ --- title: Obtener los datos de resumen anual de un usuario -openapi: openapi.yml get /users/{id}/wrapped +openapi: openapi/application.yml get /users/{id}/wrapped --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx b/es/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx index 70dd01d..d54f3f6 100644 --- a/es/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx +++ b/es/api-reference/endpoints/users/get-all-metrics-for-a-user.mdx @@ -1,6 +1,6 @@ --- title: Obtener todas las métricas de un usuario -openapi: openapi.yml get /users/{id}/metrics +openapi: openapi/application.yml get /users/{id}/metrics --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/get-user-preferences.mdx b/es/api-reference/endpoints/users/get-user-preferences.mdx index 9f573f8..9502683 100644 --- a/es/api-reference/endpoints/users/get-user-preferences.mdx +++ b/es/api-reference/endpoints/users/get-user-preferences.mdx @@ -1,6 +1,6 @@ --- title: Obtener las preferencias de un usuario -openapi: openapi.yml get /users/{id}/preferences +openapi: openapi/application.yml get /users/{id}/preferences --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/identify-a-user.mdx b/es/api-reference/endpoints/users/identify-a-user.mdx index 31d1f5c..03e0209 100644 --- a/es/api-reference/endpoints/users/identify-a-user.mdx +++ b/es/api-reference/endpoints/users/identify-a-user.mdx @@ -1,10 +1,10 @@ --- title: Identificar un usuario -openapi: openapi.yml put /users/{id} +openapi: openapi/application.yml put /users/{id} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; -**Límites de tasa** +**Límites de velocidad** \ No newline at end of file diff --git a/es/api-reference/endpoints/users/update-a-user.mdx b/es/api-reference/endpoints/users/update-a-user.mdx index 25fba3e..7038ab3 100644 --- a/es/api-reference/endpoints/users/update-a-user.mdx +++ b/es/api-reference/endpoints/users/update-a-user.mdx @@ -1,6 +1,6 @@ --- title: Actualizar un usuario -openapi: openapi.yml patch /users/{id} +openapi: openapi/application.yml patch /users/{id} --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/endpoints/users/update-user-preferences.mdx b/es/api-reference/endpoints/users/update-user-preferences.mdx index 28d674c..0926974 100644 --- a/es/api-reference/endpoints/users/update-user-preferences.mdx +++ b/es/api-reference/endpoints/users/update-user-preferences.mdx @@ -1,6 +1,6 @@ --- title: Actualizar las preferencias de un usuario -openapi: openapi.yml patch /users/{id}/preferences +openapi: openapi/application.yml patch /users/{id}/preferences --- import { RateLimitBadge } from "../../../../es/components/rate-limit-badge.jsx"; diff --git a/es/api-reference/introduction.mdx b/es/api-reference/introduction.mdx index 95c5a33..ee6a342 100644 --- a/es/api-reference/introduction.mdx +++ b/es/api-reference/introduction.mdx @@ -13,6 +13,10 @@ La API de aplicaciones es accesible a través de [SDKs](/es/api-reference/client https://api.trophy.so/v1 ``` +## Comienza {#get-started} + +Aprende más sobre cómo integrar la API de aplicaciones de Trophy a continuación. + Integra de forma segura tus aplicaciones con la API de Trophy utilizando claves de API. @@ -31,4 +35,4 @@ https://api.trophy.so/v1 ## Obtener soporte {#get-support} -¿Quieres ponerte en contacto con el equipo de Trophy? Contáctanos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! +¿Quieres ponerte en contacto con el equipo de Trophy? Comunícate con nosotros por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/platform/achievements.mdx b/es/platform/achievements.mdx index 65f2381..79c0f64 100644 --- a/es/platform/achievements.mdx +++ b/es/platform/achievements.mdx @@ -395,10 +395,9 @@ Si tienes logros configurados para cualquiera de tus [Métricas](/es/platform/me Usa la [analítica de métricas](/es/platform/metrics#metric-analytics) de Trophy para comparar la retención de cada interacción de usuario y luego configura logros en torno a esas interacciones para maximizar el impacto en la retención. - - + -## Obtener soporte {#get-support} +## Obtener ayuda {#get-support} ¿Quieres ponerte en contacto con el equipo de Trophy? Escríbenos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/platform/leaderboards.mdx b/es/platform/leaderboards.mdx index de41573..922f915 100644 --- a/es/platform/leaderboards.mdx +++ b/es/platform/leaderboards.mdx @@ -352,6 +352,6 @@ Este gráfico es un histograma de las puntuaciones de los usuarios en una clasif -## Obtener Soporte {#get-support} +## Obtener ayuda {#get-support} -¿Quieres ponerte en contacto con el equipo de Trophy? Contáctanos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! +¿Quieres ponerte en contacto con el equipo de Trophy? Escríbenos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/webhooks/events/achievements/achievement-completed.mdx b/es/webhooks/events/achievements/achievement-completed.mdx index 915519e..cf47045 100644 --- a/es/webhooks/events/achievements/achievement-completed.mdx +++ b/es/webhooks/events/achievements/achievement-completed.mdx @@ -1,6 +1,6 @@ --- title: Logro completado -openapi: openapi.yml webhook achievement.completed +openapi: openapi/application.yml webhook achievement.completed --- diff --git a/es/webhooks/events/leaderboards/leaderboard-changed.mdx b/es/webhooks/events/leaderboards/leaderboard-changed.mdx index 82357fc..a777f33 100644 --- a/es/webhooks/events/leaderboards/leaderboard-changed.mdx +++ b/es/webhooks/events/leaderboards/leaderboard-changed.mdx @@ -1,4 +1,4 @@ --- title: Clasificación modificada -openapi: openapi.yml webhook leaderboard.changed +openapi: openapi/application.yml webhook leaderboard.changed --- diff --git a/es/webhooks/events/leaderboards/leaderboard-finished.mdx b/es/webhooks/events/leaderboards/leaderboard-finished.mdx index bf6059b..fdc411a 100644 --- a/es/webhooks/events/leaderboards/leaderboard-finished.mdx +++ b/es/webhooks/events/leaderboards/leaderboard-finished.mdx @@ -1,6 +1,6 @@ --- title: Clasificación finalizada -openapi: openapi.yml webhook leaderboard.finished +openapi: openapi/application.yml webhook leaderboard.finished --- diff --git a/es/webhooks/events/leaderboards/leaderboard-rank-changed.mdx b/es/webhooks/events/leaderboards/leaderboard-rank-changed.mdx index 191087c..27d21b1 100644 --- a/es/webhooks/events/leaderboards/leaderboard-rank-changed.mdx +++ b/es/webhooks/events/leaderboards/leaderboard-rank-changed.mdx @@ -1,4 +1,4 @@ --- title: Clasificación cambiada -openapi: openapi.yml webhook leaderboard.rank_changed +openapi: openapi/application.yml webhook leaderboard.rank_changed --- diff --git a/es/webhooks/events/leaderboards/leaderboard-started.mdx b/es/webhooks/events/leaderboards/leaderboard-started.mdx index 474839d..8713bf2 100644 --- a/es/webhooks/events/leaderboards/leaderboard-started.mdx +++ b/es/webhooks/events/leaderboards/leaderboard-started.mdx @@ -1,6 +1,6 @@ --- title: Clasificación iniciada -openapi: openapi.yml webhook leaderboard.started +openapi: openapi/application.yml webhook leaderboard.started --- diff --git a/es/webhooks/events/points/points-boost-finished.mdx b/es/webhooks/events/points/points-boost-finished.mdx index c305604..89feee8 100644 --- a/es/webhooks/events/points/points-boost-finished.mdx +++ b/es/webhooks/events/points/points-boost-finished.mdx @@ -1,6 +1,6 @@ --- title: Impulso de puntos finalizado -openapi: openapi.yml webhook points.boost_finished +openapi: openapi/application.yml webhook points.boost_finished --- diff --git a/es/webhooks/events/points/points-boost-started.mdx b/es/webhooks/events/points/points-boost-started.mdx index b3b7b91..677c719 100644 --- a/es/webhooks/events/points/points-boost-started.mdx +++ b/es/webhooks/events/points/points-boost-started.mdx @@ -1,6 +1,6 @@ --- title: Impulso de puntos iniciado -openapi: openapi.yml webhook points.boost_started +openapi: openapi/application.yml webhook points.boost_started --- diff --git a/es/webhooks/events/points/points-changed.mdx b/es/webhooks/events/points/points-changed.mdx index 83dd24a..f32890b 100644 --- a/es/webhooks/events/points/points-changed.mdx +++ b/es/webhooks/events/points/points-changed.mdx @@ -1,6 +1,6 @@ --- title: Puntos cambiados -openapi: openapi.yml webhook points.changed +openapi: openapi/application.yml webhook points.changed --- diff --git a/es/webhooks/events/points/points-level-changed.mdx b/es/webhooks/events/points/points-level-changed.mdx index 9a4fe45..7e91e49 100644 --- a/es/webhooks/events/points/points-level-changed.mdx +++ b/es/webhooks/events/points/points-level-changed.mdx @@ -1,6 +1,6 @@ --- title: Nivel de puntos cambiado -openapi: openapi.yml webhook points.level_changed +openapi: openapi/application.yml webhook points.level_changed --- diff --git a/es/webhooks/events/streaks/streak-extended.mdx b/es/webhooks/events/streaks/streak-extended.mdx index b0430ae..546d923 100644 --- a/es/webhooks/events/streaks/streak-extended.mdx +++ b/es/webhooks/events/streaks/streak-extended.mdx @@ -1,6 +1,6 @@ --- title: Racha extendida -openapi: openapi.yml webhook streak.extended +openapi: openapi/application.yml webhook streak.extended --- diff --git a/es/webhooks/events/streaks/streak-freeze-consumed.mdx b/es/webhooks/events/streaks/streak-freeze-consumed.mdx index df0a787..9f63623 100644 --- a/es/webhooks/events/streaks/streak-freeze-consumed.mdx +++ b/es/webhooks/events/streaks/streak-freeze-consumed.mdx @@ -1,4 +1,4 @@ --- title: Congelación de racha consumida -openapi: openapi.yml webhook streak.freeze_consumed +openapi: openapi/application.yml webhook streak.freeze_consumed --- diff --git a/es/webhooks/events/streaks/streak-freeze-earned.mdx b/es/webhooks/events/streaks/streak-freeze-earned.mdx index 5e7016c..5113c5a 100644 --- a/es/webhooks/events/streaks/streak-freeze-earned.mdx +++ b/es/webhooks/events/streaks/streak-freeze-earned.mdx @@ -1,4 +1,4 @@ --- title: Congelación de racha obtenida -openapi: openapi.yml webhook streak.freeze_earned +openapi: openapi/application.yml webhook streak.freeze_earned --- diff --git a/es/webhooks/events/streaks/streak-lost.mdx b/es/webhooks/events/streaks/streak-lost.mdx index fa510de..354544a 100644 --- a/es/webhooks/events/streaks/streak-lost.mdx +++ b/es/webhooks/events/streaks/streak-lost.mdx @@ -1,4 +1,4 @@ --- title: Racha perdida -openapi: openapi.yml webhook streak.lost +openapi: openapi/application.yml webhook streak.lost --- diff --git a/es/webhooks/events/streaks/streak-started.mdx b/es/webhooks/events/streaks/streak-started.mdx index c07e7a3..df740e8 100644 --- a/es/webhooks/events/streaks/streak-started.mdx +++ b/es/webhooks/events/streaks/streak-started.mdx @@ -1,4 +1,4 @@ --- title: Racha iniciada -openapi: openapi.yml webhook streak.started +openapi: openapi/application.yml webhook streak.started --- diff --git a/es/webhooks/introduction.mdx b/es/webhooks/introduction.mdx index 1b0a64a..2290b6a 100644 --- a/es/webhooks/introduction.mdx +++ b/es/webhooks/introduction.mdx @@ -16,7 +16,9 @@ Estos eventos te permiten activar código personalizado y potenciar experiencias Todos los webhooks de Trophy se entregan mediante HTTP, lo que permite a los clientes suscribirse para recibir datos de Trophy a través de peticiones HTTP `POST` regulares. -Lee más sobre cómo empezar con webhooks a continuación. +## Comienza {#get-started} + +Aprende más sobre cómo integrar Trophy webhooks en tu aplicación a continuación. diff --git a/i18n.json b/i18n.json index c0c59c6..2f8cb63 100644 --- a/i18n.json +++ b/i18n.json @@ -16,6 +16,7 @@ "admin-api/endpoints/streaks/*.mdx", "admin-api/endpoints/metrics/*.mdx", "admin-api/endpoints/attributes/*.mdx", + "admin-api/endpoints/leaderboards/*.mdx", "api-reference/*.mdx", "api-reference/endpoints/achievements/*.mdx", "api-reference/endpoints/leaderboards/*.mdx", diff --git a/i18n.lock b/i18n.lock index 9a86e3d..10edaed 100644 --- a/i18n.lock +++ b/i18n.lock @@ -94,25 +94,25 @@ checksums: content/2: 580af53aa9812f2ec29a632e145669a5 7477553e47fe4d0f8ac92618f5f0bf7c: meta/title: eefb9c5595f20c508c7e0f0c55ba6bdf - meta/openapi: cad03e0d866a83c8441ffd64a99323d2 + meta/openapi: 8399f0037379176ea48ecd1486f5777c content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 d7a5a41699c1f35f60e64aa9a0c63c18: meta/title: ef1c4a61be3dc61b6e50421fbf8c1050 - meta/openapi: 7468d75314e08b7c68cb09f19893b7f0 + meta/openapi: c8d32f24d25cd3ab9da5ba5d8da11f24 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 16fd8dd702aeb251dfbb09d26762c463: meta/title: 24d312585fbce653a7024827e9d7c69c - meta/openapi: 1b95c71430be35d549c1a31d82be3e1d + meta/openapi: 6ccc305f153a6ffca047e4e882608767 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 6a5e6c94dcf6408b8b540ec0f0dc26d8: meta/title: b3b6396f561f453796bcecc80a97b010 - meta/openapi: c27bad5fa846f66acff30e428aa614bd + meta/openapi: 892c75723df070322d3cff0dc64ec6d0 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 @@ -124,9 +124,12 @@ checksums: content/1: eb05d4bd7f1caeefef65f9228494eebf content/2: 6af1a586c9dbda13db0b6dcb622fdfec content/3: c626f8f3751b88e61a71e6f91e4c4785 - content/4: 8dc2a9d4eb6ccc9ef55db5a7169aa556 - content/5: 10e8e9a59847ddd720c6d06b12c7b120 - content/6: 9799b973234bf2d10d5c971b267f55a5 + content/4: 661e97346571e3f16d7b8aaf91b7be9f + content/5: 0d3b2ba4d21c8ae2997c8ac660674038 + content/6: 0942d9501d694751af4be357fd1717e3 + content/7: 8dc2a9d4eb6ccc9ef55db5a7169aa556 + content/8: 10e8e9a59847ddd720c6d06b12c7b120 + content/9: 9799b973234bf2d10d5c971b267f55a5 5eb7d6c7a406cce50046f8c2caa38b21: meta/title: 491fbb938cfe44df0438ad3e198d23e6 meta/description: 9733b476e1c9f0a0a54474613ec212ca @@ -171,169 +174,169 @@ checksums: content/3: 9799b973234bf2d10d5c971b267f55a5 c12c0abb3f2160aca93ae4843efbd870: meta/title: 5cadd536960d91969aaa689d8478b95c - meta/openapi: af3f6d77fa1e5d0ae16b680a314f188f + meta/openapi: 754bd250e20618f04f7a832d720a7025 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 9496439c3702d9c7e80b4112af6398b4: meta/title: 9e8745a078ff455bfc149283f23590b3 - meta/openapi: 49efced1dc64f18a6bf5f4fdc0374f55 + meta/openapi: 926543995a4ea55c6c158d778011907f content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 2d9bf588afb080d1f3fd57a2850dc326: meta/title: 26789be2b014ece0c20f2663cf020e70 - meta/openapi: b2cffdeb661c0ebc7591f7e9a2b15893 + meta/openapi: f011b1e9e58a00535165c28c592bf895 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 5e0d4fde39371cbe18bba9dee776fb89: meta/title: 0273692f6244da33a2751ec189135713 - meta/openapi: e66db4c82218f0f7e6062cbcd058d598 + meta/openapi: f06f34df6eb6dfc2e40ae615b9075bb5 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 6dbcc429161a2e607cd53c799155e68f: meta/title: 954fe6b9e8d97119cfdf2dda6774aa56 - meta/openapi: 45665e458b02c4f5a8a616fd6b792c7f + meta/openapi: eb88e3af05c76304299d1afc34fbf1b0 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 9b1bcc0a039cc952a5150d6896cf9045: meta/title: 0a5da55cab7ffe84ce89059f3233d8fd - meta/openapi: 5a8901b0098e495bcd0432f01a35fcbb + meta/openapi: 71f7bae39f997550fefda80dbf18afb7 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 1edf0466b8269cb323d716955898952b: meta/title: 47754d98c23b4a946b72ee4a10d3bd43 - meta/openapi: 90080a96c996161ca874e7e1dbde8d24 + meta/openapi: 4f56b59352f86331e1a93c77551e4aa5 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 51199b6af80fdf062c7d27856f2436e3: meta/title: 9e41c9868ab272e64e5401f44781c910 - meta/openapi: 8e19acbddfd77180c7b543f052d1b26e + meta/openapi: 073da0a076f4000f9291f2fbb444345e content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 407509daa8c5decdde44928e191dbdf4: meta/title: 5e92c597affb469accd9448a655c2352 - meta/openapi: 749859708fb612bd11fe125fd3ce28dc + meta/openapi: c3b99b60729351f0378632079ffc9137 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 68a4bc6d86f1533eacaed7056a2834c2: meta/title: ee4a0630a42cd8882581467caf846a77 - meta/openapi: 35392945b66b65151f7a86e490556395 + meta/openapi: 5979745a2b6f5e0156702c34661bcdc8 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 7614b75ca4dd50af745fe47109db70da: meta/title: 077702ba8255fb3069bc62ced33c974a - meta/openapi: ca99faa3b7805d58f2e2880a09c7948e + meta/openapi: 579d7c278d0d7d4a28281231f8788430 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 c523268fd0798ce62adc98d52efecb08: meta/title: 6f0e6a46b9f0000d10331f20c79c4708 - meta/openapi: 40839b4c9bbefa5ecc2b619117285845 + meta/openapi: f35340ed0f589930213cf796215f226f content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 49ad2e0822e997e9652b11d4ad4327c4: meta/title: fd773513171848aed2867843ee36d487 - meta/openapi: b0c46d7fcd55f36bcc08d96938b95898 + meta/openapi: 9838ad6aed804a6c996955e9a8f3d504 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 8eb4d5da0de2e11f7b0f707fea742802: meta/title: bb161dd6995053214eddd299261b3c30 - meta/openapi: 560279049d75c70c76a0d1bd53cd34d6 + meta/openapi: cdf19c0c8b6a2f7cd29f66b1f0c09d5a content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 4ec2e2aa2382ca5fda12bf7a77a1ed07: meta/title: 2ac6a64dc31e915a391e471c5d953fce - meta/openapi: a1408ed9d151705d77e7f1218ec187d3 + meta/openapi: 98d994d87ef27e8c0342cc919d9e60e7 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 10956bd1a7316442a65ce0e6a7234b72: meta/title: f284c34cac9b4d42094b1bf01aa85216 - meta/openapi: b72d2a120802c67cf1c924daee5ce32c + meta/openapi: 03c6bab6790966c5a93f5ec72fe39948 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 8090994e2812c50583205acb62408c4e: meta/title: ffb86c38bde055dd21d8393deff5449e - meta/openapi: 2758fc404840a4a60946046a71e82e54 + meta/openapi: 51378e3d0d6cf529bcd66af1bfcc15df content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 f5ff4a0dafc926a39c157a4194326a88: meta/title: dbfa2f89d92a7204d52311f9907839c9 - meta/openapi: a0f590bd6750bee153eb8b319b95fedd + meta/openapi: 5c5c07edb2d97d9d08e867ecffb7b24b content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 59a15baa62b8bbf8a2f604d6e65d0287: meta/title: 133c06da725d8ca498c2a86125be6f89 - meta/openapi: 641e014b7f06174dac47a294dc458149 + meta/openapi: 982000253f08c3351dcfe8d3b4db9869 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 ae165dd4d37edc7e1432d54487db11ea: meta/title: d7822df0e0d439e47b9521b2e197df56 - meta/openapi: 7560cebe19ea572f54ff36044ebd3db1 + meta/openapi: b03b24fb2e5df8f30344f5ee89f55fa2 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 f0e9d5d6e5304627407878f45e939d26: meta/title: 283be864cd50ac798d5e912b78841ffb - meta/openapi: db92564e4760bd265bd2fe76daa93236 + meta/openapi: cec2f031a2f70d4eb2ef0b7b6d949107 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 bfa0151fb68e915a80b9894ffb4bf3ce: meta/title: d08b872d3e84c121a5269d76bd7f86d7 - meta/openapi: 7549f58c5f88ec39ebdbde7b24da8638 + meta/openapi: 5d62bd73661b448efae843511d846baa content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 2364c86bf77a3d44f6cf3567e1c2b153: meta/title: 298f68dc7aeffa6c029d89994a17b31c - meta/openapi: f92e0a1cc338d794fd2d941612abfc37 + meta/openapi: dd40e3c302dc153a2c1b7fa692f72035 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 b4d8ef5eec203c33b3f2d23b4d227043: meta/title: d2c34b11017b3fb366791e1433085c4b - meta/openapi: ea1deb17688a43e4021e1cf14c6e7d67 + meta/openapi: 2a33d4b6f65d42ab26f4ba81ac173716 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 3dde2d802872642bce58007abb9a410f: meta/title: 5e79f5b45f19faa41a3a2a084ed3f49e - meta/openapi: 07c9d6362725b1e1088f2375009ab6d3 + meta/openapi: e36c09543666673fb2c1a94a05ddb509 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 622517fd1a648d89d9bbb0e146919744: meta/title: a2d40fcf41d27d64bc2d97d8595299ed - meta/openapi: 41865867450aea6bae47258ec6a9ab22 + meta/openapi: 4c930f0584245c30a2283b29297c5aa8 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 4638fab54fadd11958fde07e43409163: meta/title: 6880efdf06d2f6525e7e111e3ca83d8d - meta/openapi: 9a04b56a5ad136ec892a0964025fee58 + meta/openapi: 32b0c88b072b7fd4826c295e0dcc3cf7 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 acce1b5e4242f10be769ef3dc4f7b924: meta/title: dcd51ae2b62e97fb101957cadaceb732 - meta/openapi: dfd86a907e5505e3d3c0e75da2fc940e + meta/openapi: bd97d21148c5695b08361754f378a8ce content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: d8b0a833e425a3834713cba3a1c6e2d9 @@ -372,9 +375,11 @@ checksums: content/1: b71fe27a6e41c3f057b432f29664bbfe content/2: 74c2ca81c7dd15caaabb1b0e36ac65d5 content/3: 74a4a84ec5890de3717b6ebe865e1050 - content/4: cdee5ef1166301dd365545c090a696bf - content/5: 10e8e9a59847ddd720c6d06b12c7b120 - content/6: 9799b973234bf2d10d5c971b267f55a5 + content/4: 661e97346571e3f16d7b8aaf91b7be9f + content/5: c4b67660a6923fcadc5678838e949d72 + content/6: 26bd82eefced9994a05da865e93660c6 + content/7: 10e8e9a59847ddd720c6d06b12c7b120 + content/8: 9799b973234bf2d10d5c971b267f55a5 b4af38dc2d0b2a8bad04b2c13c31c91b: meta/title: d9aa4c3d78b02df7fc6b3c90015b1444 meta/description: c8ca5f3c7cbf8bc0ed9baf86d2e21cd2 @@ -2172,57 +2177,57 @@ checksums: content/127: 9799b973234bf2d10d5c971b267f55a5 eb8a580b4841f4f05cf35b62b02977ff: meta/title: de7da00742f03c159c9a89d878ee3083 - meta/openapi: 82fa6e16d13b3f883a41c6a2f62d78a8 + meta/openapi: 53e0e6c5e9c526c507b9ce951b1e85af content/0: 416fe6c0df77ea834dab7bca233135d5 d37903f8bd43bb64249fdcacb24ca89d: meta/title: 6128618766163c7fdc208cdd8b6b6fbf - meta/openapi: 7ca4c7fe114314908f497771a84fc588 + meta/openapi: 818d8afdc389ccf11d90436b61d3a4e1 f0576ea0518fb496f7b43a5b5db64b4c: meta/title: 1115d0d853f61a6e4b8ae3d1bb65dcc8 - meta/openapi: 83a19509a63d89ce2d27e3a4f276f04c + meta/openapi: 241a2fae167c18ee882937e53c6d65d9 content/0: 94a492724251bdf6fe6645aa18134107 content/1: e6169fc196f6591f5e0c2a03a96e666d a9016b58a696b92d5b36778c210dd8e6: meta/title: 39378b0ec18a4d2b471cb7ed9c91523a - meta/openapi: 3a68b7674565e3597b20358836b13980 + meta/openapi: f4ddf1edaa6e740858f5fcad30e815a0 52d58e9a580715b8ca63a8a5d40da8d4: meta/title: fe484dcd75f74bdc0368dd933ed00843 - meta/openapi: cf4760e5ae8ad6740abbebda5f8333ac + meta/openapi: 1bf8d4b048b57277197524659f7158b6 content/0: 7e6f2624f6004740e254b12f605f9725 c25a4c2bc380946dc645e65746334478: meta/title: 35e6bab986fd118d8a053e6f8eb576a4 - meta/openapi: bb4c38566c9a66256b60f7c87ecf71ce + meta/openapi: e308d163588b737c7adc75e5b46fbe09 content/0: a23b8edc0b8cd61057a27018af6b81ab content/1: 9bca2d3bb48d9609613de2415db0a5ce 8020fd0c47641bef2080fadea39d3e15: meta/title: 4a35d550198f9ed75b11a07bf0405f28 - meta/openapi: e36080843924da17255f9800f1d05871 + meta/openapi: e7a84c5bbcce5e6c2644ea8cf2745e89 content/0: 26538494ac8de8fec8d4a0c728807eff content/1: a19e1d8db8c553492fec71f678040043 36b5cfa046272da99376b2f1cf99096d: meta/title: c72d2523021c4436ac3e0669244e1399 - meta/openapi: 10205bc55e1efd6a7f12800f62d75bf1 + meta/openapi: cd6e60874109636b4fc08f5ebac9df24 content/0: 316c9a0664d69c9e8e0186edf426bb98 9905af374ade0132f90b6306551b61a0: meta/title: be06a2f29834cf546867c4853d707785 - meta/openapi: ea23a428c4e239f70bac29141a7f390e + meta/openapi: ef9a70c4c26d2310df9aabe2b0a94909 content/0: 2c0e933b290262f986352ead773ff3f9 3c1a1f978215208a88b2fe1e8116ab45: meta/title: 0408988f3b0e3ebf3dcb6c930bdb43b7 - meta/openapi: 2d5e2be21fd2f9c4bb13cf7de77f54a2 + meta/openapi: a3641c5460c0b37a8a05ac38d86dec0f content/0: 91a29440209256979d10a118bc6c2693 3323631501f4ee08979bb22efd812ef8: meta/title: 58553523ecb5148cdf3c874848d49601 - meta/openapi: 9b4f86f27e4f17d2b983184208a1ffb9 + meta/openapi: 1b594d82e7ce11f5d30610573f7c7750 cf9ac9e2f59edc781b3d3459db85837c: meta/title: eae8b35ae217c35a0cd7c1fbcd16a54c - meta/openapi: e565a460b020d69d8017316079843652 + meta/openapi: 5b13050edcd18a51b09b92627823ce17 51d36ebb412c565be20487ddaefa71c9: meta/title: 786bbc9807512fb8ff600dc3742753b2 - meta/openapi: cd2c49312558876d2957046b96852263 + meta/openapi: e558394f8270f78b59316977e9f29d10 39068340bdc26d2c11b3c8aa13700797: meta/title: c61002db8ca9fe3986b2179b668f6c10 - meta/openapi: 4a231d28cbe519064b11e17c2ac6e232 + meta/openapi: 33a6486358b6d0c79313f87a0db09ba0 366ed0b7629f7a0784c698a2381e1f60: meta/title: cc8e58154ec49467d42ce52d01d80f19 meta/description: 67ff371f7859f838331c03a78ad02789 @@ -2249,14 +2254,15 @@ checksums: content/1: f32beb84c8723cce21eb30029a1e5641 content/2: 15a9d2ffa09c153799b89b65e8ff171c content/3: 42d02e39a9c243251aa6202d83e71722 - content/4: eb3d45673720d1f9910af7eba0971c74 - content/5: b31863b497e29b0f8c12333ac6fa6839 - content/6: 7d7e851102fde7a08fac048947f22a7c - content/7: 4d0fcd5858886fa732277c52c111b8a5 - content/8: c9cb21ead05108a64ae1fc776a6908eb - content/9: c51c754f9aa67fd29602d05f30e6b897 - content/10: 10e8e9a59847ddd720c6d06b12c7b120 - content/11: 9799b973234bf2d10d5c971b267f55a5 + content/4: 661e97346571e3f16d7b8aaf91b7be9f + content/5: 068c0e7a63654854a8169caf8eabb3ed + content/6: b31863b497e29b0f8c12333ac6fa6839 + content/7: 7d7e851102fde7a08fac048947f22a7c + content/8: 4d0fcd5858886fa732277c52c111b8a5 + content/9: c9cb21ead05108a64ae1fc776a6908eb + content/10: c51c754f9aa67fd29602d05f30e6b897 + content/11: 10e8e9a59847ddd720c6d06b12c7b120 + content/12: 9799b973234bf2d10d5c971b267f55a5 bedbce791777a52771d6fb8b7bf12f19: meta/title: ea67ee64bdad4275510252b5c14b708a meta/description: c85b849b71ca84751343c19c11bf286e @@ -2346,61 +2352,119 @@ checksums: content/13: 9799b973234bf2d10d5c971b267f55a5 a3a5575b45495ff99bc7a0141d89ca6f: meta/title: 4957c987f39b838075153a29d6176ed0 - meta/openapi: 0d09168a31c6114c85c527d14b846a66 + meta/openapi: 69d24ab8d7fff892c829d05de46fe762 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 d33ae375f9a18c66fe5cb2cea1242cd8: meta/title: 67d59ada6b0e11d702964ae9f0cffa1d - meta/openapi: 99919d6db5513a905b516e22dcf446ac + meta/openapi: cb42df433ba12697d7f21f9c70f2050e content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 25724a34b77af0602f9cb75c181cfda2: meta/title: b91c2ec3eee2b6085cc4cd637556b2a3 - meta/openapi: dda40886024cd406e652cf031a90b84b + meta/openapi: 34e4b2aeea66dc87bca721838131ed2b content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 f8c6453b983335cb19e4a130eb2e5b10: meta/title: ff257a0bb52fadac9d3ef84ddad6cf54 - meta/openapi: 5bac409c740524eea10f17ab535d90bf + meta/openapi: e6134d2de1e741ef2fe6635accf181d9 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 362b9250d28019e12e437c718585a7ed: meta/title: 3cc77048d9da6ed4ea376075b09bfa26 - meta/openapi: 7b348bb417b54877521b8a78b050ce12 + meta/openapi: c2cd4aff1756acb2de15fef196b027ff content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 fb5fb6ee6f27abeb2516a3733a8a2ebd: meta/title: 808188942551b6e13df290c45b47d789 - meta/openapi: 8abec93f28dad289bec79997eff959e7 + meta/openapi: 51c08b1df6eac56e323f8044421700a6 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 0fc9949d9c5e1f6908f0eb43dbcd1650: meta/title: 671971b570e80d6b5843a824472efe89 - meta/openapi: b9df7d5f0bdc35be5332537ebf6c6eb0 + meta/openapi: b5bc33bfa69d3f42ad85b18b244e8cfa content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 738b59e21fdab2928556ce570256b3d0: meta/title: 4a0417878be2b69b372844870758e18d - meta/openapi: 9fbb5819c3d30b78aebf820e7279d9e5 + meta/openapi: 9821e0410ba31f29ed9ae770d3fbfc3d content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 c5fa8786d5fb3d19104b1336f097d806: meta/title: fe347edfce020780f7237fe9e4804e01 - meta/openapi: d5fa961f27f55d7d207ea8e9b3ef2ea0 + meta/openapi: 0430bfeb31db4b5d4b0539b7481d90b4 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 78290d4788a06faa61b02ba4100a8dcc: meta/title: 1fae84d982c8f91d250e9766337b8b50 - meta/openapi: 1b207c81c30e81a9468ef8a50ed095a0 + meta/openapi: c158979b832f3c41c2f18f74c5adf9b1 + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 + d60b3e5d48b47960a1cd4597dee0a006: + meta/title: e6baacef306153bc891a97e3e9007062 + meta/openapi: efdc23812d31ee7f93c450586542c9b6 + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 + eb0ae2e5b64d8623c3791fa085d3697d: + meta/title: 4ca3d79032bb7a683208ddcc88827501 + meta/openapi: 33a205428a49baf355ba26965f30384f + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 + b8af879dacafc5fd3abdd5d560e6eedf: + meta/title: cb6eee9d29302e212aa7c84375d9e183 + meta/openapi: 92512c7432643edf5dd0ca6ffbb96e4f + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 + 2da04fa28957043e1e975b983157f81e: + meta/title: 76602d6d8af9ae1e79350356ee61ef1b + meta/openapi: 1a7700afc335bd788e672850b747db7e + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 + 66aa16dacbb389e11344753ffbaf4415: + meta/title: a02cd31c2ef5b79b438f9365c262ebca + meta/openapi: 9a967ed3a16f15b3e8be391bfd24a548 content/0: c3d96e3528a55b20b8fbcae10af25b02 content/1: 264d832bc605beaf5168c080bfed567c content/2: 580af53aa9812f2ec29a632e145669a5 + 9849bcfe2717187dbc7d30e3d5d65739: + meta/title: d9aa4c3d78b02df7fc6b3c90015b1444 + meta/description: c8ca5f3c7cbf8bc0ed9baf86d2e21cd2 + meta/og%3Adescription: c8ca5f3c7cbf8bc0ed9baf86d2e21cd2 + meta/icon: f7fcb89ee5b6043814813cd17a501ee5 + content/0: 5a744203158a22c1a7e1147187f9991d + content/1: afb4da5a3d24ffd4a72f969d9284c609 + content/2: 0e527053fb440456179c1636cd4e6a03 + content/3: 10e8e9a59847ddd720c6d06b12c7b120 + content/4: 9799b973234bf2d10d5c971b267f55a5 + a4b15ff93a97d963cb9e4349b4c8082f: + meta/title: 510e0fcb11a2a956510148bda5ad5ace + meta/description: 33690c4d6ca0e3da8147229707139ce9 + meta/og%3Adescription: 45ad445ee58a69fb3a2f836d2ef25ee6 + meta/icon: e4cd2c59f9f209b1f1add208482ae353 + content/0: 3a4bde97147f284fb2a4fbe130dcee9a + content/1: 001f0dbaf19c918b6e896c3c0afa433d + content/2: 3634a35ff36f4d45d6d14f78b83c432d + content/3: 10e8e9a59847ddd720c6d06b12c7b120 + content/4: 9799b973234bf2d10d5c971b267f55a5 + 00ad1ea5a31897ba8d809b95d2a35685: + meta/title: 491fbb938cfe44df0438ad3e198d23e6 + meta/description: 9733b476e1c9f0a0a54474613ec212ca + meta/og%3Adescription: 521871c1114d4eb622b24fd17ec6b91a + meta/icon: 36e4f21bf2ebca153bea0479669ef733 + content/0: 040377b8c13a0665ffb600ee52933821 + content/1: 10e8e9a59847ddd720c6d06b12c7b120 + content/2: 9799b973234bf2d10d5c971b267f55a5 diff --git a/lingo/glossary.csv b/lingo/glossary.csv index 32667f5..b2afc92 100644 --- a/lingo/glossary.csv +++ b/lingo/glossary.csv @@ -37,6 +37,7 @@ en,es,Metrics,Métricas,custom_translation,Product domain term plural en,es,Push Notifications,Notificaciones push,custom_translation,Product domain term en,es,Idempotency,Idempotencia,custom_translation,API behavior concept en,es,Rate Limiting,Límite de solicitudes,custom_translation,API behavior concept +en,es,Rate Limits,Límites de velocidad,custom_translation,API docs heading term en,es,Quickstart,Inicio rápido,custom_translation,Docs navigation term en,es,Reactivation,Reactivación,custom_translation,Lifecycle/product term en,es,Sender Verification,Verificación del remitente,custom_translation,Email product domain term diff --git a/openapi/admin.yml b/openapi/admin.yml new file mode 100644 index 0000000..c7a0de8 --- /dev/null +++ b/openapi/admin.yml @@ -0,0 +1,2768 @@ +openapi: 3.1.0 +info: + title: Trophy + version: '1.6.0' +paths: + /attributes: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + get: + description: List attributes. + operationId: admin_attributes_list + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - attributes + x-fern-sdk-method-name: list + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const attributes = await trophy.admin.attributes.list({ + limit: 10, + skip: 0 + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + attributes = client.admin.attributes.list( + limit=10, + skip=0 + ) + parameters: + - name: limit + in: query + description: Number of records to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 + example: 10 + - name: skip + in: query + description: Number of records to skip from the start of the list. + required: false + schema: + type: integer + minimum: 0 + default: 0 + example: 0 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ListAttributesResponse' + examples: + Attributes list: + value: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Plan + key: plan + type: user + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Device + key: device + type: event + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: List attributes + security: + - ApiKeyAuth: [] + post: + description: Create attributes in bulk. + operationId: admin_attributes_create + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - attributes + x-fern-sdk-method-name: create + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.attributes.create([ + { + name: 'Plan', + key: 'plan', + type: 'user' + }, + { + name: 'Device', + key: 'device', + type: 'event' + } + ]); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.attributes.create([ + { + "name": "Plan", + "key": "plan", + "type": "user" + }, + { + "name": "Device", + "key": "device", + "type": "event" + } + ]) + requestBody: + description: Array of attributes to create. Maximum 100 attributes per request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAttributesRequest' + examples: + Create user and event attributes: + value: + - name: Plan + key: plan + type: user + - name: Device + key: device + type: event + responses: + '200': + description: Successful operation (no attributes created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAttributesResponse' + examples: + All requests had errors: + value: + created: [] + issues: + - index: 0 + severity: error + message: Name not a string + - index: 1 + severity: error + message: Key already in use by another attribute of this type + '201': + description: Created (at least one attribute created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAttributesResponse' + examples: + Success with no issues: + value: + created: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Plan + key: plan + type: user + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Device + key: device + type: event + issues: [] + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Create attributes in bulk + security: + - ApiKeyAuth: [] + patch: + description: Update attributes in bulk by ID. + operationId: admin_attributes_update + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - attributes + x-fern-sdk-method-name: update + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.attributes.update([ + { + id: '550e8400-e29b-41d4-a716-446655440000', + name: 'Subscription Plan' + } + ]); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.attributes.update([ + { + "id": "550e8400-e29b-41d4-a716-446655440000", + "name": "Subscription Plan" + } + ]) + requestBody: + description: Array of attributes to update. Each item must include an ID and may include `name`. `key` and `type` cannot be changed. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAttributesRequest' + examples: + Rename attributes: + value: + - id: 550e8400-e29b-41d4-a716-446655440000 + name: Subscription Plan + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAttributesResponse' + examples: + Success with no issues: + value: + updated: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Subscription Plan + key: plan + type: user + issues: [] + Mixed success and errors: + value: + updated: + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Device + key: device + type: event + issues: + - id: '550e8400-e29b-41d4-a716-446655440999' + severity: error + message: Attribute not found by ID + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Update attributes in bulk + security: + - ApiKeyAuth: [] + delete: + description: Delete attributes in bulk by ID. + operationId: admin_attributes_delete + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - attributes + x-fern-sdk-method-name: delete + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.attributes.delete({ + ids: [ + '550e8400-e29b-41d4-a716-446655440000', + '550e8400-e29b-41d4-a716-446655440001' + ] + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.attributes.delete( + ids=[ + '550e8400-e29b-41d4-a716-446655440000', + '550e8400-e29b-41d4-a716-446655440001' + ] + ) + parameters: + - name: ids + in: query + description: Attribute IDs to delete. Repeat the query param or provide a comma-separated list. + required: true + schema: + type: array + items: + type: string + format: uuid + minItems: 1 + maxItems: 100 + style: form + explode: true + examples: + Multiple query params: + value: + - 550e8400-e29b-41d4-a716-446655440000 + - 550e8400-e29b-41d4-a716-446655440001 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAttributesResponse' + examples: + Success with no issues: + value: + deleted: + - id: '550e8400-e29b-41d4-a716-446655440000' + issues: [] + Mixed success and errors: + value: + deleted: + - id: '550e8400-e29b-41d4-a716-446655440000' + issues: + - id: not-a-uuid + severity: error + message: id must be a valid UUID + - id: '550e8400-e29b-41d4-a716-446655440999' + severity: error + message: Attribute not found by ID + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Delete attributes in bulk + security: + - ApiKeyAuth: [] + + /attributes/{id}: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + get: + description: Get an attribute by ID. + operationId: admin_attributes_get + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - attributes + x-fern-sdk-method-name: get + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const attribute = await trophy.admin.attributes.get( + '550e8400-e29b-41d4-a716-446655440000' + ); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + attribute = client.admin.attributes.get( + "550e8400-e29b-41d4-a716-446655440000" + ) + parameters: + - name: id + in: path + description: The UUID of the attribute to retrieve. + required: true + schema: + type: string + format: uuid + example: 550e8400-e29b-41d4-a716-446655440000 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/AdminAttribute' + examples: + User attribute: + value: + id: '550e8400-e29b-41d4-a716-446655440000' + name: Plan + key: plan + type: user + Event attribute: + value: + id: '550e8400-e29b-41d4-a716-446655440001' + name: Device + key: device + type: event + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: 'Attribute Not Found' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Get an attribute + security: + - ApiKeyAuth: [] + + /metrics: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + get: + description: List metrics. + operationId: admin_metrics_list + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - metrics + x-fern-sdk-method-name: list + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const metrics = await trophy.admin.metrics.list({ + limit: 10, + skip: 0 + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + metrics = client.admin.metrics.list( + limit=10, + skip=0 + ) + parameters: + - name: limit + in: query + description: Number of records to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 + example: 10 + - name: skip + in: query + description: Number of records to skip from the start of the list. + required: false + schema: + type: integer + minimum: 0 + default: 0 + example: 0 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ListMetricsResponse' + examples: + Metrics list: + value: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Oldest Metric + key: oldest-metric + unitType: number + units: '' + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Revenue + key: revenue + unitType: currency + units: USD + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: List metrics + security: + - ApiKeyAuth: [] + post: + description: Create metrics in bulk. + operationId: admin_metrics_create + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - metrics + x-fern-sdk-method-name: create + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.metrics.create([ + { + name: 'Invites Sent', + key: 'invites-sent' + }, + { + name: 'Revenue', + key: 'revenue', + unitType: 'currency', + units: 'USD' + } + ]); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.metrics.create([ + { + "name": "Invites Sent", + "key": "invites-sent" + }, + { + "name": "Revenue", + "key": "revenue", + "unitType": "currency", + "units": "USD" + } + ]) + requestBody: + description: Array of metrics to create. Maximum 100 metrics per request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMetricsRequest' + examples: + Create number and currency metrics: + value: + - name: Invites Sent + key: invites-sent + - name: Revenue + key: revenue + unitType: currency + units: USD + responses: + '200': + description: Successful operation (no metrics created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMetricsResponse' + examples: + All requests had errors: + value: + created: [] + issues: + - index: 0 + severity: error + message: Name not a string + - index: 1 + severity: error + message: Key already in use by another metric + '201': + description: Created (at least one metric created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMetricsResponse' + examples: + Success with no issues: + value: + created: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Invites Sent + key: invites-sent + unitType: number + units: '' + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Revenue + key: revenue + unitType: currency + units: USD + issues: [] + Mixed success and errors: + value: + created: + - id: '550e8400-e29b-41d4-a716-446655440002' + name: Signups + key: signups + unitType: number + units: '' + issues: + - index: 0 + severity: error + message: Key already in use by another metric + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Create metrics in bulk + security: + - ApiKeyAuth: [] + patch: + description: Update metrics in bulk by ID. + operationId: admin_metrics_update + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - metrics + x-fern-sdk-method-name: update + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.metrics.update([ + { + id: '550e8400-e29b-41d4-a716-446655440000', + name: 'Invites Completed', + units: 'invites' + }, + { + id: '550e8400-e29b-41d4-a716-446655440001', + unitType: 'number', + units: 'dollars' + } + ]); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.metrics.update([ + { + "id": "550e8400-e29b-41d4-a716-446655440000", + "name": "Invites Completed", + "units": "invites" + }, + { + "id": "550e8400-e29b-41d4-a716-446655440001", + "unitType": "number", + "units": "dollars" + } + ]) + requestBody: + description: Array of metrics to update. Each item must include an ID and may include any subset of mutable metric fields except `key`. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateMetricsRequest' + examples: + Update metric fields: + value: + - id: 550e8400-e29b-41d4-a716-446655440000 + name: Invites Completed + units: invites + - id: 550e8400-e29b-41d4-a716-446655440001 + unitType: number + units: dollars + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateMetricsResponse' + examples: + Success with no issues: + value: + updated: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Invites Completed + key: invites-sent + unitType: number + units: invites + issues: [] + Mixed success and errors: + value: + updated: + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Revenue + key: revenue + unitType: number + units: dollars + issues: + - id: '550e8400-e29b-41d4-a716-446655440999' + severity: error + message: Metric not found by ID + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Update metrics in bulk + security: + - ApiKeyAuth: [] + delete: + description: Delete metrics in bulk by ID. + operationId: admin_metrics_delete + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - metrics + x-fern-sdk-method-name: delete + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.metrics.delete({ + ids: [ + '550e8400-e29b-41d4-a716-446655440000', + '550e8400-e29b-41d4-a716-446655440001' + ] + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.metrics.delete( + ids=[ + '550e8400-e29b-41d4-a716-446655440000', + '550e8400-e29b-41d4-a716-446655440001' + ] + ) + parameters: + - name: ids + in: query + description: Metric IDs to delete. Repeat the query param or provide a comma-separated list. + required: true + schema: + type: array + items: + type: string + format: uuid + minItems: 1 + maxItems: 100 + style: form + explode: true + examples: + Multiple query params: + value: + - 550e8400-e29b-41d4-a716-446655440000 + - 550e8400-e29b-41d4-a716-446655440001 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteMetricsResponse' + examples: + Success with no issues: + value: + deleted: + - id: '550e8400-e29b-41d4-a716-446655440000' + issues: [] + Mixed success and errors: + value: + deleted: + - id: '550e8400-e29b-41d4-a716-446655440000' + issues: + - id: not-a-uuid + severity: error + message: id must be a valid UUID + - id: '550e8400-e29b-41d4-a716-446655440999' + severity: error + message: Metric not found by ID + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Delete metrics in bulk + security: + - ApiKeyAuth: [] + + /metrics/{id}: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + get: + description: Get a metric by ID. + operationId: admin_metrics_get + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - metrics + x-fern-sdk-method-name: get + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const metric = await trophy.admin.metrics.get( + '550e8400-e29b-41d4-a716-446655440000' + ); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + metric = client.admin.metrics.get( + "550e8400-e29b-41d4-a716-446655440000" + ) + parameters: + - name: id + in: path + description: The UUID of the metric to retrieve. + required: true + schema: + type: string + format: uuid + example: 550e8400-e29b-41d4-a716-446655440000 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/CreatedMetric' + examples: + Number metric: + value: + id: '550e8400-e29b-41d4-a716-446655440000' + name: Invites Sent + key: invites-sent + unitType: number + units: '' + Currency metric: + value: + id: '550e8400-e29b-41d4-a716-446655440001' + name: Revenue + key: revenue + unitType: currency + units: USD + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: 'Not Found' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Get a metric by ID + security: + - ApiKeyAuth: [] + + /points/boosts: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + post: + description: Create points boosts for multiple users. + operationId: admin_points_boosts_create + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - points + - boosts + x-fern-sdk-method-name: create + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.points.boosts.create({ + systemKey: 'xp', + boosts: [ + { + userId: 'user-123', + name: 'Double XP Weekend', + start: '2024-01-01', + end: '2024-01-03', + multiplier: 2 + }, + { + userId: 'user-456', + name: 'Holiday Bonus', + start: '2024-12-25', + multiplier: 1.5, + rounding: 'up' + } + ] + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.points.boosts.create({ + "systemKey": "xp", + "boosts": [ + { + "userId": "user-123", + "name": "Double XP Weekend", + "start": "2024-01-01", + "end": "2024-01-03", + "multiplier": 2 + }, + { + "userId": "user-456", + "name": "Holiday Bonus", + "start": "2024-12-25", + "multiplier": 1.5, + "rounding": "up" + } + ] + }) + requestBody: + description: The points system key and array of boosts to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePointsBoostsRequest' + examples: + Create boosts for multiple users: + value: + systemKey: xp + boosts: + - userId: user-123 + name: Double XP Weekend + start: '2024-01-01' + end: '2024-01-03' + multiplier: 2 + - userId: user-456 + name: Holiday Bonus + start: '2024-12-25' + multiplier: 1.5 + rounding: up + responses: + '200': + description: Successful operation (no boosts created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePointsBoostsResponse' + examples: + All requests had errors: + value: + created: [] + issues: + - userId: non-existent-user + severity: error + message: User does not exist + '201': + description: Created (at least one boost created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePointsBoostsResponse' + examples: + Success with no issues: + value: + created: + - id: '550e8400-e29b-41d4-a716-446655440000' + name: Double XP Weekend + status: active + start: '2024-01-01' + end: '2024-01-03' + multiplier: 2 + rounding: down + userId: user-123 + issues: [] + Mixed success and errors: + value: + created: + - id: '550e8400-e29b-41d4-a716-446655440001' + name: Valid Boost + status: active + start: '2024-01-15' + end: null + multiplier: 1.5 + rounding: down + userId: user-456 + issues: + - userId: non-existent-user + severity: error + message: User does not exist + '400': + description: 'Bad Request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: 'Not Found (points system not found)' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Create points boosts for multiple users + security: + - ApiKeyAuth: [] + delete: + description: Delete multiple points boosts by ID. + operationId: admin_points_boosts_delete + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - points + - boosts + x-fern-sdk-method-name: delete + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.points.boosts.delete({ + ids: ['boost-uuid-1', 'boost-uuid-2', 'boost-uuid-3'] + }); + + console.log(`Deleted ${response.deleted.length} boosts`); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.points.boosts.delete( + ids=['boost-uuid-1', 'boost-uuid-2', 'boost-uuid-3'] + ) + + print(f"Deleted {len(response.deleted)} boosts") + parameters: + - name: ids + in: query + description: A list of up to 100 boost IDs. + required: true + schema: + type: array + items: + type: string + minItems: 1 + maxItems: 100 + example: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,b1ffcd00-0d1c-4ef9-cc7e-7cc0ce491b22' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/DeletePointsBoostsResponse' + examples: + All boosts deleted: + value: + deleted: + - id: '550e8400-e29b-41d4-a716-446655440000' + - id: '550e8400-e29b-41d4-a716-446655440001' + - id: '550e8400-e29b-41d4-a716-446655440002' + issues: [] + Some boosts not found: + value: + deleted: + - id: '550e8400-e29b-41d4-a716-446655440000' + issues: + - boostId: '550e8400-e29b-41d4-a716-446655440001' + severity: warning + message: Points boost not found + No boosts found: + value: + deleted: [] + issues: + - boostId: '550e8400-e29b-41d4-a716-446655440999' + severity: warning + message: Points boost not found + '400': + description: 'Bad Request (no IDs provided or invalid UUID format)' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Delete multiple points boosts + security: + - ApiKeyAuth: [] + /leaderboards: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + get: + description: List leaderboards. + operationId: admin_leaderboards_list + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - leaderboards + x-fern-sdk-method-name: list + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const leaderboards = await trophy.admin.leaderboards.list({ + limit: 10, + skip: 0 + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + leaderboards = client.admin.leaderboards.list( + limit=10, + skip=0 + ) + parameters: + - name: limit + in: query + description: Number of records to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 + example: 10 + - name: skip + in: query + description: Number of records to skip from the start of the list. + required: false + schema: + type: integer + minimum: 0 + default: 0 + example: 0 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ListLeaderboardsResponse' + examples: + Leaderboards list: + value: + - id: '550e8400-e29b-41d4-a716-446655440100' + name: Revenue Champions + key: revenue-champions + description: Ranked by monthly revenue + status: active + rankBy: metric + metricId: '550e8400-e29b-41d4-a716-446655440000' + maxParticipants: 100 + start: '2026-04-20' + end: '2026-05-20' + breakdownAttributes: + - '550e8400-e29b-41d4-a716-446655440010' + runUnit: month + runInterval: 1 + - id: '550e8400-e29b-41d4-a716-446655440101' + name: Streak Legends + key: streak-legends + status: scheduled + rankBy: streak + maxParticipants: 1000 + start: '2026-04-27' + breakdownAttributes: [] + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: List leaderboards + security: + - ApiKeyAuth: [] + post: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + description: Create leaderboards in bulk. Maximum 100 leaderboards per request. + operationId: admin_leaderboards_create + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - leaderboards + x-fern-sdk-method-name: create + tags: + - Admin + requestBody: + description: Array of leaderboards to create. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLeaderboardsRequest' + examples: + Create leaderboards: + value: + - name: Revenue Champions + key: revenue-champions + status: inactive + rankBy: metric + metricId: 550e8400-e29b-41d4-a716-446655440000 + maxParticipants: 100 + start: '2026-04-20' + breakdownAttributes: + - 550e8400-e29b-41d4-a716-446655440010 + runUnit: month + runInterval: 1 + - name: Streak Legends + key: streak-legends + status: scheduled + rankBy: streak + start: '2026-04-27' + responses: + '200': + description: Successful operation (no leaderboards created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLeaderboardsResponse' + '201': + description: Created (at least one leaderboard created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLeaderboardsResponse' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Create leaderboards in bulk + security: + - ApiKeyAuth: [] + patch: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + description: Update leaderboards in bulk by ID. Updating `status` behaves the same as activating, scheduling, deactivating, or finishing a leaderboard in the dashboard. + operationId: admin_leaderboards_update + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - leaderboards + x-fern-sdk-method-name: update + tags: + - Admin + requestBody: + description: Array of leaderboards to update. Each item must include an ID. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateLeaderboardsRequest' + examples: + Update leaderboards: + value: + - id: 550e8400-e29b-41d4-a716-446655440100 + name: Monthly Revenue Champions + description: Ranked by monthly revenue + status: active + - id: 550e8400-e29b-41d4-a716-446655440101 + status: finished + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateLeaderboardsResponse' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Update leaderboards in bulk + security: + - ApiKeyAuth: [] + delete: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + description: Delete leaderboards in bulk by ID. + operationId: admin_leaderboards_delete + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - leaderboards + x-fern-sdk-method-name: delete + tags: + - Admin + parameters: + - name: ids + in: query + description: Leaderboard IDs to delete. Repeat the query param or provide a comma-separated list. + required: true + schema: + type: array + items: + type: string + format: uuid + minItems: 1 + maxItems: 100 + style: form + explode: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteLeaderboardsResponse' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Delete leaderboards in bulk + security: + - ApiKeyAuth: [] + + /leaderboards/{id}: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + get: + description: Get a leaderboard by ID. + operationId: admin_leaderboards_get + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - leaderboards + x-fern-sdk-method-name: get + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const leaderboard = await trophy.admin.leaderboards.get( + '550e8400-e29b-41d4-a716-446655440100' + ); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + leaderboard = client.admin.leaderboards.get( + "550e8400-e29b-41d4-a716-446655440100" + ) + parameters: + - name: id + in: path + description: The UUID of the leaderboard to retrieve. + required: true + schema: + type: string + format: uuid + example: 550e8400-e29b-41d4-a716-446655440100 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/AdminLeaderboard' + examples: + Metric leaderboard: + value: + id: '550e8400-e29b-41d4-a716-446655440100' + name: Revenue Champions + key: revenue-champions + description: Ranked by monthly revenue + status: active + rankBy: metric + metricId: '550e8400-e29b-41d4-a716-446655440000' + maxParticipants: 100 + start: '2026-04-20' + end: '2026-05-20' + breakdownAttributes: + - '550e8400-e29b-41d4-a716-446655440010' + runUnit: month + runInterval: 1 + Streak leaderboard: + value: + id: '550e8400-e29b-41d4-a716-446655440101' + name: Streak Legends + key: streak-legends + status: active + rankBy: streak + maxParticipants: 1000 + start: '2026-04-27' + breakdownAttributes: [] + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: 'Leaderboard Not Found' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Get a leaderboard + security: + - ApiKeyAuth: [] + /streaks/freezes: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + post: + description: Create streak freezes for multiple users. + operationId: admin_streaks_freezes_create + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - streaks + - freezes + x-fern-sdk-method-name: create + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.streaks.freezes.create({ + freezes: [ + { userId: 'user-123' }, + { userId: 'user-456' }, + ] + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.streaks.freezes.create({ + "freezes": [ + {"userId": "user-123"}, + {"userId": "user-456"} + ] + }) + requestBody: + description: Array of freezes to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateStreakFreezesRequest' + examples: + Create freezes for multiple users: + value: + freezes: + - userId: user-123 + - userId: user-456 + - userId: user-123 + responses: + '200': + description: Successful operation (no freezes created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateStreakFreezesResponse' + examples: + Success with warnings: + value: + issues: + - userId: user-789 + severity: warning + message: Would exceed maximum freeze limit + Mixed success and errors: + value: + issues: + - userId: non-existent-user + severity: error + message: User does not exist + - userId: user-456 + severity: warning + message: Would exceed maximum freeze limit + '201': + description: Created (at least one freeze created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateStreakFreezesResponse' + examples: + Success with no issues: + value: + issues: [] + Mixed success and warnings: + value: + issues: + - userId: user-456 + severity: warning + message: Would exceed maximum freeze limit + '400': + description: 'Bad Request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Create streak freezes for multiple users + security: + - ApiKeyAuth: [] + + /streaks/restore: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + post: + description: 'Restore streaks for multiple users to the maximum previously achieved streak length found within the current restore window: the last 90 days for daily streaks, weekly periods starting with the week containing the start of the current calendar year for weekly streaks, and monthly periods starting at the beginning of the previous calendar year for monthly streaks.' + operationId: admin_streaks_restore + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - streaks + x-fern-sdk-method-name: restore + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.streaks.restore({ + users: [{ id: 'user-123' }, { id: 'user-456' }] + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.streaks.restore({ + "users": [{"id": "user-123"}, {"id": "user-456"}] + }) + requestBody: + description: Array of users to restore streaks for + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RestoreStreaksRequest' + examples: + Restore streaks for multiple users: + value: + users: + - id: user-123 + - id: user-456 + responses: + '200': + description: Successful operation (no streaks restored) + content: + application/json: + schema: + $ref: '#/components/schemas/RestoreStreaksResponse' + examples: + Success with warnings: + value: + restoredUsers: [] + issues: + - userId: user-123 + severity: warning + message: No streak to restore + Mixed success and errors: + value: + restoredUsers: [] + issues: + - userId: non-existent-user + severity: error + message: User does not exist + - userId: user-789 + severity: warning + message: No streak to restore + '201': + description: Created (at least one streak restored) + content: + application/json: + schema: + $ref: '#/components/schemas/RestoreStreaksResponse' + examples: + Success with no issues: + value: + restoredUsers: + - user-123 + - user-456 + issues: [] + Mixed success and errors: + value: + restoredUsers: + - user-123 + issues: + - userId: non-existent-user + severity: error + message: User does not exist + '400': + description: 'Bad Request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '401': + description: 'Unauthorized' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '422': + description: 'Unprocessible Entity' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + summary: Restore streaks for multiple users + security: + - ApiKeyAuth: [] +components: + schemas: + ErrorBody: + title: ErrorBody + type: object + properties: + error: + type: string + required: + - error + CreateStreakFreezesRequest: + title: CreateStreakFreezesRequest + type: object + description: Request body for creating streak freezes. + properties: + freezes: + type: array + items: + type: object + properties: + userId: + type: string + description: The ID of the user to create a freeze for. + example: user-123 + required: + - userId + description: Array of freezes to create. Maximum 100 freezes per request. + maxItems: 100 + minItems: 1 + required: + - freezes + CreateStreakFreezesResponse: + title: CreateStreakFreezesResponse + type: object + description: Response containing any issues encountered while creating streak freezes. + properties: + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during freeze creation. + required: + - issues + CreateAttributesRequest: + title: CreateAttributesRequest + type: array + description: Request body for creating attributes. + items: + $ref: '#/components/schemas/CreateAttributeRequestItem' + minItems: 1 + maxItems: 100 + CreateAttributeRequestItem: + title: CreateAttributeRequestItem + type: object + description: An attribute to create. + properties: + name: + type: string + description: The attribute name. + example: Plan + key: + type: string + pattern: '^[a-zA-Z\d-_]+$' + description: The attribute key. Only alphanumeric characters, hyphens, and underscores are permitted. + example: plan + type: + type: string + enum: + - user + - event + description: The attribute type. + example: user + required: + - name + - key + - type + AdminAttribute: + title: AdminAttribute + type: object + description: An attribute returned from the admin attributes endpoints. + properties: + id: + type: string + format: uuid + description: The UUID of the attribute. + name: + type: string + description: The attribute name. + key: + type: string + description: The attribute key. + type: + type: string + enum: + - user + - event + description: The attribute type. + required: + - id + - name + - key + - type + CreateAttributesResponse: + title: CreateAttributesResponse + type: object + description: Response containing created attributes and any per-item issues. + properties: + created: + type: array + items: + $ref: '#/components/schemas/AdminAttribute' + description: Array of successfully created attributes. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during attribute creation. + required: + - created + - issues + UpdateAttributesRequest: + title: UpdateAttributesRequest + type: array + description: Request body for updating attributes. + items: + $ref: '#/components/schemas/UpdateAttributeRequestItem' + minItems: 1 + maxItems: 100 + UpdateAttributeRequestItem: + title: UpdateAttributeRequestItem + type: object + description: 'An attribute update object. `id` is required and `name` is optional. `key` and `type` cannot be changed through this endpoint.' + properties: + id: + type: string + format: uuid + description: The UUID of the attribute to update. + example: 550e8400-e29b-41d4-a716-446655440000 + name: + type: string + description: The updated attribute name. + example: Subscription Plan + required: + - id + UpdateAttributesResponse: + title: UpdateAttributesResponse + type: object + description: Response containing updated attributes and any per-item issues identified by attribute ID. + properties: + updated: + type: array + items: + $ref: '#/components/schemas/AdminAttribute' + description: Array of successfully updated attributes. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during attribute update. + required: + - updated + - issues + DeleteAttributesResponse: + title: DeleteAttributesResponse + type: object + description: Response containing deleted attributes represented by ID and any per-item issues, including invalid or missing attribute IDs. + properties: + deleted: + type: array + items: + $ref: '#/components/schemas/DeletedResource' + description: Array of deleted attributes represented by ID. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during attribute deletion. + required: + - deleted + - issues + ListAttributesResponse: + title: ListAttributesResponse + type: array + description: A paginated list of attributes. + items: + $ref: '#/components/schemas/AdminAttribute' + CreateLeaderboardsRequest: + title: CreateLeaderboardsRequest + type: array + description: Request body for creating leaderboards. + items: + $ref: '#/components/schemas/CreateLeaderboardRequestItem' + minItems: 1 + maxItems: 100 + CreateLeaderboardRequestItem: + title: CreateLeaderboardRequestItem + type: object + description: A leaderboard to create. + properties: + name: + type: string + description: The leaderboard name. + example: Revenue Champions + key: + type: string + pattern: '^[a-zA-Z\d-_]+$' + description: The leaderboard key. Only alphanumeric characters, hyphens, and underscores are permitted. + example: revenue-champions + description: + type: string + description: The leaderboard description. + example: Ranked by monthly revenue + status: + type: string + enum: + - inactive + - active + - scheduled + - finished + default: inactive + description: The initial user-facing status. Defaults to `inactive`. Use `scheduled` for leaderboards that should be active in the future and `finished` only when creating a leaderboard with an end date in the past. + example: inactive + rankBy: + type: string + enum: + - metric + - streak + - points + description: What the leaderboard ranks by. + example: metric + metricId: + type: string + format: uuid + description: The metric ID to rank by when `rankBy` is `metric`. + pointsSystemId: + type: string + format: uuid + description: The points system ID to rank by when `rankBy` is `points`. + maxParticipants: + type: integer + minimum: 1 + maximum: 1000 + default: 1000 + description: The maximum number of participants. Defaults to `1000`. + example: 100 + start: + type: string + format: date + description: The leaderboard start date in YYYY-MM-DD format. Defaults to today when omitted. + example: '2026-04-20' + end: + type: string + format: date + description: The optional leaderboard end date in YYYY-MM-DD format. + example: '2026-05-20' + breakdownAttributes: + type: array + description: The UUIDs of the active user attributes to break rankings down by. + items: + type: string + format: uuid + runUnit: + type: string + enum: + - day + - month + - year + description: How often the leaderboard repeats. Omit for a non-recurring leaderboard. Streak leaderboards cannot repeat. + example: month + runInterval: + type: integer + minimum: 1 + description: The number of `runUnit`s between repeats. Required when `runUnit` is set. + example: 1 + required: + - name + - key + - rankBy + AdminLeaderboard: + title: AdminLeaderboard + type: object + description: A leaderboard returned from the admin leaderboards endpoints. + properties: + id: + type: string + format: uuid + description: The UUID of the leaderboard. + name: + type: string + description: The leaderboard name. + key: + type: string + description: The leaderboard key. + description: + type: string + description: The leaderboard description. + status: + type: string + enum: + - inactive + - active + - scheduled + - finished + description: The current user-facing status of the leaderboard. + rankBy: + type: string + enum: + - metric + - streak + - points + description: What the leaderboard ranks by. + metricId: + type: string + format: uuid + description: The metric ID used when `rankBy` is `metric`. + pointsSystemId: + type: string + format: uuid + description: The points system ID used when `rankBy` is `points`. + maxParticipants: + type: integer + description: The maximum number of participants. + start: + type: string + format: date + description: The leaderboard start date in YYYY-MM-DD format. + end: + type: string + format: date + description: The optional leaderboard end date in YYYY-MM-DD format. + breakdownAttributes: + type: array + description: The UUIDs of the user attributes used for ranking breakdowns. + items: + type: string + format: uuid + runUnit: + type: string + enum: + - day + - month + - year + description: The recurrence unit when the leaderboard repeats. + runInterval: + type: integer + description: The number of recurrence units between leaderboard runs. + required: + - id + - name + - key + - status + - rankBy + - maxParticipants + - start + - breakdownAttributes + CreateLeaderboardsResponse: + title: CreateLeaderboardsResponse + type: object + description: Response containing created leaderboards and any per-item issues. + properties: + created: + type: array + items: + $ref: '#/components/schemas/AdminLeaderboard' + description: Array of successfully created leaderboards. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during leaderboard creation. + required: + - created + - issues + UpdateLeaderboardsRequest: + title: UpdateLeaderboardsRequest + type: array + description: Request body for updating leaderboards. + items: + $ref: '#/components/schemas/UpdateLeaderboardRequestItem' + minItems: 1 + maxItems: 100 + UpdateLeaderboardRequestItem: + title: UpdateLeaderboardRequestItem + type: object + description: 'A leaderboard update object. `id` is required. Once a leaderboard has been activated, the dashboard-imposed restrictions on ranking configuration and scheduling changes still apply.' + properties: + id: + type: string + format: uuid + description: The UUID of the leaderboard to update. + example: 550e8400-e29b-41d4-a716-446655440100 + name: + type: string + description: The updated leaderboard name. + key: + type: string + pattern: '^[a-zA-Z\d-_]+$' + description: The updated leaderboard key. This can only be changed while the leaderboard is inactive. + description: + type: string + description: The updated leaderboard description. + status: + type: string + enum: + - inactive + - active + - scheduled + - finished + description: The target user-facing status. `scheduled` activates a leaderboard whose start date is in the future. `finished` behaves like the dashboard finish action. + rankBy: + type: string + enum: + - metric + - streak + - points + description: The updated ranking criterion. This can only be changed while the leaderboard is inactive. + metricId: + type: string + format: uuid + description: The metric ID to use when `rankBy` is `metric`. + pointsSystemId: + type: string + format: uuid + description: The points system ID to use when `rankBy` is `points`. + maxParticipants: + type: integer + minimum: 1 + maximum: 1000 + description: The updated maximum number of participants. + start: + type: string + format: date + description: The updated start date in YYYY-MM-DD format. + end: + oneOf: + - type: string + format: date + - type: 'null' + description: The updated end date in YYYY-MM-DD format, or `null` to clear it. + breakdownAttributes: + type: array + description: The updated breakdown attribute UUIDs. + items: + type: string + format: uuid + runUnit: + oneOf: + - type: string + enum: + - day + - month + - year + - type: 'null' + description: The updated recurrence unit. + runInterval: + type: integer + minimum: 1 + description: The updated recurrence interval. + required: + - id + UpdateLeaderboardsResponse: + title: UpdateLeaderboardsResponse + type: object + description: Response containing updated leaderboards and any per-item issues identified by leaderboard ID. + properties: + updated: + type: array + items: + $ref: '#/components/schemas/AdminLeaderboard' + description: Array of successfully updated leaderboards. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during leaderboard update. + required: + - updated + - issues + DeleteLeaderboardsResponse: + title: DeleteLeaderboardsResponse + type: object + description: Response containing deleted leaderboards represented by ID and any per-item issues. + properties: + deleted: + type: array + items: + $ref: '#/components/schemas/DeletedResource' + description: Array of deleted leaderboards represented by ID. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during leaderboard deletion. + required: + - deleted + - issues + ListLeaderboardsResponse: + title: ListLeaderboardsResponse + type: array + description: A paginated list of leaderboards. + items: + $ref: '#/components/schemas/AdminLeaderboard' + CreateMetricsRequest: + title: CreateMetricsRequest + type: array + description: Request body for creating metrics. + items: + $ref: '#/components/schemas/CreateMetricRequestItem' + minItems: 1 + maxItems: 100 + CreateMetricRequestItem: + title: CreateMetricRequestItem + type: object + description: A metric to create. + properties: + name: + type: string + description: The metric name. + example: Invites Sent + key: + type: string + pattern: '^[a-zA-Z\d-_]+$' + description: The metric key. Only alphanumeric characters, hyphens, and underscores are permitted. + example: invites-sent + unitType: + type: string + enum: + - number + - currency + default: number + description: The metric unit type. Defaults to `number`. + example: currency + units: + type: string + description: 'For `unitType: currency`, this must be a supported `MetricCurrency` code such as `USD`. For `number`, this is an optional freeform unit label.' + example: USD + required: + - name + - key + CreatedMetric: + title: CreatedMetric + type: object + description: A successfully created metric returned from the create endpoint. + properties: + id: + type: string + format: uuid + description: The UUID of the created metric. + name: + type: string + description: The metric name. + key: + type: string + description: The metric key. + unitType: + type: string + enum: + - number + - currency + description: The metric unit type. + units: + type: string + description: The stored units value for the metric. + required: + - id + - name + - key + - unitType + - units + CreateMetricsResponse: + title: CreateMetricsResponse + type: object + description: Response containing created metrics and any per-item issues. + properties: + created: + type: array + items: + $ref: '#/components/schemas/CreatedMetric' + description: Array of successfully created metrics. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during metric creation. + required: + - created + - issues + UpdateMetricsRequest: + title: UpdateMetricsRequest + type: array + description: Request body for updating metrics. + items: + $ref: '#/components/schemas/UpdateMetricRequestItem' + minItems: 1 + maxItems: 100 + UpdateMetricRequestItem: + title: UpdateMetricRequestItem + type: object + description: 'A metric update object. `id` is required; `name`, `unitType`, and `units` are optional. `key` cannot be changed through this endpoint.' + properties: + id: + type: string + format: uuid + description: The UUID of the metric to update. + example: 550e8400-e29b-41d4-a716-446655440000 + name: + type: string + description: The updated metric name. + example: Invites Completed + unitType: + type: string + enum: + - number + - currency + description: The updated metric unit type. + example: currency + units: + type: string + description: 'The updated units value. For `unitType: currency`, this must be a supported `MetricCurrency` code such as `USD`.' + example: USD + required: + - id + UpdateMetricsResponse: + title: UpdateMetricsResponse + type: object + description: Response containing updated metrics and any per-item issues identified by metric ID. + properties: + updated: + type: array + items: + $ref: '#/components/schemas/CreatedMetric' + description: Array of successfully updated metrics. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during metric update. + required: + - updated + - issues + DeleteMetricsResponse: + title: DeleteMetricsResponse + type: object + description: Response containing deleted metrics represented by ID and any per-item issues, including invalid or missing metric IDs. + properties: + deleted: + type: array + items: + $ref: '#/components/schemas/DeletedResource' + description: Array of deleted metrics represented by ID. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during metric deletion. + required: + - deleted + - issues + ListMetricsResponse: + title: ListMetricsResponse + type: array + description: A paginated list of metrics. + items: + $ref: '#/components/schemas/CreatedMetric' + CreatePointsBoostsRequest: + title: CreatePointsBoostsRequest + type: object + description: Request body for creating points boosts. + properties: + systemKey: + type: string + description: The key of the points system to create boosts for. + example: xp + boosts: + type: array + items: + type: object + properties: + userId: + type: string + description: The ID of the user to create a boost for. + example: user-123 + name: + type: string + description: The name of the boost. + maxLength: 255 + example: Double XP Weekend + start: + type: string + format: date + description: The start date of the boost (YYYY-MM-DD). + example: '2024-01-01' + end: + type: + - string + - 'null' + format: date + description: The end date of the boost (YYYY-MM-DD). If null, the boost has no end date. + example: '2024-01-03' + multiplier: + type: number + description: The points multiplier. Must be greater than 0, not equal to 1, and less than 100. + example: 2 + exclusiveMinimum: 0 + exclusiveMaximum: 100 + rounding: + type: string + enum: + - down + - up + - nearest + default: down + description: How to round the boosted points. Defaults to 'down'. + example: down + required: + - userId + - name + - start + - multiplier + description: Array of boosts to create. Maximum 100 boosts per request. + maxItems: 100 + minItems: 1 + required: + - systemKey + - boosts + CreatedPointsBoost: + title: CreatedPointsBoost + type: object + description: A successfully created points boost returned from the create endpoint. + properties: + id: + type: string + format: uuid + description: The UUID of the created boost. + name: + type: string + description: The name of the boost. + status: + type: string + enum: ['active', 'scheduled', 'finished'] + description: The status of the boost. + start: + type: string + format: date + description: The start date (YYYY-MM-DD). + end: + type: + - string + - 'null' + format: date + description: The end date (YYYY-MM-DD) or null if no end date. + multiplier: + type: number + description: The points multiplier. + rounding: + type: string + enum: + - down + - up + - nearest + description: How boosted points are rounded. + userId: + type: string + description: The customer ID of the user the boost was created for. + required: + - id + - name + - status + - start + - end + - multiplier + - rounding + - userId + CreatePointsBoostsResponse: + title: CreatePointsBoostsResponse + type: object + description: Response containing created boosts and any issues encountered while creating points boosts. + properties: + created: + type: array + items: + $ref: '#/components/schemas/CreatedPointsBoost' + description: Array of successfully created boosts. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during boost creation. + required: + - created + - issues + DeletePointsBoostsResponse: + title: DeletePointsBoostsResponse + type: object + description: Response containing the points boosts that were deleted and any per-item issues. + properties: + deleted: + type: array + items: + $ref: '#/components/schemas/DeletedResource' + description: Array of deleted points boosts represented by ID. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during boost deletion. + required: + - deleted + - issues + RestoreStreaksRequest: + title: RestoreStreaksRequest + type: object + description: Request body for restoring streaks for multiple users. + properties: + users: + type: array + items: + type: object + properties: + id: + type: string + description: The ID of the user to restore streaks for. + example: user-123 + required: + - id + description: Array of users to restore streaks for. Maximum 100 users per request. + maxItems: 100 + minItems: 1 + example: + - id: user-123 + - id: user-456 + required: + - users + RestoreStreaksResponse: + title: RestoreStreaksResponse + type: object + description: Response containing restored users and any issues encountered. + properties: + restoredUsers: + type: array + items: + type: string + description: Array of user IDs whose streaks were successfully restored. + example: + - user-123 + - user-456 + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during streak restoration. + required: + - restoredUsers + - issues + AdminIssue: + title: AdminIssue + type: object + description: An issue encountered while processing an item in an admin API request. + properties: + userId: + type: string + description: The ID of the user the issue relates to, when applicable. + example: user-123 + boostId: + type: string + description: The ID of the points boost the issue relates to, when applicable. + example: 550e8400-e29b-41d4-a716-446655440000 + index: + type: integer + description: The zero-based index of the item the issue relates to, when no resource ID exists yet. + example: 0 + severity: + type: string + enum: + - error + - warning + description: The severity level of the issue. + example: warning + message: + type: string + description: A human-readable description of the issue. + example: Would exceed maximum freeze limit + required: + - severity + - message + DeletedResource: + title: DeletedResource + type: object + description: A deleted resource represented by ID. + properties: + id: + type: string + format: uuid + description: The ID of the deleted resource. + required: + - id + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-KEY +servers: + - x-fern-server-name: Admin API + url: https://admin.trophy.so/v1 + description: Admin API diff --git a/api-reference/openapi.yml b/openapi/application.yml similarity index 73% rename from api-reference/openapi.yml rename to openapi/application.yml index 1f84b99..073a4e3 100644 --- a/api-reference/openapi.yml +++ b/openapi/application.yml @@ -3,8 +3,6 @@ info: title: Trophy version: '1.6.0' paths: - # APPLICATION API ------------------------------------------------------- - /achievements: servers: - url: https://api.trophy.so/v1 @@ -496,9 +494,7 @@ paths: content: application/json: schema: - type: object $ref: '#/components/schemas/UpsertedUser' - description: The user object. responses: '201': description: Identified user @@ -681,15 +677,6 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - examples: - Successful operation: - value: - id: user-id - email: user@example.com - tz: Europe/London - subscribedToEmails: true - created: '2021-01-01T00:00:00Z' - updated: '2021-01-01T00:00:00Z' '400': description: 'Bad Request' content: @@ -779,15 +766,6 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - examples: - Successful operation: - value: - id: user-id - email: user@example.com - tz: Europe/London - subscribedToEmails: true - created: '2021-01-01T00:00:00Z' - updated: '2021-01-01T00:00:00Z' '400': description: 'Bad Request' content: @@ -1506,7 +1484,6 @@ paths: content: application/json: schema: - type: object $ref: '#/components/schemas/StreakResponse' examples: Successful operation: @@ -3148,1653 +3125,161 @@ paths: summary: Get a single leaderboard security: - ApiKeyAuth: [] - - # ADMIN API ------------------------------------------------------------ - - /streaks/freezes: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API +webhooks: + achievement.completed: post: - description: Create streak freezes for multiple users. - operationId: admin_streaks_freezes_create - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - streaks - - freezes - x-fern-sdk-method-name: create - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.streaks.freezes.create({ - freezes: [ - { userId: 'user-123' }, - { userId: 'user-456' }, - ] - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') + summary: Achievement completed + operationId: webhooks_achievement_completed + description: Triggered when a user completes an achievement. + requestBody: + description: The webhook event. + content: + application/json: + schema: + properties: + type: + type: string + enum: ['achievement.completed'] + description: The webhook event type. + user: + $ref: '#/components/schemas/User' + description: The user who completed the achievement. + achievement: + $ref: '#/components/schemas/UserAchievementResponse' + description: The achievement completion that occurred. + required: + - type + - user + - achievement + examples: + Achievement completed: + value: + type: achievement.completed + user: + id: user-id + email: user@example.com + tz: Europe/London + subscribedToEmails: true + created: '2021-01-01T00:00:00Z' + updated: '2021-01-01T00:00:00Z' + attributes: + department: engineering + role: developer + achievement: + id: d01dcbcb-d51e-4c12-b054-dc811dcdc625 + name: Completed Onboarding + trigger: api + description: null + key: completed-onboarding + achievedAt: '2021-01-01T00:00:00Z' + badgeUrl: https://example.com/badge2.png - response = client.admin.streaks.freezes.create({ - "freezes": [ - {"userId": "user-123"}, - {"userId": "user-456"} - ] - }) + responses: + '200': + description: Return a 200 status to indicate the webhook was received and processed. + streak.started: + post: + summary: Streak started + operationId: webhooks_streak_started + description: Triggered when a user starts a streak. requestBody: - description: Array of freezes to create - required: true + description: The webhook event. content: application/json: schema: - $ref: '#/components/schemas/CreateStreakFreezesRequest' + properties: + type: + type: string + enum: ['streak.started'] + description: The webhook event type. + user: + $ref: '#/components/schemas/User' + description: The user who started the streak. + streak: + $ref: '#/components/schemas/BaseStreakResponse' + description: The streak that was started. + required: + - type + - user + - streak examples: - Create freezes for multiple users: + Streak started: value: - freezes: - - userId: user-123 - - userId: user-456 - - userId: user-123 + type: streak.started + user: + id: user-id + email: user@example.com + tz: Europe/London + subscribedToEmails: true + created: '2021-01-01T00:00:00Z' + updated: '2021-01-01T00:00:00Z' + attributes: + department: engineering + role: developer + streak: + length: 1 + frequency: daily + periodStart: '2025-04-02' + periodEnd: '2025-04-02' + started: '2025-04-02' + expires: '2025-04-03' + freezes: 0 + maxFreezes: 3 + freezeAutoEarnInterval: 7 + freezeAutoEarnAmount: 1 responses: '200': - description: Successful operation (no freezes created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreateStreakFreezesResponse' - examples: - Success with warnings: - value: - issues: - - userId: user-789 - severity: warning - message: Would exceed maximum freeze limit - Mixed success and errors: - value: - issues: - - userId: non-existent-user - severity: error - message: User does not exist - - userId: user-456 - severity: warning - message: Would exceed maximum freeze limit - '201': - description: Created (at least one freeze created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreateStreakFreezesResponse' - examples: - Success with no issues: - value: - issues: [] - Mixed success and warnings: - value: - issues: - - userId: user-456 - severity: warning - message: Would exceed maximum freeze limit - '400': - description: 'Bad Request' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Create streak freezes for multiple users - security: - - ApiKeyAuth: [] - - /streaks/restore: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API + description: Return a 200 status to indicate the webhook was received and processed. + streak.extended: post: - description: 'Restore streaks for multiple users to the maximum previously achieved streak length found within the current restore window: the last 90 days for daily streaks, weekly periods starting with the week containing the start of the current calendar year for weekly streaks, and monthly periods starting at the beginning of the previous calendar year for monthly streaks.' - operationId: admin_streaks_restore - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - streaks - x-fern-sdk-method-name: restore - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.streaks.restore({ - users: [{ id: 'user-123' }, { id: 'user-456' }] - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.streaks.restore({ - "users": [{"id": "user-123"}, {"id": "user-456"}] - }) + summary: Streak extended + operationId: webhooks_streak_extended + description: Triggered when a user extends an existing active streak. requestBody: - description: Array of users to restore streaks for - required: true + description: The webhook event. content: application/json: schema: - $ref: '#/components/schemas/RestoreStreaksRequest' + properties: + type: + type: string + enum: ['streak.extended'] + description: The webhook event type. + user: + $ref: '#/components/schemas/User' + description: The user who extended the streak. + streak: + $ref: '#/components/schemas/BaseStreakResponse' + description: The streak that was extended. + required: + - type + - user + - streak examples: - Restore streaks for multiple users: + Streak extended: value: - users: - - id: user-123 - - id: user-456 - responses: - '200': - description: Successful operation (no streaks restored) - content: - application/json: - schema: - $ref: '#/components/schemas/RestoreStreaksResponse' - examples: - Success with warnings: - value: - restoredUsers: [] - issues: - - userId: user-123 - severity: warning - message: No streak to restore - Mixed success and errors: - value: - restoredUsers: [] - issues: - - userId: non-existent-user - severity: error - message: User does not exist - - userId: user-789 - severity: warning - message: No streak to restore - '201': - description: Created (at least one streak restored) - content: - application/json: - schema: - $ref: '#/components/schemas/RestoreStreaksResponse' - examples: - Success with no issues: - value: - restoredUsers: - - user-123 - - user-456 - issues: [] - Mixed success and errors: - value: - restoredUsers: - - user-123 - issues: - - userId: non-existent-user - severity: error - message: User does not exist - '400': - description: 'Bad Request' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Restore streaks for multiple users - security: - - ApiKeyAuth: [] - - /attributes: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API - get: - description: List attributes. - operationId: admin_attributes_list - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - attributes - x-fern-sdk-method-name: list - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const attributes = await trophy.admin.attributes.list({ - limit: 10, - skip: 0 - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - attributes = client.admin.attributes.list( - limit=10, - skip=0 - ) - parameters: - - name: limit - in: query - description: Number of records to return. - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - default: 10 - example: 10 - - name: skip - in: query - description: Number of records to skip from the start of the list. - required: false - schema: - type: integer - minimum: 0 - default: 0 - example: 0 - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/ListAttributesResponse' - examples: - Attributes list: - value: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Plan - key: plan - type: user - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Device - key: device - type: event - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: List attributes - security: - - ApiKeyAuth: [] - post: - description: Create attributes in bulk. - operationId: admin_attributes_create - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - attributes - x-fern-sdk-method-name: create - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.attributes.create([ - { - name: 'Plan', - key: 'plan', - type: 'user' - }, - { - name: 'Device', - key: 'device', - type: 'event' - } - ]); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.attributes.create([ - { - "name": "Plan", - "key": "plan", - "type": "user" - }, - { - "name": "Device", - "key": "device", - "type": "event" - } - ]) - requestBody: - description: Array of attributes to create. Maximum 100 attributes per request. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAttributesRequest' - examples: - Create user and event attributes: - value: - - name: Plan - key: plan - type: user - - name: Device - key: device - type: event - responses: - '200': - description: Successful operation (no attributes created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAttributesResponse' - examples: - All requests had errors: - value: - created: [] - issues: - - index: 0 - severity: error - message: Name not a string - - index: 1 - severity: error - message: Key already in use by another attribute of this type - '201': - description: Created (at least one attribute created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAttributesResponse' - examples: - Success with no issues: - value: - created: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Plan - key: plan - type: user - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Device - key: device - type: event - issues: [] - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Create attributes in bulk - security: - - ApiKeyAuth: [] - patch: - description: Update attributes in bulk by ID. - operationId: admin_attributes_update - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - attributes - x-fern-sdk-method-name: update - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.attributes.update([ - { - id: '550e8400-e29b-41d4-a716-446655440000', - name: 'Subscription Plan' - } - ]); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.attributes.update([ - { - "id": "550e8400-e29b-41d4-a716-446655440000", - "name": "Subscription Plan" - } - ]) - requestBody: - description: Array of attributes to update. Each item must include an ID and may include `name`. `key` and `type` cannot be changed. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateAttributesRequest' - examples: - Rename attributes: - value: - - id: 550e8400-e29b-41d4-a716-446655440000 - name: Subscription Plan - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateAttributesResponse' - examples: - Success with no issues: - value: - updated: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Subscription Plan - key: plan - type: user - issues: [] - Mixed success and errors: - value: - updated: - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Device - key: device - type: event - issues: - - id: '550e8400-e29b-41d4-a716-446655440999' - severity: error - message: Attribute not found by ID - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Update attributes in bulk - security: - - ApiKeyAuth: [] - delete: - description: Delete attributes in bulk by ID. - operationId: admin_attributes_delete - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - attributes - x-fern-sdk-method-name: delete - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.attributes.delete({ - ids: [ - '550e8400-e29b-41d4-a716-446655440000', - '550e8400-e29b-41d4-a716-446655440001' - ] - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.attributes.delete( - ids=[ - '550e8400-e29b-41d4-a716-446655440000', - '550e8400-e29b-41d4-a716-446655440001' - ] - ) - parameters: - - name: ids - in: query - description: Attribute IDs to delete. Repeat the query param or provide a comma-separated list. - required: true - schema: - type: array - items: - type: string - format: uuid - minItems: 1 - maxItems: 100 - style: form - explode: true - examples: - Multiple query params: - value: - - 550e8400-e29b-41d4-a716-446655440000 - - 550e8400-e29b-41d4-a716-446655440001 - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteAttributesResponse' - examples: - Success with no issues: - value: - deleted: - - id: '550e8400-e29b-41d4-a716-446655440000' - issues: [] - Mixed success and errors: - value: - deleted: - - id: '550e8400-e29b-41d4-a716-446655440000' - issues: - - id: not-a-uuid - severity: error - message: id must be a valid UUID - - id: '550e8400-e29b-41d4-a716-446655440999' - severity: error - message: Attribute not found by ID - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Delete attributes in bulk - security: - - ApiKeyAuth: [] - - /attributes/{id}: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API - get: - description: Get an attribute by ID. - operationId: admin_attributes_get - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - attributes - x-fern-sdk-method-name: get - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const attribute = await trophy.admin.attributes.get( - '550e8400-e29b-41d4-a716-446655440000' - ); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - attribute = client.admin.attributes.get( - "550e8400-e29b-41d4-a716-446655440000" - ) - parameters: - - name: id - in: path - description: The UUID of the attribute to retrieve. - required: true - schema: - type: string - format: uuid - example: 550e8400-e29b-41d4-a716-446655440000 - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/AdminAttribute' - examples: - User attribute: - value: - id: '550e8400-e29b-41d4-a716-446655440000' - name: Plan - key: plan - type: user - Event attribute: - value: - id: '550e8400-e29b-41d4-a716-446655440001' - name: Device - key: device - type: event - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: 'Attribute Not Found' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Get an attribute - security: - - ApiKeyAuth: [] - - /metrics: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API - get: - description: List metrics. - operationId: admin_metrics_list - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - metrics - x-fern-sdk-method-name: list - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const metrics = await trophy.admin.metrics.list({ - limit: 10, - skip: 0 - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - metrics = client.admin.metrics.list( - limit=10, - skip=0 - ) - parameters: - - name: limit - in: query - description: Number of records to return. - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - default: 10 - example: 10 - - name: skip - in: query - description: Number of records to skip from the start of the list. - required: false - schema: - type: integer - minimum: 0 - default: 0 - example: 0 - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/ListMetricsResponse' - examples: - Metrics list: - value: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Oldest Metric - key: oldest-metric - unitType: number - units: '' - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Revenue - key: revenue - unitType: currency - units: USD - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: List metrics - security: - - ApiKeyAuth: [] - post: - description: Create metrics in bulk. - operationId: admin_metrics_create - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - metrics - x-fern-sdk-method-name: create - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.metrics.create([ - { - name: 'Invites Sent', - key: 'invites-sent' - }, - { - name: 'Revenue', - key: 'revenue', - unitType: 'currency', - units: 'USD' - } - ]); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.metrics.create([ - { - "name": "Invites Sent", - "key": "invites-sent" - }, - { - "name": "Revenue", - "key": "revenue", - "unitType": "currency", - "units": "USD" - } - ]) - requestBody: - description: Array of metrics to create. Maximum 100 metrics per request. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateMetricsRequest' - examples: - Create number and currency metrics: - value: - - name: Invites Sent - key: invites-sent - - name: Revenue - key: revenue - unitType: currency - units: USD - responses: - '200': - description: Successful operation (no metrics created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreateMetricsResponse' - examples: - All requests had errors: - value: - created: [] - issues: - - index: 0 - severity: error - message: Name not a string - - index: 1 - severity: error - message: Key already in use by another metric - '201': - description: Created (at least one metric created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreateMetricsResponse' - examples: - Success with no issues: - value: - created: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Invites Sent - key: invites-sent - unitType: number - units: '' - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Revenue - key: revenue - unitType: currency - units: USD - issues: [] - Mixed success and errors: - value: - created: - - id: '550e8400-e29b-41d4-a716-446655440002' - name: Signups - key: signups - unitType: number - units: '' - issues: - - index: 0 - severity: error - message: Key already in use by another metric - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Create metrics in bulk - security: - - ApiKeyAuth: [] - patch: - description: Update metrics in bulk by ID. - operationId: admin_metrics_update - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - metrics - x-fern-sdk-method-name: update - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.metrics.update([ - { - id: '550e8400-e29b-41d4-a716-446655440000', - name: 'Invites Completed', - units: 'invites' - }, - { - id: '550e8400-e29b-41d4-a716-446655440001', - unitType: 'number', - units: 'dollars' - } - ]); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.metrics.update([ - { - "id": "550e8400-e29b-41d4-a716-446655440000", - "name": "Invites Completed", - "units": "invites" - }, - { - "id": "550e8400-e29b-41d4-a716-446655440001", - "unitType": "number", - "units": "dollars" - } - ]) - requestBody: - description: Array of metrics to update. Each item must include an ID and may include any subset of mutable metric fields except `key`. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateMetricsRequest' - examples: - Update metric fields: - value: - - id: 550e8400-e29b-41d4-a716-446655440000 - name: Invites Completed - units: invites - - id: 550e8400-e29b-41d4-a716-446655440001 - unitType: number - units: dollars - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateMetricsResponse' - examples: - Success with no issues: - value: - updated: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Invites Completed - key: invites-sent - unitType: number - units: invites - issues: [] - Mixed success and errors: - value: - updated: - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Revenue - key: revenue - unitType: number - units: dollars - issues: - - id: '550e8400-e29b-41d4-a716-446655440999' - severity: error - message: Metric not found by ID - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Update metrics in bulk - security: - - ApiKeyAuth: [] - delete: - description: Delete metrics in bulk by ID. - operationId: admin_metrics_delete - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - metrics - x-fern-sdk-method-name: delete - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.metrics.delete({ - ids: [ - '550e8400-e29b-41d4-a716-446655440000', - '550e8400-e29b-41d4-a716-446655440001' - ] - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.metrics.delete( - ids=[ - '550e8400-e29b-41d4-a716-446655440000', - '550e8400-e29b-41d4-a716-446655440001' - ] - ) - parameters: - - name: ids - in: query - description: Metric IDs to delete. Repeat the query param or provide a comma-separated list. - required: true - schema: - type: array - items: - type: string - format: uuid - minItems: 1 - maxItems: 100 - style: form - explode: true - examples: - Multiple query params: - value: - - 550e8400-e29b-41d4-a716-446655440000 - - 550e8400-e29b-41d4-a716-446655440001 - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteMetricsResponse' - examples: - Success with no issues: - value: - deleted: - - id: '550e8400-e29b-41d4-a716-446655440000' - issues: [] - Mixed success and errors: - value: - deleted: - - id: '550e8400-e29b-41d4-a716-446655440000' - issues: - - id: not-a-uuid - severity: error - message: id must be a valid UUID - - id: '550e8400-e29b-41d4-a716-446655440999' - severity: error - message: Metric not found by ID - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Delete metrics in bulk - security: - - ApiKeyAuth: [] - - /metrics/{id}: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API - get: - description: Get a metric by ID. - operationId: admin_metrics_get - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - metrics - x-fern-sdk-method-name: get - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const metric = await trophy.admin.metrics.get( - '550e8400-e29b-41d4-a716-446655440000' - ); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - metric = client.admin.metrics.get( - "550e8400-e29b-41d4-a716-446655440000" - ) - parameters: - - name: id - in: path - description: The UUID of the metric to retrieve. - required: true - schema: - type: string - format: uuid - example: 550e8400-e29b-41d4-a716-446655440000 - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/CreatedMetric' - examples: - Number metric: - value: - id: '550e8400-e29b-41d4-a716-446655440000' - name: Invites Sent - key: invites-sent - unitType: number - units: '' - Currency metric: - value: - id: '550e8400-e29b-41d4-a716-446655440001' - name: Revenue - key: revenue - unitType: currency - units: USD - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: 'Not Found' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Get a metric by ID - security: - - ApiKeyAuth: [] - - /points/boosts: - servers: - - url: https://admin.trophy.so/v1 - description: Admin API - post: - description: Create points boosts for multiple users. - operationId: admin_points_boosts_create - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - points - - boosts - x-fern-sdk-method-name: create - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.points.boosts.create({ - systemKey: 'xp', - boosts: [ - { - userId: 'user-123', - name: 'Double XP Weekend', - start: '2024-01-01', - end: '2024-01-03', - multiplier: 2 - }, - { - userId: 'user-456', - name: 'Holiday Bonus', - start: '2024-12-25', - multiplier: 1.5, - rounding: 'up' - } - ] - }); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.points.boosts.create({ - "systemKey": "xp", - "boosts": [ - { - "userId": "user-123", - "name": "Double XP Weekend", - "start": "2024-01-01", - "end": "2024-01-03", - "multiplier": 2 - }, - { - "userId": "user-456", - "name": "Holiday Bonus", - "start": "2024-12-25", - "multiplier": 1.5, - "rounding": "up" - } - ] - }) - requestBody: - description: The points system key and array of boosts to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePointsBoostsRequest' - examples: - Create boosts for multiple users: - value: - systemKey: xp - boosts: - - userId: user-123 - name: Double XP Weekend - start: '2024-01-01' - end: '2024-01-03' - multiplier: 2 - - userId: user-456 - name: Holiday Bonus - start: '2024-12-25' - multiplier: 1.5 - rounding: up - responses: - '200': - description: Successful operation (no boosts created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePointsBoostsResponse' - examples: - All requests had errors: - value: - created: [] - issues: - - userId: non-existent-user - severity: error - message: User does not exist - '201': - description: Created (at least one boost created) - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePointsBoostsResponse' - examples: - Success with no issues: - value: - created: - - id: '550e8400-e29b-41d4-a716-446655440000' - name: Double XP Weekend - status: active - start: '2024-01-01' - end: '2024-01-03' - multiplier: 2 - rounding: down - userId: user-123 - issues: [] - Mixed success and errors: - value: - created: - - id: '550e8400-e29b-41d4-a716-446655440001' - name: Valid Boost - status: active - start: '2024-01-15' - end: null - multiplier: 1.5 - rounding: down - userId: user-456 - issues: - - userId: non-existent-user - severity: error - message: User does not exist - '400': - description: 'Bad Request' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: 'Not Found (points system not found)' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '422': - description: 'Unprocessible Entity' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Create points boosts for multiple users - security: - - ApiKeyAuth: [] - delete: - description: Delete multiple points boosts by ID. - operationId: admin_points_boosts_delete - x-fern-server-name: admin - x-fern-sdk-group-name: - - admin - - points - - boosts - x-fern-sdk-method-name: delete - tags: - - Admin - x-codeSamples: - - lang: javascript - source: | - import { TrophyApiClient } from '@trophyso/node'; - - const trophy = new TrophyApiClient({ - apiKey: 'YOUR_API_KEY' - }); - - const response = await trophy.admin.points.boosts.delete({ - ids: ['boost-uuid-1', 'boost-uuid-2', 'boost-uuid-3'] - }); - - console.log(`Deleted ${response.deleted.length} boosts`); - - lang: python - source: | - from trophy import TrophyApi - - client = TrophyApi(api_key='YOUR_API_KEY') - - response = client.admin.points.boosts.delete( - ids=['boost-uuid-1', 'boost-uuid-2', 'boost-uuid-3'] - ) - - print(f"Deleted {len(response.deleted)} boosts") - parameters: - - name: ids - in: query - description: A list of up to 100 boost IDs. - required: true - schema: - type: array - items: - type: string - minItems: 1 - maxItems: 100 - example: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,b1ffcd00-0d1c-4ef9-cc7e-7cc0ce491b22' - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/DeletePointsBoostsResponse' - examples: - All boosts deleted: - value: - deleted: - - id: '550e8400-e29b-41d4-a716-446655440000' - - id: '550e8400-e29b-41d4-a716-446655440001' - - id: '550e8400-e29b-41d4-a716-446655440002' - issues: [] - Some boosts not found: - value: - deleted: - - id: '550e8400-e29b-41d4-a716-446655440000' - issues: - - boostId: '550e8400-e29b-41d4-a716-446655440001' - severity: warning - message: Points boost not found - No boosts found: - value: - deleted: [] - issues: - - boostId: '550e8400-e29b-41d4-a716-446655440999' - severity: warning - message: Points boost not found - '400': - description: 'Bad Request (no IDs provided or invalid UUID format)' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '401': - description: 'Unauthorized' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - summary: Delete multiple points boosts - security: - - ApiKeyAuth: [] - -webhooks: - achievement.completed: - post: - summary: Achievement completed - operationId: webhooks_achievement_completed - description: Triggered when a user completes an achievement. - requestBody: - description: The webhook event. - content: - application/json: - schema: - properties: - type: - type: string - enum: ['achievement.completed'] - description: The webhook event type. - user: - $ref: '#/components/schemas/User' - description: The user who completed the achievement. - achievement: - $ref: '#/components/schemas/UserAchievementResponse' - description: The achievement completion that occurred. - required: - - type - - user - - achievement - examples: - Achievement completed: - value: - type: achievement.completed - user: - id: user-id - email: user@example.com - tz: Europe/London - subscribedToEmails: true - created: '2021-01-01T00:00:00Z' - updated: '2021-01-01T00:00:00Z' - attributes: - department: engineering - role: developer - achievement: - id: d01dcbcb-d51e-4c12-b054-dc811dcdc625 - name: Completed Onboarding - trigger: api - description: null - key: completed-onboarding - achievedAt: '2021-01-01T00:00:00Z' - badgeUrl: https://example.com/badge2.png - - responses: - '200': - description: Return a 200 status to indicate the webhook was received and processed. - streak.started: - post: - summary: Streak started - operationId: webhooks_streak_started - description: Triggered when a user starts a streak. - requestBody: - description: The webhook event. - content: - application/json: - schema: - properties: - type: - type: string - enum: ['streak.started'] - description: The webhook event type. - user: - $ref: '#/components/schemas/User' - description: The user who started the streak. - streak: - $ref: '#/components/schemas/BaseStreakResponse' - description: The streak that was started. - required: - - type - - user - - streak - examples: - Streak started: - value: - type: streak.started - user: - id: user-id - email: user@example.com - tz: Europe/London - subscribedToEmails: true - created: '2021-01-01T00:00:00Z' - updated: '2021-01-01T00:00:00Z' - attributes: - department: engineering - role: developer - streak: - length: 1 - frequency: daily - periodStart: '2025-04-02' - periodEnd: '2025-04-02' - started: '2025-04-02' - expires: '2025-04-03' - freezes: 0 - maxFreezes: 3 - freezeAutoEarnInterval: 7 - freezeAutoEarnAmount: 1 - responses: - '200': - description: Return a 200 status to indicate the webhook was received and processed. - streak.extended: - post: - summary: Streak extended - operationId: webhooks_streak_extended - description: Triggered when a user extends an existing active streak. - requestBody: - description: The webhook event. - content: - application/json: - schema: - properties: - type: - type: string - enum: ['streak.extended'] - description: The webhook event type. - user: - $ref: '#/components/schemas/User' - description: The user who extended the streak. - streak: - $ref: '#/components/schemas/BaseStreakResponse' - description: The streak that was extended. - required: - - type - - user - - streak - examples: - Streak extended: - value: - type: streak.extended - user: - id: user-id - email: user@example.com - tz: Europe/London - subscribedToEmails: true - created: '2021-01-01T00:00:00Z' - updated: '2021-01-01T00:00:00Z' - attributes: - department: engineering - role: developer - streak: - length: 2 - frequency: daily - periodStart: '2025-04-03' - periodEnd: '2025-04-03' - started: '2025-04-02' - expires: '2025-04-05' - freezes: 0 - maxFreezes: 3 - freezeAutoEarnInterval: 7 - freezeAutoEarnAmount: 1 + type: streak.extended + user: + id: user-id + email: user@example.com + tz: Europe/London + subscribedToEmails: true + created: '2021-01-01T00:00:00Z' + updated: '2021-01-01T00:00:00Z' + attributes: + department: engineering + role: developer + streak: + length: 2 + frequency: daily + periodStart: '2025-04-03' + periodEnd: '2025-04-03' + started: '2025-04-02' + expires: '2025-04-05' + freezes: 0 + maxFreezes: 3 + freezeAutoEarnInterval: 7 + freezeAutoEarnAmount: 1 responses: '200': description: Return a 200 status to indicate the webhook was received and processed. @@ -6412,15 +4897,6 @@ components: - email - push description: A notification delivery channel. - NotificationType: - title: NotificationType - type: string - enum: - - achievement_completed - - recap - - reactivation - - streak_reminder - description: A type of notification that can be configured. NotificationPreferences: title: NotificationPreferences type: object @@ -6758,576 +5234,6 @@ components: required: - previousRank - previousValue - CreateStreakFreezesRequest: - title: CreateStreakFreezesRequest - type: object - description: Request body for creating streak freezes. - properties: - freezes: - type: array - items: - type: object - properties: - userId: - type: string - description: The ID of the user to create a freeze for. - example: user-123 - required: - - userId - description: Array of freezes to create. Maximum 100 freezes per request. - maxItems: 100 - minItems: 1 - required: - - freezes - CreateStreakFreezesResponse: - title: CreateStreakFreezesResponse - type: object - description: Response containing any issues encountered while creating streak freezes. - properties: - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during freeze creation. - required: - - issues - CreateAttributesRequest: - title: CreateAttributesRequest - type: array - description: Request body for creating attributes. - items: - $ref: '#/components/schemas/CreateAttributeRequestItem' - minItems: 1 - maxItems: 100 - CreateAttributeRequestItem: - title: CreateAttributeRequestItem - type: object - description: An attribute to create. - properties: - name: - type: string - description: The attribute name. - example: Plan - key: - type: string - pattern: '^[a-zA-Z\d-_]+$' - description: The attribute key. Only alphanumeric characters, hyphens, and underscores are permitted. - example: plan - type: - type: string - enum: - - user - - event - description: The attribute type. - example: user - required: - - name - - key - - type - AdminAttribute: - title: AdminAttribute - type: object - description: An attribute returned from the admin attributes endpoints. - properties: - id: - type: string - format: uuid - description: The UUID of the attribute. - name: - type: string - description: The attribute name. - key: - type: string - description: The attribute key. - type: - type: string - enum: - - user - - event - description: The attribute type. - required: - - id - - name - - key - - type - CreateAttributesResponse: - title: CreateAttributesResponse - type: object - description: Response containing created attributes and any per-item issues. - properties: - created: - type: array - items: - $ref: '#/components/schemas/AdminAttribute' - description: Array of successfully created attributes. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during attribute creation. - required: - - created - - issues - UpdateAttributesRequest: - title: UpdateAttributesRequest - type: array - description: Request body for updating attributes. - items: - $ref: '#/components/schemas/UpdateAttributeRequestItem' - minItems: 1 - maxItems: 100 - UpdateAttributeRequestItem: - title: UpdateAttributeRequestItem - type: object - description: 'An attribute update object. `id` is required and `name` is optional. `key` and `type` cannot be changed through this endpoint.' - properties: - id: - type: string - format: uuid - description: The UUID of the attribute to update. - example: 550e8400-e29b-41d4-a716-446655440000 - name: - type: string - description: The updated attribute name. - example: Subscription Plan - required: - - id - UpdateAttributesResponse: - title: UpdateAttributesResponse - type: object - description: Response containing updated attributes and any per-item issues identified by attribute ID. - properties: - updated: - type: array - items: - $ref: '#/components/schemas/AdminAttribute' - description: Array of successfully updated attributes. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during attribute update. - required: - - updated - - issues - DeleteAttributesResponse: - title: DeleteAttributesResponse - type: object - description: Response containing deleted attributes represented by ID and any per-item issues, including invalid or missing attribute IDs. - properties: - deleted: - type: array - items: - $ref: '#/components/schemas/DeletedResource' - description: Array of deleted attributes represented by ID. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during attribute deletion. - required: - - deleted - - issues - ListAttributesResponse: - title: ListAttributesResponse - type: array - description: A paginated list of attributes. - items: - $ref: '#/components/schemas/AdminAttribute' - CreateMetricsRequest: - title: CreateMetricsRequest - type: array - description: Request body for creating metrics. - items: - $ref: '#/components/schemas/CreateMetricRequestItem' - minItems: 1 - maxItems: 100 - CreateMetricRequestItem: - title: CreateMetricRequestItem - type: object - description: A metric to create. - properties: - name: - type: string - description: The metric name. - example: Invites Sent - key: - type: string - pattern: '^[a-zA-Z\d-_]+$' - description: The metric key. Only alphanumeric characters, hyphens, and underscores are permitted. - example: invites-sent - unitType: - type: string - enum: - - number - - currency - default: number - description: The metric unit type. Defaults to `number`. - example: currency - units: - type: string - description: 'For `unitType: currency`, this must be a supported `MetricCurrency` code such as `USD`. For `number`, this is an optional freeform unit label.' - example: USD - required: - - name - - key - CreatedMetric: - title: CreatedMetric - type: object - description: A successfully created metric returned from the create endpoint. - properties: - id: - type: string - format: uuid - description: The UUID of the created metric. - name: - type: string - description: The metric name. - key: - type: string - description: The metric key. - unitType: - type: string - enum: - - number - - currency - description: The metric unit type. - units: - type: string - description: The stored units value for the metric. - required: - - id - - name - - key - - unitType - - units - CreateMetricsResponse: - title: CreateMetricsResponse - type: object - description: Response containing created metrics and any per-item issues. - properties: - created: - type: array - items: - $ref: '#/components/schemas/CreatedMetric' - description: Array of successfully created metrics. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during metric creation. - required: - - created - - issues - UpdateMetricsRequest: - title: UpdateMetricsRequest - type: array - description: Request body for updating metrics. - items: - $ref: '#/components/schemas/UpdateMetricRequestItem' - minItems: 1 - maxItems: 100 - UpdateMetricRequestItem: - title: UpdateMetricRequestItem - type: object - description: 'A metric update object. `id` is required; `name`, `unitType`, and `units` are optional. `key` cannot be changed through this endpoint.' - properties: - id: - type: string - format: uuid - description: The UUID of the metric to update. - example: 550e8400-e29b-41d4-a716-446655440000 - name: - type: string - description: The updated metric name. - example: Invites Completed - unitType: - type: string - enum: - - number - - currency - description: The updated metric unit type. - example: currency - units: - type: string - description: 'The updated units value. For `unitType: currency`, this must be a supported `MetricCurrency` code such as `USD`.' - example: USD - required: - - id - UpdateMetricsResponse: - title: UpdateMetricsResponse - type: object - description: Response containing updated metrics and any per-item issues identified by metric ID. - properties: - updated: - type: array - items: - $ref: '#/components/schemas/CreatedMetric' - description: Array of successfully updated metrics. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during metric update. - required: - - updated - - issues - DeleteMetricsResponse: - title: DeleteMetricsResponse - type: object - description: Response containing deleted metrics represented by ID and any per-item issues, including invalid or missing metric IDs. - properties: - deleted: - type: array - items: - $ref: '#/components/schemas/DeletedResource' - description: Array of deleted metrics represented by ID. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during metric deletion. - required: - - deleted - - issues - ListMetricsResponse: - title: ListMetricsResponse - type: array - description: A paginated list of metrics. - items: - $ref: '#/components/schemas/CreatedMetric' - CreatePointsBoostsRequest: - title: CreatePointsBoostsRequest - type: object - description: Request body for creating points boosts. - properties: - systemKey: - type: string - description: The key of the points system to create boosts for. - example: xp - boosts: - type: array - items: - type: object - properties: - userId: - type: string - description: The ID of the user to create a boost for. - example: user-123 - name: - type: string - description: The name of the boost. - maxLength: 255 - example: Double XP Weekend - start: - type: string - format: date - description: The start date of the boost (YYYY-MM-DD). - example: '2024-01-01' - end: - type: - - string - - 'null' - format: date - description: The end date of the boost (YYYY-MM-DD). If null, the boost has no end date. - example: '2024-01-03' - multiplier: - type: number - description: The points multiplier. Must be greater than 0, not equal to 1, and less than 100. - example: 2 - exclusiveMinimum: 0 - exclusiveMaximum: 100 - rounding: - type: string - enum: - - down - - up - - nearest - default: down - description: How to round the boosted points. Defaults to 'down'. - example: down - required: - - userId - - name - - start - - multiplier - description: Array of boosts to create. Maximum 100 boosts per request. - maxItems: 100 - minItems: 1 - required: - - systemKey - - boosts - CreatedPointsBoost: - title: CreatedPointsBoost - type: object - description: A successfully created points boost returned from the create endpoint. - properties: - id: - type: string - format: uuid - description: The UUID of the created boost. - name: - type: string - description: The name of the boost. - status: - type: string - enum: ['active', 'scheduled', 'finished'] - description: The status of the boost. - start: - type: string - format: date - description: The start date (YYYY-MM-DD). - end: - type: - - string - - 'null' - format: date - description: The end date (YYYY-MM-DD) or null if no end date. - multiplier: - type: number - description: The points multiplier. - rounding: - type: string - enum: - - down - - up - - nearest - description: How boosted points are rounded. - userId: - type: string - description: The customer ID of the user the boost was created for. - required: - - id - - name - - status - - start - - end - - multiplier - - rounding - - userId - CreatePointsBoostsResponse: - title: CreatePointsBoostsResponse - type: object - description: Response containing created boosts and any issues encountered while creating points boosts. - properties: - created: - type: array - items: - $ref: '#/components/schemas/CreatedPointsBoost' - description: Array of successfully created boosts. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during boost creation. - required: - - created - - issues - DeletePointsBoostsResponse: - title: DeletePointsBoostsResponse - type: object - description: Response containing the points boosts that were deleted and any per-item issues. - properties: - deleted: - type: array - items: - $ref: '#/components/schemas/DeletedResource' - description: Array of deleted points boosts represented by ID. - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during boost deletion. - required: - - deleted - - issues - RestoreStreaksRequest: - title: RestoreStreaksRequest - type: object - description: Request body for restoring streaks for multiple users. - properties: - users: - type: array - items: - type: object - properties: - id: - type: string - description: The ID of the user to restore streaks for. - example: user-123 - required: - - id - description: Array of users to restore streaks for. Maximum 100 users per request. - maxItems: 100 - minItems: 1 - example: - - id: user-123 - - id: user-456 - required: - - users - RestoreStreaksResponse: - title: RestoreStreaksResponse - type: object - description: Response containing restored users and any issues encountered. - properties: - restoredUsers: - type: array - items: - type: string - description: Array of user IDs whose streaks were successfully restored. - example: - - user-123 - - user-456 - issues: - type: array - items: - $ref: '#/components/schemas/AdminIssue' - description: Array of issues encountered during streak restoration. - required: - - restoredUsers - - issues - AdminIssue: - title: AdminIssue - type: object - description: An issue encountered while processing an item in an admin API request. - properties: - userId: - type: string - description: The ID of the user the issue relates to, when applicable. - example: user-123 - boostId: - type: string - description: The ID of the points boost the issue relates to, when applicable. - example: 550e8400-e29b-41d4-a716-446655440000 - index: - type: integer - description: The zero-based index of the item the issue relates to, when no resource ID exists yet. - example: 0 - severity: - type: string - enum: - - error - - warning - description: The severity level of the issue. - example: warning - message: - type: string - description: A human-readable description of the issue. - example: Would exceed maximum freeze limit - required: - - severity - - message - DeletedResource: - title: DeletedResource - type: object - description: A deleted resource represented by ID. - properties: - id: - type: string - format: uuid - description: The ID of the deleted resource. - required: - - id WrappedMetric: title: WrappedMetric type: object @@ -7623,6 +5529,3 @@ servers: - x-fern-server-name: Application API url: https://api.trophy.so/v1 description: Application API - - x-fern-server-name: Admin API - url: https://admin.trophy.so/v1 - description: Admin API diff --git a/webhooks/events/achievements/achievement-completed.mdx b/webhooks/events/achievements/achievement-completed.mdx index a849543..32621fd 100644 --- a/webhooks/events/achievements/achievement-completed.mdx +++ b/webhooks/events/achievements/achievement-completed.mdx @@ -1,6 +1,6 @@ --- title: Achievement completed -openapi: openapi.yml webhook achievement.completed +openapi: openapi/application.yml webhook achievement.completed --- diff --git a/webhooks/events/leaderboards/leaderboard-changed.mdx b/webhooks/events/leaderboards/leaderboard-changed.mdx index 5415769..c6094ac 100644 --- a/webhooks/events/leaderboards/leaderboard-changed.mdx +++ b/webhooks/events/leaderboards/leaderboard-changed.mdx @@ -1,4 +1,4 @@ --- title: Leaderboard changed -openapi: openapi.yml webhook leaderboard.changed +openapi: openapi/application.yml webhook leaderboard.changed --- diff --git a/webhooks/events/leaderboards/leaderboard-finished.mdx b/webhooks/events/leaderboards/leaderboard-finished.mdx index 1d6b48a..1c1b531 100644 --- a/webhooks/events/leaderboards/leaderboard-finished.mdx +++ b/webhooks/events/leaderboards/leaderboard-finished.mdx @@ -1,6 +1,6 @@ --- title: Leaderboard finished -openapi: openapi.yml webhook leaderboard.finished +openapi: openapi/application.yml webhook leaderboard.finished --- diff --git a/webhooks/events/leaderboards/leaderboard-rank-changed.mdx b/webhooks/events/leaderboards/leaderboard-rank-changed.mdx index b8d9751..25b0799 100644 --- a/webhooks/events/leaderboards/leaderboard-rank-changed.mdx +++ b/webhooks/events/leaderboards/leaderboard-rank-changed.mdx @@ -1,4 +1,4 @@ --- title: Leaderboard rank changed -openapi: openapi.yml webhook leaderboard.rank_changed +openapi: openapi/application.yml webhook leaderboard.rank_changed --- diff --git a/webhooks/events/leaderboards/leaderboard-started.mdx b/webhooks/events/leaderboards/leaderboard-started.mdx index 868221c..0a9e625 100644 --- a/webhooks/events/leaderboards/leaderboard-started.mdx +++ b/webhooks/events/leaderboards/leaderboard-started.mdx @@ -1,6 +1,6 @@ --- title: Leaderboard started -openapi: openapi.yml webhook leaderboard.started +openapi: openapi/application.yml webhook leaderboard.started --- diff --git a/webhooks/events/points/points-boost-finished.mdx b/webhooks/events/points/points-boost-finished.mdx index 05b34b0..5b8daeb 100644 --- a/webhooks/events/points/points-boost-finished.mdx +++ b/webhooks/events/points/points-boost-finished.mdx @@ -1,6 +1,6 @@ --- title: Points boost finished -openapi: openapi.yml webhook points.boost_finished +openapi: openapi/application.yml webhook points.boost_finished --- diff --git a/webhooks/events/points/points-boost-started.mdx b/webhooks/events/points/points-boost-started.mdx index 5f3ef3e..907d53b 100644 --- a/webhooks/events/points/points-boost-started.mdx +++ b/webhooks/events/points/points-boost-started.mdx @@ -1,6 +1,6 @@ --- title: Points boost started -openapi: openapi.yml webhook points.boost_started +openapi: openapi/application.yml webhook points.boost_started --- diff --git a/webhooks/events/points/points-changed.mdx b/webhooks/events/points/points-changed.mdx index 5439153..1399e75 100644 --- a/webhooks/events/points/points-changed.mdx +++ b/webhooks/events/points/points-changed.mdx @@ -1,6 +1,6 @@ --- title: Points changed -openapi: openapi.yml webhook points.changed +openapi: openapi/application.yml webhook points.changed --- diff --git a/webhooks/events/points/points-level-changed.mdx b/webhooks/events/points/points-level-changed.mdx index 67695ea..a9f724a 100644 --- a/webhooks/events/points/points-level-changed.mdx +++ b/webhooks/events/points/points-level-changed.mdx @@ -1,6 +1,6 @@ --- title: Points level changed -openapi: openapi.yml webhook points.level_changed +openapi: openapi/application.yml webhook points.level_changed --- diff --git a/webhooks/events/streaks/streak-extended.mdx b/webhooks/events/streaks/streak-extended.mdx index 31ad3d5..00f2fa8 100644 --- a/webhooks/events/streaks/streak-extended.mdx +++ b/webhooks/events/streaks/streak-extended.mdx @@ -1,6 +1,6 @@ --- title: Streak extended -openapi: openapi.yml webhook streak.extended +openapi: openapi/application.yml webhook streak.extended --- diff --git a/webhooks/events/streaks/streak-freeze-consumed.mdx b/webhooks/events/streaks/streak-freeze-consumed.mdx index a8520ab..c01150a 100644 --- a/webhooks/events/streaks/streak-freeze-consumed.mdx +++ b/webhooks/events/streaks/streak-freeze-consumed.mdx @@ -1,4 +1,4 @@ --- title: Streak freeze consumed -openapi: openapi.yml webhook streak.freeze_consumed +openapi: openapi/application.yml webhook streak.freeze_consumed --- diff --git a/webhooks/events/streaks/streak-freeze-earned.mdx b/webhooks/events/streaks/streak-freeze-earned.mdx index 2d0232e..bd7139c 100644 --- a/webhooks/events/streaks/streak-freeze-earned.mdx +++ b/webhooks/events/streaks/streak-freeze-earned.mdx @@ -1,4 +1,4 @@ --- title: Streak freeze earned -openapi: openapi.yml webhook streak.freeze_earned +openapi: openapi/application.yml webhook streak.freeze_earned --- diff --git a/webhooks/events/streaks/streak-lost.mdx b/webhooks/events/streaks/streak-lost.mdx index acd02d5..1ed128e 100644 --- a/webhooks/events/streaks/streak-lost.mdx +++ b/webhooks/events/streaks/streak-lost.mdx @@ -1,4 +1,4 @@ --- title: Streak lost -openapi: openapi.yml webhook streak.lost +openapi: openapi/application.yml webhook streak.lost --- diff --git a/webhooks/events/streaks/streak-started.mdx b/webhooks/events/streaks/streak-started.mdx index 4a853c8..78a9e2f 100644 --- a/webhooks/events/streaks/streak-started.mdx +++ b/webhooks/events/streaks/streak-started.mdx @@ -1,4 +1,4 @@ --- title: Streak started -openapi: openapi.yml webhook streak.started +openapi: openapi/application.yml webhook streak.started --- diff --git a/webhooks/introduction.mdx b/webhooks/introduction.mdx index 972adc1..4072384 100644 --- a/webhooks/introduction.mdx +++ b/webhooks/introduction.mdx @@ -16,7 +16,9 @@ These events allow you to trigger custom code and power extended gamification ex All Trophy webhooks are delivered over HTTP which allows customers to subscribe to receive data from Trophy via regular HTTP `POST` requests. -Read more about getting started with webhooks below. +## Get Started {#get-started} + +Learn more about how to integrate Trophy webhooks into your application below.