I have two endpoints below, one that accepts two ints and another that accepts to lists of ints. I also have two post requests that I am making using Python requests. The request for the list of ints endpoint works fine, but the one that just accepts the two ints does not. I know that if I pass the two ints in the URL that the endpoint will work, but could you tell me why it doesn't work when passed as JSON? endpoints.py from fastapi import FastAPI app = FastAPI() @app.post('/ints') def post_int(x: int, y: int): return x, y @app.post('/lists') def post_list(x: list[int], y: list[int]): return x, y requests.py import requests r = requests.post('http://127.0.0.1:8000/ints', json={'x': 1, 'y': 2}) print(r.json()) # returns an error saying that x and y are missing r = requests.post('http://127.0.0.1:8000/ints?x=1&y=2') print(r.json()) # returns the two ints r = requests.post('http://127.0.0.1:8000/lists', json={'x': [1, 2, 5], 'y': [1, 2, 3]}) print(r.json()) # returns the two lists To start server, run "fastapi dev /path/to/endpoints.py" in terminal. Run requests.py in another terminal for output. Continue reading...