Skip to content

Rank

POST /rank

Rank

Authorization

Send Authorization: <Twitch Extension Client ID> <Muxy JWT>. The JWT role must satisfy the endpoint requirements shown in the examples.

Parameters

Name In Required Type Constraints Description
id query no string default "default" The ranking-buffer ID that identifies a question for which responses are ranked.

Request body

Content type: application/json

Schema

{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "A string submitted by the user in response to this question, as the `key` value in a JSON object."
    }
  }
}

Responses

200 Response

200

Content type: application/json

Schema
{
  "type": "object",
  "properties": {
    "accepted": {
      "type": "boolean",
      "example": true,
      "default": true
    },
    "original": {
      "type": "string",
      "example": "Serious Sam"
    }
  }
}
Example
{
  "accepted": true,
  "original": "Serious Sam"
}

400 Error

400

Content type: application/json

Schema
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string"
    }
  }
}
Example
{
  "reason": "400"
}

Examples

Curl

curl --request POST \
  --url https://api.muxy.io/v1/e/rank?id=next-game \
  --header 'authorization: <Client ID> <any JWT>' \
  --header 'content-type: application/json' \
  --data '{ "key": "Last of Us" }'

Generated API reference

This endpoint is generated from rest-v1.yaml.