Setting up an API
![Component data panel in the toddle editor](http://images.ctfassets.net/lizv2opdd3ay/4fI2rY2XdjJICAQkLMAa5g/bcfe913cc328131e5429c89299d33516/CleanShot_2023-10-19_at_09.51.32_2x.png)
![API configuration panel](http://images.ctfassets.net/lizv2opdd3ay/5dCVXaJ12FLBylgnBzohrd/7c7ef78fd67cb247a838cef5552b98da/CleanShot_2023-10-19_at_22.16.22_2x.png)
Auto fetch
Lets say your have a request for fetching a list of users. This request includes a query parameter: "search" which is set to the value of a similar named variable in your component. When ever that variable changes, toddle will see that the API request specification has changed and automatically re-fetch the request.
HTTP method and URL
![1: HTTP method
2: URL
3: Path
4: Query](http://images.ctfassets.net/lizv2opdd3ay/30iun4uM6aoZ5bGlqnxiQG/9feba5b6772deec7d9ac3334de1af7a9/CleanShot_2023-10-19_at_22.20.24_2x.png)
If you are not sure what these mean we have written an article breaking down the different parts of a URL
![Example of a API specification from contentful.com API documentation.](http://images.ctfassets.net/lizv2opdd3ay/1GvVCz7kGJRy27B37Mc5G2/a4fe36a05adfb057c4de42dbf960571b/CleanShot_2023-10-19_at_22.26.40_2x.png)
HTTP headers
Authorization
Body
Notice that only POST, PATCH, and PUT requests can have a body