POST
/
achievements
/
{key}
/
complete
Mark an achievement as completed
curl --request POST \
  --url https://app.trophy.so/api/achievements/{key}/complete \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "user": {
    "id": "user-id",
    "email": "user@example.com",
    "tz": "Europe/London",
    "subscribedToEmails": true
  }
}'
{
  "completionId": "0040fe51-6bce-4b44-b0ad-bddc4e123534",
  "achievement": {
    "id": "5100fe51-6bce-6j44-b0hs-bddc4e123682",
    "trigger": "api",
    "name": "Finish onboarding",
    "description": "Complete the onboarding process.",
    "badgeUrl": "https://example.com/badge.png",
    "key": "finish-onboarding",
    "achievedAt": "2021-01-01T00:00:00Z"
  }
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

key
string
required

Unique reference of the achievement as set when created.

Body

application/json

Response

201
application/json

Successful operation

The response is of type object.