Skip to content

Cooldowns


Creates a Cooldown

POST /api/cooldown/create
Terminal window
https://api.cookie-api.com/api/cooldown/create


URL Parameters
cooldown_startUNIX Timestamp of the cooldown start
cooldown_endUNIX Timestamp of the cooldown end
identifier optional Unique identifier (for example a user id) for the cooldown. max 200 characters
name optional Name for your cooldown

curl --location --request POST 'https://api.cookie-api.com/api/cooldown/create?cooldown_start=1739104501&cooldown_end=1739104701&identifier=test%20saidsa%20jidsa%20jdsa&name=Test%20cooldown' \
--header 'Authorization: API_Key'

Responses
{
"cooldown_end": "1739104626",
"cooldown_id": "1404549975",
"cooldown_start": "1739104626",
"name": "Test cooldown",
"success": true,
"unique_identifier": "test saidsa jidsa jdsa"
}


Get a Cooldown

Gets a Cooldown


GET /api/cooldown/get-cooldown
Terminal window
https://api.cookie-api.com/api/cooldown/get-cooldown

URL Parameters
filter_typeFilter type. Must be one of the following: 'name', 'identifier', 'cooldownid'
filter_valueFilter value

curl --location 'https://api.cookie-api.com/api/cooldown/get-cooldown?filter_type=cooldownid&filter_value=1404549975' \
--header 'Authorization: API_Key'

Responses
{
"results": [
{
"active": true,
"cooldown_id": "1404549975",
"end": "1739105930",
"identifier": "test saidsa jidsa jdsa",
"name": "Test cooldown",
"start": "1739104626",
"started": true,
"time_left": 1304
}
],
"success": true
}

Get all Cooldowns

Gets all Cooldown

GET /api/cooldown/list
Terminal window
https://api.cookie-api.com/api/cooldown/list


curl --location 'https://api.cookie-api.com/api/cooldown/list' \
--header 'Authorization: API_Key'

Responses
{
"cooldowns": [
{
"active": true,
"cooldown_id": "1404549975",
"end": "1739105930",
"identifier": "test saidsa jidsa jdsa",
"name": "Test cooldown",
"start": "1739104626",
"started": true,
"time_left": 1304
}
],
"length": 1,
"success": true
}

Delete a Cooldown

Deletes a cooldown

DELETE /api/cooldown/delete
Terminal window
https://api.cookie-api.com/api/cooldown/delete


URL Parameters
cooldown_idID of the cooldown that should be deleted
curl --location --request DELETE 'https://api.cookie-api.com/api/cooldown/delete?cooldown_id=1404549975' \
--header 'Authorization: API_Key'

Responses
{
"success": true
}