Hatch a pet
Hatch a pet from an egg and a hatching potion.
POST https://cotlet.dev/api/v1/habitica/pet/hatch
write Confirm
Uses one egg and one potion and returns the new pet. A potion that does not fit the egg changes nothing and the call returns an error. It uses up the items, so check the pair first.
Parameters
| Name | Type | Description |
|---|---|---|
| egg string required | string | Egg name from list_pets_and_mounts, for example Wolf. |
| hatching_potion string required | string | Potion name from list_pets_and_mounts, for example Base. |
Request
curl -X POST https://cotlet.dev/api/v1/habitica/pet/hatch \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"egg":"egg","hatching_potion":"hatching potion"}' result = client.call("habitica", "hatch_pet", {"egg":"egg","hatching_potion":"hatching potion"}) const result = await cotlet.call('habitica', 'hatch_pet', {"egg":"egg","hatching_potion":"hatching potion"}); cotlet call habitica hatch_pet --data '{"egg":"egg","hatching_potion":"hatching potion"}' Example response
{
"pet": "Wolf-Base",
"eggs_left": {
"Wolf": 1,
"Fox": 1
},
"hatching_potions_left": {
"Red": 1
}
}