### GET Connections: Get All Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Retrieves a list of all connected services, such as Gmail and Calendar. Requires an Authorization header with a Bearer token. ```cURL curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/connections' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### GET /api/connections Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Retrieve a list of all connected services, such as Gmail and Calendar. ```APIDOC ## GET /api/connections ### Description Get all connected services (Gmail, Calendar, etc). ### Method GET ### Endpoint `https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/connections` ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Response This request does not return a response body. ``` -------------------------------- ### External: Get User Token by Phone (M2M) Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index_intro M2M endpoint to obtain a user access token using a phone number. Tokens are automatically saved to variables upon successful retrieval. ```APIDOC ## POST /external/getUserToken ### Description M2M endpoint to get user access token by phone number. Tokens are auto-saved to variables. ### Method POST ### Endpoint https://askorbi-dev-app-400310540142.asia-southeast1.run.app//external/getUserToken ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **phone_number** (string) - Required - The phone number of the user. - **secret_token** (string) - Optional - A secret token for authentication (if applicable). ### Request Example ```json { "phone_number": "+918899074744", "secret_token": "" } ``` ### Response #### Success Response (200) No response body #### Response Example None ``` -------------------------------- ### GET /api/health Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index This endpoint checks the health of the backend API and its connection to the database. It's a simple GET request that returns a status indicating if the API is operational. ```APIDOC ## GET /api/health ### Description Checks backend API health and database connection. ### Method GET ### Endpoint https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/health ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/health' ``` ### Response #### Success Response (200) No response body. This request does not return any response body. #### Response Example (No response body) ``` -------------------------------- ### POST Get User Token by Phone (cURL) Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index_intro Retrieves a user access token using a phone number for M2M authentication. The request body must be JSON containing 'phone_number' and 'secret_token'. Tokens are automatically saved to variables. ```cURL curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//external/getUserToken' \ --header 'Content-Type: application/json' \ --data '{"phone_number": "+918899074744", "secret_token": ""}' ``` -------------------------------- ### PATCH Connections: Update Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Updates the settings for a specific connection, for example, changing the category for a calendar connection. Requires the connection ID in the URL, a Content-Type header, and an Authorization header with a Bearer token. The request body should be a JSON object with the updated settings. ```cURL curl --location --request PATCH 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/connections/connection_id' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ' \ --data '{"category": "Work"}' ``` -------------------------------- ### GET External Health Check (cURL) Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index_intro Performs a health check on the external API. This endpoint does not require authentication. It returns no response body or headers. ```cURL curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//external/health' ``` -------------------------------- ### POST /auth/register Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Register a new user with phone number and password. Tokens are automatically saved from cookies. ```APIDOC ## POST /auth/register ### Description Register a new user with phone number and password. Uses USER_PHONE_NUMBER and USER_PASSWORD variables. Tokens are automatically saved from cookies. ### Method POST ### Endpoint `https://askorbi-dev-app-400310540142.asia-southeast1.run.app//auth/register` ### Parameters #### Request Body - **firstName** (string) - Required - The first name of the user. - **lastName** (string) - Required - The last name of the user. - **whatsappPhone** (string) - Required - The user's WhatsApp phone number. - **password** (string) - Required - The user's password. ### Request Example ```json { "firstName": "John", "lastName": "Doe", "whatsappPhone": "+918899074744", "password": "testpass123" } ``` ### Response This request does not return a response body. ``` -------------------------------- ### POST Auth: Register User Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Registers a new user with their phone number and password. It expects a JSON payload containing first name, last name, WhatsApp phone number, and password. Tokens are automatically managed via cookies. ```cURL curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//auth/register' \ --header 'Content-Type: application/json' \ --data '{"firstName": "John", "lastName": "Doe", "whatsappPhone": "+918899074744", "password": "testpass123"}' ``` -------------------------------- ### POST /api/calendar/events Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Create a new calendar event. Requires a CALENDAR_CONNECTION_ID. ```APIDOC ## POST /api/calendar/events ### Description Create a new calendar event. Use CALENDAR_CONNECTION_ID variable. ### Method POST ### Endpoint `https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/calendar/events` ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - `application/json` #### Request Body - **summary** (string) - Required - The title or summary of the event. - **description** (string) - Optional - A detailed description of the event. - **start** (string) - Required - The start date and time of the event in ISO 8601 format (e.g., `2025-12-24T10:00:00Z`). - **end** (string) - Required - The end date and time of the event in ISO 8601 format (e.g., `2025-12-24T11:00:00Z`). - **location** (string) - Optional - The location of the event. - **connectionId** (string) - Required - The ID of the calendar connection to use. ### Request Example ```json { "summary": "Team Meeting", "description": "Weekly sync", "start": "2025-12-24T10:00:00Z", "end": "2025-12-24T11:00:00Z", "location": "Conference Room A", "connectionId": "" } ``` ### Response This request does not return a response body. ``` -------------------------------- ### POST Calendar: Create Event Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Creates a new event in the user's calendar. Requires an Authorization header with a Bearer token and a JSON payload specifying event details like summary, description, start/end times, location, and the associated calendar connection ID. ```cURL curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/calendar/events' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"summary": "Team Meeting", "description": "Weekly sync", "start": "2025-12-24T10:00:00Z", "end": "2025-12-24T11:00:00Z", "location": "Conference Room A", "connectionId": ""}' ``` -------------------------------- ### Auth: Login Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index_intro Authenticates a user by phone number (or email) and password. This endpoint utilizes USER_PHONE_NUMBER and USER_PASSWORD variables and automatically saves tokens from cookies. ```APIDOC ## POST /auth/login ### Description Login with phone number (or email) and password. Uses USER_PHONE_NUMBER and USER_PASSWORD variables. Tokens are automatically saved from cookies. ### Method POST ### Endpoint https://askorbi-dev-app-400310540142.asia-southeast1.run.app//auth/login ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **username** (string) - Required - The user's phone number or email. - **password** (string) - Required - The user's password. ### Request Example ```json { "username": "+918899074744", "password": "testpass123" } ``` ### Response #### Success Response (200) No response body #### Response Example None ``` -------------------------------- ### POST Login (cURL) Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index_intro Logs in a user using their phone number (or email) and password. It utilizes USER_PHONE_NUMBER and USER_PASSWORD variables. The request body is JSON, and authentication tokens are automatically saved from cookies. ```cURL curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//auth/login' \ --header 'Content-Type: application/json' \ --data '{"username": "+918899074744", "password": "testpass123"}' ``` -------------------------------- ### PATCH /api/connections/connection_id Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index Update connection settings for a specific service, such as setting a calendar category. ```APIDOC ## PATCH /api/connections/{connection_id} ### Description Update connection settings (e.g., calendar category). ### Method PATCH ### Endpoint `https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/connections/connection_id` ### Parameters #### Path Parameters - **connection_id** (string) - Required - The ID of the connection to update. #### Headers - **Content-Type** (string) - Required - `application/json` - **Authorization** (string) - Required - Bearer token for authentication. #### Request Body - **category** (string) - Optional - The category to assign to the connection (e.g., "Work"). ### Request Example ```json { "category": "Work" } ``` ### Response This request does not return a response body. ``` -------------------------------- ### Perform API Health Check using cURL Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index This snippet demonstrates how to check the health of the backend API and its database connection using a cURL request. The endpoint is 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/health'. This request is expected to return a status indicating the health of the services. ```curl curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//api/health' ``` -------------------------------- ### External: Health Check Source: https://documenter.getpostman.com/view/50870827/2sBXVZnZMh/index_intro Performs a health check for the external API. No authentication is required for this endpoint. ```APIDOC ## GET /external/health ### Description Health check endpoint for external API - no auth required. ### Method GET ### Endpoint https://askorbi-dev-app-400310540142.asia-southeast1.run.app//external/health ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```curl curl --location 'https://askorbi-dev-app-400310540142.asia-southeast1.run.app//external/health' ``` ### Response #### Success Response (200) No response body #### Response Example None ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.