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

Parameters: hatch_pet
NameTypeDescription
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
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"}'
Python
result = client.call("habitica", "hatch_pet", {"egg":"egg","hatching_potion":"hatching potion"})
Node.js
const result = await cotlet.call('habitica', 'hatch_pet', {"egg":"egg","hatching_potion":"hatching potion"});
CLI
cotlet call habitica hatch_pet --data '{"egg":"egg","hatching_potion":"hatching potion"}'

Example response

JSON

{
  "pet": "Wolf-Base",
  "eggs_left": {
    "Wolf": 1,
    "Fox": 1
  },
  "hatching_potions_left": {
    "Red": 1
  }
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.