melonly logomelonly logo
melonly logo
Dashboard
Log in

Deactivate a Token

Deactivates a token so it stops working straight away. You can deactivate the token making the request.

DELETE

/api/v1/tokens/{tokenId}

Request

curl -X DELETE "https://api.melonly.com/api/v1/tokens/{tokenId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

Success

{
  "data": {
    "createdAt": 1794700000000,
    "id": "7527840000000004096",
    "isActive": true,
    "lastUsedAt": 1794776859830,
    "name": "shift bot (do not delete)",
    "serverId": "7294057520392310784"
  }
}

Authorization

Authorizationstringrequired
Your API token as Bearer YOUR_TOKEN. Create one in your server's dashboard settings.

Path parameters

tokenIdstringrequired

Response

200 Success

createdAtintegerrequired
When the token was created.
idstringrequired
Token ID.
isActivebooleanrequired
Whether the token works.
namestringrequired
Token name.
serverIdstringrequired
Server the token belongs to.
expiresAtinteger | null
When the token expires.
lastUsedAtinteger | null
When the token was last used, to the nearest minute.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
404Not found
429Rate limited. See Retry-After and details.
500Internal server error