What is an API?
An API (Application Programming Interface) is a menu of things one app lets other apps ask it to do. When Auto Appy adds a row to Vidya Coaching’s enquiry sheet, it’s using Google’s API. When Skyline Realty’s developer pulls a daily report out of Auto Appy, he’s using Auto Appy’s.
The waiter analogy
Section titled “The waiter analogy”Think of a restaurant. You (an app) want food from the kitchen (another app’s data). You don’t walk into the kitchen; you give your order to a waiter (the API), who checks it, takes it to the kitchen, and brings back your food (the response).
1Two apps need to work together. Skyline Realty's website has a new buyer enquiry, and the CRM should save it as a lead.
2The website sends a request to the CRM's API: "please create this lead". Like a waiter taking your order to the kitchen.
3The request carries an API key, a secret password for apps. The API checks it: who is asking, and are they allowed to?
4The CRM does the work. It saves the lead in its database.
5It sends back a response: 201 Created and the new lead's ID. The website now knows it worked.
The parts of a request
Section titled “The parts of a request”Every API request has the same few parts:
| Part | What it is | Example |
|---|---|---|
| Address (URL or endpoint) | Where the request goes | https://api.autoappy.com/workflows |
| Method | What kind of request | GET read · POST create · PUT update · DELETE remove |
| Headers | Labels on the envelope, including who you are | Authorization: Bearer aa_key_… |
| Body | The details, usually as JSON | {"name": "Vikas Shetty", "phone": "919867045612"} |
JSON is the usual format: names and values in curly brackets, readable by people and apps alike.
{ "name": "Vikas Shetty", "phone": "919867045612", "interested_in": ["2 BHK", "3 BHK"]}The response and its status code
Section titled “The response and its status code”The answer always comes with a three-digit status code:
| Code | Meaning | What to do |
|---|---|---|
200 / 201 |
Worked / created | Nothing. |
400 / 422 |
Something in your request is wrong or missing | Read the message; fix the field it names. |
401 |
No key, or the key is wrong | Check the Authorization header. |
403 |
The key is fine but not allowed to do this | Use a key with more access, or ask an admin. |
404 |
That address or item doesn’t exist | Check the URL and the ID. |
409 |
Clashes with the current state (for example, the workflow is paused) | Change the state first. |
429 |
Too many requests too fast | Wait a moment and slow down. |
500 |
Something broke on the server | Try again later; tell support if it repeats. |
API keys
Section titled “API keys”An API key proves who is calling. It’s a long secret string that works like a password for apps. In Auto Appy, keys start with aa_key_ and you create them in Settings → API keys. Keep keys out of web pages and screenshots: anyone with the key can act as you.
Try it: list your workflows
Section titled “Try it: list your workflows”Here is a real request to the Auto Appy API, in three languages. Replace YOUR_API_KEY with a key from API keys.
curl "https://api.autoappy.com/workflows" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"// Run this on a server (Node 18+), never in a public web page.const res = await fetch('https://api.autoappy.com/workflows', { headers: { Authorization: `Bearer ${process.env.AUTOAPPY_API_KEY}`, Accept: 'application/json', },});console.log(res.status, await res.json());import os, requests
res = requests.get( "https://api.autoappy.com/workflows", headers={ "Authorization": f"Bearer {os.environ['AUTOAPPY_API_KEY']}", "Accept": "application/json", },)print(res.status_code, res.json())