{"_id":"57081ef47e642f0e00e0283c","user":"56abbec30b9e0b0d00616274","editedParams":true,"parentDoc":null,"editedParams2":true,"project":"56abbf55f25f160d00e17f4e","version":{"_id":"56abbf55f25f160d00e17f51","project":"56abbf55f25f160d00e17f4e","__v":12,"createdAt":"2016-01-29T19:36:53.665Z","releaseDate":"2016-01-29T19:36:53.665Z","categories":["56abbf56f25f160d00e17f52","56abca6bf9757e0d007c6650","56acddfa0ab3c00d00ce3332","56af65da9d32e30d0006d30f","56af66cab34d210d003d9ad0","56af6afcd21e9c0d00b628d1","56af6d6ecc4cbd0d00ce2c88","5705b12221cfed0e00e8c580","570a5676ade45d0e00c1ad33","570d7d25d1e4b82000d9e385","570eac3c3160d10e0041df0e","575709000fd6a3200010dded"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":3,"category":{"_id":"5705b12221cfed0e00e8c580","project":"56abbf55f25f160d00e17f4e","__v":0,"version":"56abbf55f25f160d00e17f51","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-07T01:00:18.230Z","from_sync":false,"order":4,"slug":"server-side-api","title":"Server Side API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-08T21:13:24.696Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","results":{"codes":[{"language":"json","status":200,"name":"Submit Multiple Statistics","code":"{\n  \"success\": true\n}"}]},"settings":"5707e879cfc0992200c2a419","examples":{"codes":[{"code":"curl -XPOST -H \"Content-type: application/json\" -d '{\n  \"api_key\": \"GAMEAPIKEY\",\n  \"user_id\": 32,\n  \"GamesWon\": 1,\n  \"Coins\": 45,\n  \"Score\": 1000\n}' 'https://api.kongregate.com/api/submit_statistics.json'","language":"curl","name":"Submit Multiple Statistics"}]},"auth":"required","params":[{"_id":"570820601750330e00184c32","ref":"","in":"body","required":true,"desc":"Your private API key","default":"","type":"string","name":"api_key"},{"_id":"570820601750330e00184c31","ref":"","in":"body","required":true,"desc":"The Kongregate user ID for the user to submit for","default":"","type":"string","name":"user_id"},{"_id":"570820e6447c410e00221af1","ref":"","in":"body","required":false,"desc":"Any other parameters will be submitted as statistics","default":"","type":"int","name":"example_statistic_name"},{"_id":"570820e6447c410e00221af0","ref":"","in":"body","required":false,"desc":"Any other parameters will be submitted as statistics","default":"","type":"int","name":"another_example_statistic_name"}],"url":"/api/submit_statistics.json"},"isReference":true,"order":16,"body":"This method submits statistics for uses with badges and high scores. Any parameters other than `api_key` and `user_id` are assumed to be statistic names for your game, and will be submitted as such.","excerpt":"Submit statistics and high scores","slug":"server-api-statistics","type":"endpoint","title":"Statistics"}

postStatistics

Submit statistics and high scores

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

api_key:
required
string
Your private API key
user_id:
required
string
The Kongregate user ID for the user to submit for
example_statistic_name:
integer
Any other parameters will be submitted as statistics
another_example_statistic_name:
integer
Any other parameters will be submitted as statistics

Examples


Result Format


Documentation

This method submits statistics for uses with badges and high scores. Any parameters other than `api_key` and `user_id` are assumed to be statistic names for your game, and will be submitted as such.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}