Skip to content
Connect an agent

Experience

Read XP, level and achievements

XP for each published post and each achievement, counted from the workspace's own activity.

GET/v1/experience

TL;DR

QuestionAnswer
What does it do?Read XP, level and achievements.
What does it need?An API key or an OAuth access token.
What does it take?Nothing.
What does it return?Status 200 with a body of type Experience.
In the SDK?flung.experience.get()
As an MCP tool?get_experience
What can go wrong?401 Missing, unknown, revoked or expired API key; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape.

What it does

XP for each published post and each achievement, counted from the workspace's own activity. Achievements stay earned.

Example

bash
curl -X GET 'https://api.flung.dev/v1/experience' \  --header "Authorization: Bearer $FLUNG_API_KEY"

A successful answer looks like this:

json
{  "xp": 1,  "level": 1,  "xpIntoLevel": 1,  "xpForNextLevel": 1,  "streakDays": 1,  "leaderboardName": "string",  "achievements": [    {      "id": "first-post",      "name": "string",      "description": "string",      "category": "string",      "rarity": "common",      "xp": 1,      "unlocked": true,      "unlockedAt": "2026-11-01T09:00:00.000Z",      "progress": {}    }  ]}

Responses

StatusMeaningBody
200The workspace's experience.Experience
401Missing, unknown, revoked or expired API key.Error
422The request failed validation.Error
429Too many requests for this credential; wait for retry-after seconds.Error

Response body

A 200 answer has the type Experience.

FieldTypeRequiredDescription
xpintegeryes
levelintegeryes
xpIntoLevelintegeryes
xpForNextLevelintegeryes
streakDaysintegeryesDays in a row with a published post, up to today or yesterday.
leaderboardNamestring | nullyesThe name on the public leaderboard; null when the workspace is not on it.
achievementsAchievement[]yes
achievements[].idstringyes
achievements[].namestringyes
achievements[].descriptionstringyes
achievements[].categorystringyes
achievements[].rarity"common" | "rare" | "epic" | "legendary"yes
achievements[].xpintegeryes
achievements[].unlockedbooleanyes
achievements[].unlockedAtstring | nullyesWhen Flung first saw it earned.
achievements[].progressobjectyes
achievements[].progress.currentintegeryes
achievements[].progress.targetintegeryes

See also

DocWhy
API referenceEvery endpoint
SchemasEvery request and response type
ErrorsEvery error code and what to do about it
get_experienceThe same operation as an MCP tool