---
title: API: Post Scores
slug: api-post-scores
description: This document offers comprehensive guidelines on utilizing an API endpoint to publish scores. With code examples, potential responses, and an exemplification of the data structure for adding a new score, it ensures smooth integration. Furthermore, it high
docTags: 
createdAt: 2019-11-28T19:58:48.000Z
---

Please ensure your code does not excessively post or it will get blocked.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://hook.integromat.com/82bu988v9grj31vxjklh2e4s6h97rnu0",
  "name": "Post New Score",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Content-type",
        "type": "string",
        "description": "application/json"
      }
    ],
    "formDataParameters": [
      {
        "kind": "optional",
        "name": "auth",
        "type": "string",
        "description": "the players api key they should have gotten from orbitalscoreboard.com"
      },
      {
        "kind": "optional",
        "name": "player id",
        "type": "string",
        "description": "the players id they should have gotten from orbitalscoreboard.com "
      },
      {
        "kind": "optional",
        "name": "player initials",
        "type": "string",
        "description": "The players default initials. You can override these with the players entered initials if they get a high score. This should be 3 characters."
      },
      {
        "kind": "optional",
        "name": "score",
        "type": "Number",
        "description": ""
      },
      {
        "kind": "optional",
        "name": "table",
        "type": "string",
        "description": "this should be the cGameName value"
      },
      {
        "kind": "optional",
        "name": "version",
        "type": "string",
        "description": "pass the current version of the table"
      }
    ]
  },
  "results": {
    "languages": [
      {
        "id": "OooOteD1pQPvOD-KpSKq-",
        "code": "{\n \"status\": \"Success\",\n \"row id\": 3,\n \"server status\": 3\n}",
        "language": "200"
      },
      {
        "id": "LxLFtTCm7GlimJKqWwdfF",
        "code": "{\n \"status\": \"Failed\",\n \"message\": \"incorrect data\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "OooOteD1pQPvOD-KpSKq-"
  },
  "examples": {
    "languages": [
      {
        "id": "zPXtL55Vhjhm3TSaKoxB1",
        "code": "fetch(\"https://api.cakes.com\", {\n  \"method\": \"GET\",\n  \"headers\": {\n    \"Accept\": \"application/json\"\n  }\n})\n.then(response => {\n  console.log(response);\n})\n.catch(err => {\n  console.error(err);\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "zPXtL55Vhjhm3TSaKoxB1"
  },
  "responses": [
    {
      "statusCode": 200,
      "description": "Score successfully retrieved.",
      "jsonExample": "{\n \"status\": \"Success\",\n \"row id\": 3,\n \"server status\": 3\n}"
    },
    {
      "statusCode": 404,
      "description": "Error posting score, something in your formatting was wrong.",
      "jsonExample": "{\n \"status\": \"Failed\",\n \"message\": \"incorrect data\"\n}"
    }
  ],
  "description": "This endpoint allows you to post scores.",
  "currentNewParameter": {
    "label": "Form Parameter",
    "value": "formDataParameters"
  }
}
```
:::

## Example Post

| \{<br />"auth": "f4c0b21f-c285-11e9-ba09-42010a8a0000",<br />"player id": "MMChamp",<br />"player initials": "MMC",<br />"score":123456,<br />"table":"hpgof",<br />"version":"40"<br />}<br /> |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Orbital MYSQL db location

wp\_orbitalsb > scores


