--- title: "How Do APIs Work?" slug: "how-do-apis-work" updated: 2025-09-26T04:19:41Z published: 2025-09-26T04:19:41Z canonical: "docs.unqork.io/how-do-apis-work" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.unqork.io/llms.txt > Use this file to discover all available pages before exploring further. # How Do APIs Work? For an API (application programming interface) call to succeed, you need to build out the API request with specific information. Depending on the call you make, you might have to include various parameters. Let’s explore how to make an API request. ## How to Make an API Call Making an API call is similar to navigating an automated telephone system. Once you connect to the system, you must tell it what information you want to receive. So, you must convey your request before the system provides you with the information you seek. Most API calls contain three pieces of information: - HTTP Request Method - Path Parameters - Payload The flow of information looks something like this: ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/API_HowAPIsWork_01_thumb_0_0.jpg?sv=2026-02-06&spr=https&st=2026-11-06T22%3A54%3A31Z&se=2026-11-06T23%3A54%3A31Z&sr=c&sp=r&sig=OsTu4tulrd8neSOeaqORBoNVnV1weFTwohL%2BWgEOyXo%3D) ### HTTP Request Method Each API contains an HTTP (Hypertext Transfer Protocol) method. The HTTP method is the API’s way of stating its intended action. Each HTTP method also has an associated verb describing what it does. For example, if you use an API to retrieve data, your API is making a call. Here are the most common examples: - **GET**: Retrieves and reads existing resources. - **POST**: Creates new resources. - **PUT**: Updates existing resources. - **DELETE**: Deletes a resource. ### Path Parameters To make a successful call, your API must contain the appropriate HTTP method. Depending on the method, you might need to include other parameters, like path or query parameters. For example, let's create a call using Unqork's internal **GET** **Module** **Submissions** API. For a GET call, you need two pieces of information: 1. HTTP Request Method 2. Path Parameter For a GET API call to work, you must specify the **GET** HTTP method. You also must provide the server URL where you're trying to retrieve the information. The **GET** **Module** **Submissions** API lets you retrieve submission data for a specified [module](/v1/docs/introduction-to-the-module-builder). So, the URL must contain the module ID for that specified module. The necessary URL to retrieve module submission data looks like the following: `https://{subdomain}.unqork.io/api/1.0/modules/{moduleId}/submissions.` There are two path parameters in the URL that require specific information: - {subdomain}: Replace this portion of the URL with your environment subdomain. For example, training-staging is the subdomain for the https://training-staging.unqork.io environment. - {moduleId}: The module ID for the specific module where you want to retrieve information. When using the [Plug-In](/v1/docs/plug-in-component) component's GET Module Submissions API, you can select the module you want and the path parameters automatically populate. [Video](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/plugGetSubmissionsExample.webm?sv=2026-02-06&spr=https&st=2026-11-06T22%3A54%3A31Z&se=2026-11-06T23%3A54%3A31Z&sr=c&sp=r&sig=OsTu4tulrd8neSOeaqORBoNVnV1weFTwohL%2BWgEOyXo%3D) ### Payload All APIs need at least the HTTP method and the resource URL. But often, you'll need to send more information for the server to understand your request. We refer to this extra information as a payload. A payload includes any data sent between the client and the server. For example, let's look at Unqork's internal **Create** **Module** **Submission(s)** API. Because this API call creates new module submissions, it's a **POST** HTTP method. But it's not enough to tell the server this is a POST call and to provide the URL to the module where you want to create the submission. We must also include the actual data to store in the submission. > For more information about the necessary payload for the Create Module Submissions API, see our API documentation: [https://developers.unqork.io/#operation/createModuleSubmissions](https://developers.unqork.io/#operation/createModuleSubmissions). ## How to Recognize and Troubleshoot API Responses Whenever you make an API request, a response is returned. But that response might not always be as simple as **Success** or **Failure**. Depending if the request was successful or not, you can get a response containing a variety of response codes. Once the server performs the requested action, it sends a response back to the browser. Responses show in the DevTools Console when you inspect your module. The first thing you'll see in an API response is an HTTP status code. This status code tells you how the server handled your request. > To learn more about using the DevTools Console, view our [Access Submission Data Using the DevTools Console](/v1/docs/access-submission-data-using-the-devtools-console) article. There are five different status code categories: | Status Code | Description | | --- | --- | | 1xx (Informational) | The request was received and is being processed. | | 2xx (Success) | The request was received and accepted. | | 3xx (Redirection) | Further action to proceed. | | 4xx (Client Error) | An error has occurred on your end. | | 5xx (Server Error) | An error has occurred on the server's end. | You don't always receive Informational and Redirection status codes. Informational codes provide a status and don't require any action on your end. Redirection codes indicate that a request has more than one possible response. In most cases, you have to choose a response in setup to continue the request. Success, Client Error, and Server Error status codes are the most common. Let's review our **Get** **Module** **Submissions** and **Create** **Module** **Submission(s)** examples to explain what status codes to expect. ### Success Responses In the **Get** **Module** **Submissions** call, you're requesting 50 submissions from the module whose module ID is specified in your URL. If your call is successful, you'll see those 50 submissions returned. You'll also see an HTTP status of **200 - OK**. In the **Create** **Module** **Submission(s)** call, you're creating a new submission. If this request is successful, you'll see a **201 - Created** response. You'll also see information about the new submission, including the submission ID and the module ID storing the submission. ### Error Responses If your call is not successful, you’ll see an error response in the DevTools Console. Here are a few error responses you might encounter, along with tips to fix them: | Error Code | Description | Notes | | --- | --- | --- | | 401 | You don’t have authorization to view the data that you requested. | Check with your service provider to verify that your access is valid. | | 404 | The server can’t find the resource that you referenced. | Ensure your subdomain and module ID are correct. | | 405 | The resource that you’re referencing doesn’t accept the API call method that you’re trying to make. For example, making a GET call to a resource that only accepts POST calls. | Check that you’re using the correct API call method and that you’re sending it to the correct location. | | 500 | An error occurred on the server side. | Clear your browser’s cache and try again. If the call fails again, contact the API provider for more information. | > For more information on HTTP status codes, view our [HTTP Status Codes](/v1/docs/http-status-codes) article. ## Resources - [Unqork Developer APIs](https://developers.unqork.io/) - [Discover Unqork Internal APIs](/v1/docs/internal-connections) - [Understanding API Documentation](/v1/docs/understanding-api-documentation-and-specifications) APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. HTTP (Hypertext Transfer Protocol) is an application-layer protocol used to transmit hypermedia documents like HTML. An API payload is the data that is sent or received between a client and a server during an API request or response. It contains the information needed to perform actions or get resources. A URL (uniform resource locator) is a unique identifier used to locate a resource on the internet. Also known as a web address. The DevTools Console helps you securely store, build, test, and deploy your software.