--- title: "How to use Swagger?" slug: "how-to-use-swagger" updated: 2025-06-12T07:17:29Z published: 2025-06-12T07:17:29Z canonical: "apidocs.document360.com/how-to-use-swagger" --- > ## Documentation Index > Fetch the complete documentation index at: https://apidocs.document360.com/llms.txt > Use this file to discover all available pages before exploring further. # How to use Swagger? Swagger is an Interface Description Language for describing RESTful APIs expressed using JSON. It allows you to create interactive, machine and human-readable [API documentation](https://document360.com/blog/api-documentation/). It helps you to visualize and interact with the API's resources without having any of the implementation logic in place. It is a web-based application. --- ## **Swagger documentation site** Go to the [Swagger documentation site](https://apihub.document360.io/) ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/3_Screenshot_Swagger%20UI%20Documentation%20page.png) To authenticate the documentation: 1. Click on **Authorize** ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/2_Screenshot_API%20Authorization.png) 1. Enter the API token in the **Value** field under **api_token (apiKey)** #### **Generating API tokens** To generate the API tokens: - Go to **Settings** → **API tokens** - You can select the existing token or, you can generate a new token as per the requirements - To generate a new API token: a. Type in a name for the API token in the **Enter token name** b. Select the required HTTP method(s). You have four methods under **Allowed method(s)**: **GET**, **POST**, **PUT**, and **DELETE** → You can only use the generated token for the selected method(s). It cannot be used to perform other methods c. Click on the **Copy** icon to copy the API token ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/1_Screenshot_API%20tokens.png) 1. Click on the **Authorize** button 2. Click on **Close**. The authentication is successful 3. If you want to change to a different token, click **Authenticate** → **Logout.** Enter your **API token** → **Authorize** → **Close** If you refresh the page, the session might end and, you would have to authenticate again. You can follow the above steps for authentication. You can access the documentation by clicking on the required requests. Refer to the [Requests](/v2-api/apidocs/requests) article for detailed information on the **GET**, **POST**, **PUT**, and **DELETE**. --- You must use underscore wherever required. **For example**, use underscore for "email_id" instead of "email id". If you use space, you would get an error. **Required fields** It is mandatory to enter the content in the field denoted with ***required**. ## **GET** In general, you can retrieve the information using **GET**. Below is an example for **GET** action: To retrieve the information about the team account. ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/4_Screenshot_GET%20example%20_email%20id.png) - You can enter the email in the marked field to find the team account information - Click on the **Execute** button ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/5_Screenshot_GET%20example%20_email%20id%20response.png) - The information about the team account would be available under the **Response body**. --- ## **POST** In general, you can add something using **POST**. Below is an example for **POST** action: To add a team account to a project. ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/6_Screenshot_POST%20example.png) - You should add the team account information such as email id, user role, and user id to add a user to the project **Required fields** For the mandatory parameters to be added, refer to [https://apidocs.document360.com/docs/add-a-user](https://apidocs.document360.com/docs/add-a-user) - The team account would be added to the project - Click on the **Execute** button - If the status is 200 and success is true, the addition of the team account is successful --- ## **PUT** In general, you can update something using **PUT**. Below is an example for **PUT** action: To update a user role in the project. ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/8_Screenshot_PUT%20example.png) a. You should enter the user id in the marked field b. Update the user role with the number mentioned for user role syntax. The number for the respective roles are as follow: - 1 → Administrator - 2 → Editor - 3 → Draft Writer - 4 → Reader - 7 → Owner c. Click on the **Execute** button d. If the status is 200 and success is true, the update of the user is successful --- ## **DELETE** In general, you can delete something using **DELETE**. Below is an example for the **DELETE** action: To delete a user id. ![](https://cdn.document360.io/2b5c503e-f283-4987-b5a8-2b71b454ecec/Images/Documentation/7_Screenshot_DELETE%20example.png) - Enter the user ID in the marked field - Click on the **Execute** button - If the status is 200 and success is true, the deletion of the user id is successful --- ## Related Blogs [1. Ultimate guide to create an API documentation with examples](https://document360.com/blog/api-documentation/) [2. Feature spotlight – API in Document360](https://document360.com/blog/feature-spotlight-api-in-document360/)