Skip to main content

API

Here’s a clean study table you can add to your guide.

REST MethodPurposeDescriptionCommon Usage Example
GETRetrieve dataUsed to request or fetch information from a server or API. Does not modify data.Retrieve customer profile, chat history, ticket status
POSTCreate / Send dataUsed to submit new data to a server or trigger actions. Often creates new resources.Start chat session, create ticket, authenticate user
PUTUpdate existing dataUsed to fully update or replace an existing resource.Update customer information, modify interaction settings
PATCHPartial updateUsed to update only specific fields of an existing resource.Change customer status, update phone number only
DELETERemove dataUsed to delete a resource or remove information from the system.Delete session, remove user, close/delete record
OPTIONSDiscover supported methodsUsed to determine what operations an API endpoint supports. Often used in CORS/preflight checks.Browser checking allowed API methods
HEADRetrieve headers onlySimilar to GET but returns headers only, without response body. Useful for validation or testing.Check if resource exists, validate API availability

Example REST API Calls

GET Example

GET /api/customers/12345

Purpose: Retrieve customer information.


POST Example

POST /api/chat/start

Purpose: Create/start a new chat session.


PUT Example

PUT /api/customer/12345

Purpose: Update full customer record.


PATCH Example

PATCH /api/customer/12345

Purpose: Update only selected fields.


DELETE Example

DELETE /api/session/12345

Purpose: Delete session or resource.


Easy Interview Explanation

REST APIs

REST APIs allow systems to communicate using standard HTTP methods such as GET, POST, PUT, and DELETE to retrieve, create, update, or remove data.