terminology: what is the difference between an "API", a "framework", an "IDE" and an "engine"?

An API (application programming interface) is an interface; A set of methods that you use to interact with an object or set of objects to do something. Example: OpenGL, for 3D graphics.

A framework is a step forward; It is not just a set of APIs, but a way of thinking and solving problems. Example: SFML, for media. It provides graphics, but also input handling and other auxiliary APIs.

A game engine is more specialized than a frame; It is a framework specifically designed to make games, and generally only games of some kind. In general, it includes many creation tools, such as model editors or importers, etc. Example: Unreal Engine. It allows you to make shooters in 3D. While you can use SFML to make a 3D shooting game, you can also use it to make a video player. With Unreal Engine you shoot in 3D.

An IDE is not related to all this. It means integrated development environment, and is a step ahead of a plain text editor. It produces source code files that are text files, but in general it has some kind of integration with the compiler, it offers wizards to automate parts of the code's writing, and so on. Example: Visual Studio, Eclipse.

About "coding your game", unless you have experience, it would start with a Game Engine. You can write code to customize how it works and what it does, but it will save you a lot of work for "your first game". Later, you may want to try writing your own game engine, maybe build on a Framework. And if you really like it, you can create your own Framework based on API at the system level (OpenGL, Direct3D). It can be incredibly rewarding and a great learning experience. FWIW, I had enough experience as a programmer when I started my Game Engine, but I built it on SDL; Later, I replaced the SDL layer with my own Framework.