Rest
Resting allows you to recover your hit points. The cooldown is 1 second per 5 HP recovered.
You can rest by using this POST request.
cURL
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/rest \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
Javascript
const url = 'https://api.artifactsmmo.com/my/{name}/action/rest';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
View the API Reference (opens in a new tab)
Using items
You can use all items categorized as consumable. You can see the list of items on our website (opens in a new tab) or use an API request (opens in a new tab).
Keyword | Condition |
---|---|
Heal | Restores x health points to your character. |
Gold | Adds x gold to your character's inventory. |
You can use an item by using this POST request.
cURL
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/use \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"code": "string",
"quantity": 1
}'
Javascript
const url = 'https://api.artifactsmmo.com/my/{name}/action/use';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
},
body: '{"code":"string","quantity":1}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}