The pathType field on an Ingress rule has three values with distinct semantics. Exact matches the request path exactly, case sensitively. Prefix splits both the rule path and the request path on / and matches element by element, so the rule /api matches /api and /api/v1 but not /apifoo. ImplementationSpecific delegates to the controller, which is how ingress-nginx interprets the path as a regular expression.
The field has been required since the Ingress API reached networking.k8s.io/v1 in Kubernetes 1.19. Manifests migrated from the older beta API without adding it are rejected.
Two further traps. A trailing slash in a Prefix rule is ignored, so /api/ and /api behave identically. And when multiple paths match, the longest match wins, but if an Exact and a Prefix rule are equally specific the behavior is controller dependent. Path rewriting is not part of the Ingress API at all; ingress-nginx does it through the rewrite-target annotation, which requires the path to contain a capture group.