# Quick Start

## Authentication

To ensure secure access to our API, all requests must be authenticated using API keys. Any request made without including an API key will result in an error response.

Please make sure to include your unique **API key** in the request headers or as a query parameter for every API call. This authentication mechanism helps protect your data and ensures that only authorized requests are processed.

Keep your API key confidential and do not share it with unauthorized individuals. If you suspect any misuse or need assistance regarding API key management, please contact our support team.

You can find your api\_keys key in your [account page](https://fruitask.com/account/), you just easily copy and paste it. It will serve as your authentication to access data from your projects. Make sure not to share it with anyone.

## Endpoints

{% hint style="info" %}
**Tip:** We highly recommend using POSTMAN for testing and interacting with our API during the development of your projects. POSTMAN provides a user-friendly interface that allows you to send API requests, inspect responses, and manage your API testing workflow efficiently. It's a valuable tool to ensure smooth integration and debugging of your API interactions.
{% endhint %}

{% file src="/files/w9az2EwvE5EzGT0OefwQ" %}
Download our POSTMAN API collection.
{% endfile %}

## Lets start your first request

## Create Row

<mark style="color:green;">`POST`</mark> `https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API`

You can create a new row to your project with values or empty row. To create empty row just leave the body request blank.

**Note:** Use `raw` body request type instead of `form-data` or `x-www-urlencoded-form.`

#### Path Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| api\_key<mark style="color:red;">\*</mark> | String | YOUR\_API   |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                                               | Type | Description |
| ------------------------------------------------------------------ | ---- | ----------- |
| `{"Name":"John Doe","Info":"Hello Fruitask","Status":"Completed"}` | JSON | Value       |

{% tabs %}
{% tab title="200: OK Successfully Added" %}

{% endtab %}

{% tab title="400: Bad Request JSON format issue" %}

{% endtab %}
{% endtabs %}

See sample create row code snippets.

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API' \
     -H 'Content-Type: application/json' \
     -d '{
        "name": "John Doe",
        "email": "john@example.com",
        "age": 30
     }'

```

{% endtab %}

{% tab title="PHP" %}

```php
// API endpoint URL
$url = 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API';

// Request payload
$data = array(
    'name' => 'John Doe',
    'email' => 'john@example.com',
    'age' => 30
);

// Set headers
$headers = array(
    'Content-Type: application/json'
);

// Initialize cURL session
$curl = curl_init();

// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

// Execute the request
$response = curl_exec($curl);

// Check for errors
if (curl_errno($curl)) {
    $error = curl_error($curl);
    // Handle the error
    echo "cURL Error: " . $error;
} else {
    // Process the response
    echo $response;
}

// Close the cURL session
curl_close($curl);

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const url = 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API';

// Request payload
const data = {
    name: 'John Doe',
    email: 'john@example.com',
    age: 30
};

// Set headers
const headers = {
    'Content-Type': 'application/json'
};

// Make the API request
fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => {
    // Process the response
    console.log(data);
})
.catch(error => {
    // Handle any errors
    console.error(error);
});

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;

public class APIClient {
    public static void main(String[] args) throws IOException {
        String apiUrl = "https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API";
        
        // Request payload
        String payload = "{\"name\":\"John Doe\",\"email\":\"john@example.com\",\"age\":30}";
        
        URL url = new URL(apiUrl);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        
        // Set request method
        connection.setRequestMethod("POST");
        
        // Set request headers
        connection.setRequestProperty("Content-Type", "application/json");
        
        // Enable output and set request body
        connection.setDoOutput(true);
        try (OutputStream outputStream = connection.getOutputStream()) {
            outputStream.write(payload.getBytes());
        }
        
        // Get response
        int responseCode = connection.getResponseCode();
        BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
        String line;
        StringBuilder response = new StringBuilder();
        while ((line = reader.readLine()) != null) {
            response.append(line);
        }
        
        // Close connection
        connection.disconnect();
        
        // Process the response
        System.out.println("Response Code: " + responseCode);
        System.out.println("Response Body: " + response.toString());
    
```

{% endtab %}

{% tab title="Python" %}

<pre class="language-python"><code class="lang-python">import requests
<strong>import json
</strong>
# API endpoint URL
url = 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API'

# Request payload
data = {
    'name': 'John Doe',
    'email': 'john@example.com',
    'age': 30
}

# Set headers
headers = {
    'Content-Type': 'application/json'
}

# Make the POST request
response = requests.post(url, json=data, headers=headers)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

</code></pre>

{% endtab %}
{% endtabs %}

## Update Row

<mark style="color:orange;">`PUT`</mark> `https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API`

You can update a row values to your project using row id.

#### Path Parameters

| Name                                 | Type    | Description |
| ------------------------------------ | ------- | ----------- |
| id<mark style="color:red;">\*</mark> | Integer |             |

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| api\_key<mark style="color:red;">\*</mark> | String | YOUR\_API   |

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                                                                                | Type | Description   |
| --------------------------------------------------------------------------------------------------- | ---- | ------------- |
| `{"Name":"John Doe","Info":"Hello Fruitask","Status":"On-going"}`<mark style="color:red;">\*</mark> | JSON | Updated value |

{% tabs %}
{% tab title="200: OK Successfully Updated" %}

{% endtab %}

{% tab title="400: Bad Request JSON format issue" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PUT 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API' \
     -H 'Content-Type: application/json' \
     -d '{
        "name": "John Doe",
        "email": "john@example.com",
        "age": 30
     }'

```

{% endtab %}

{% tab title="PHP" %}

```php
// API endpoint URL
$url = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API';

// Request payload
$data = array(
    'name' => 'John Doe',
    'email' => 'john@example.com',
    'age' => 30
);

// Set headers
$headers = array(
    'Content-Type: application/json'
);

// Initialize cURL session
$curl = curl_init();

// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

// Execute the request
$response = curl_exec($curl);

// Check for errors
if (curl_errno($curl)) {
    $error = curl_error($curl);
    // Handle the error
    echo "cURL Error: " . $error;
} else {
    // Process the response
    echo $response;
}

// Close the cURL session
curl_close($curl);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const url = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API';

// Request payload
const data = {
    name: 'John Doe',
    email: 'john@example.com',
    age: 30
};

// Set headers
const headers = {
    'Content-Type': 'application/json'
};

// Make the API request
fetch(url, {
    method: 'PUT',
    headers: headers,
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => {
    // Process the response
    console.log(data);
})
.catch(error => {
    // Handle any errors
    console.error(error);
});

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;

public class APIClient {
    public static void main(String[] args) throws IOException {
        String apiUrl = "https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API";

        // Request payload
        String payload = "{\"name\":\"John Doe\",\"email\":\"john@example.com\",\"age\":30}";

        URL url = new URL(apiUrl);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();

        // Set request method
        connection.setRequestMethod("PUT");

        // Set request headers
        connection.setRequestProperty("Content-Type", "application/json");

        // Enable output and set request body
        connection.setDoOutput(true);
        try (OutputStream outputStream = connection.getOutputStream()) {
            outputStream.write(payload.getBytes());
        }

        // Get response
        int responseCode = connection.getResponseCode();
        BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
        String line;
        StringBuilder response = new StringBuilder();
        while ((line = reader.readLine()) != null) {
            response.append(line);
        }

        // Close connection
        connection.disconnect();

        // Process the response
        System.out.println("Response Code: " + responseCode);
        System.out.println("Response Body: " + response.toString());
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

# API endpoint URL
url = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API'

# Request payload
data = {
    'name': 'John Doe',
    'email': 'john@example.com',
    'age': 30
}

# Set headers
headers = {
    'Content-Type': 'application/json'
}

# Make the PUT request
response = requests.put(url, json=data, headers=headers)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

```

{% endtab %}
{% endtabs %}

## Update Cell

<mark style="color:orange;">`PUT`</mark> `https://api.fruitask.com/v3/tables/{token}/update/{id}/?api_key=YOUR_API`

#### Path Parameters

| Name                                    | Type    | Description          |
| --------------------------------------- | ------- | -------------------- |
| token<mark style="color:red;">\*</mark> | String  | Project token        |
| id<mark style="color:red;">\*</mark>    | integer | Your row id position |

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| api\_key<mark style="color:red;">\*</mark> | String | YOUR\_API   |

#### Request Body

| Name                                                                                   | Type | Description                   |
| -------------------------------------------------------------------------------------- | ---- | ----------------------------- |
| `{"column_name":"Info",     "value": "Hey there!" }`<mark style="color:red;">\*</mark> | JSON | Your new value and the column |

{% tabs %}
{% tab title="200: OK Successfully inserted your value" %}

```json
{
    "success": true,
    "result": "Cell updated successfully.",
    "row": 7
}
```

{% endtab %}
{% endtabs %}

See sample update row code snippets.

## Get all rows

<mark style="color:blue;">`GET`</mark> `https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API`

You can pull all rows from your project.

{% hint style="info" %}
Originally the value is encrypted, but once it fetch with your API keys, it should auto decrypt the values. See sample of encrypted values. Don't worry if live API request it is decrypted.
{% endhint %}

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| api\_key<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK Load row data" %}

```json
{
    "success": true,
    "result": [
        {
            "Name": "VzhWY25kcFJNSW1DYnJVPQ",
            "Info": "Uk45TWxkNEZEWkNmZlBoNW9rc0cvbWVpQncyTXQxMWhpZ0Y1TTNoOHVMcXM3T1QvS2VRPQ",
            "Status": "Vk1WRGlOc1VEWnlW",
            "Sample": "Zjk1YWlNUkxWdGFYYWExOXQxZ2U4RDJvQmdlRHUwOW1pZ2RqZlhKcStieTg3dTdwY3ZIQ2s3UEpoZWM9"
        },
        {
            "Name": "Uk10RGlOc1VXYjJRYjdrPQ",
            "Info": "UXRwQ2w5WVZXWmlmZi9oeHAxQVp1MmVqREVyY3MwWnZqbE56UFhwNy9hYTk",
            "Status": "Ujg5QW5ONGZIZz09",
            "Sample": "Zjk1YWlNUkxWdGFYYWExOXQxZ2U4RDJvQmdlRHUwOW1pZ2RqZlhKcStieTg3dTdwY3VEQ3llM1hqQT09"
        },
        {
            "Name": "V3RNTHlvY2xISlNCZDdsZ3BnPT0",
            "Info": "",
            "Status": "",
            "Sample": ""
        },
        {
            "Name": "",
            "Info": "",
            "Status": "",
            "Sample": ""
        }
    ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API'

```

{% endtab %}

{% tab title="PHP" %}

```php
// API endpoint URL
$url = 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=Your_Key';

// Set headers
$headers = array(
    'Content-Type: application/json'
);

// Initialize cURL session
$curl = curl_init();

// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

// Execute the request
$response = curl_exec($curl);

// Check for errors
if (curl_errno($curl)) {
    $error = curl_error($curl);
    // Handle the error
    echo "cURL Error: " . $error;
} else {
    // Process the response
    echo $response;
}

// Close the cURL session
curl_close($curl);
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const apiUrl = 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API_KEY';

fetch(apiUrl)
  .then(response => response.json())
  .then(data => {
    console.log(data); // Do something with the retrieved data
  })
  .catch(error => {
    console.error('Error:', error);
  });

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class APIClient {
    public static void main(String[] args) {
        String apiUrl = "https://api.fruitask.com/v3/tables/{token}/rows/?api_key=YOUR_API_KEY";

        try {
            URL url = new URL(apiUrl);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set request method to GET
            connection.setRequestMethod("GET");

            // Get response code
            int responseCode = connection.getResponseCode();
            System.out.println("Response Code: " + responseCode);

            // Read response
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();

            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            reader.close();

            // Print response
            System.out.println("Response: " + response.toString());

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# API endpoint URL
url = 'https://api.fruitask.com/v3/tables/{token}/rows/?api_key=Your_Key'

# Set headers
headers = {
    'Content-Type': 'application/json'
}

# Make the GET request
response = requests.get(url, headers=headers)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

```

{% endtab %}
{% endtabs %}

## Get Parse

<mark style="color:blue;">`GET`</mark>  `https://api.fruitask.com/v3/tables/{token}/parse/?api_key=YOUR_API`&#x20;

You can pull multiple workplace data in a single API call using this endpoint. Make sure to use&#x20;

```php
Link workplace //column type 
```

It will create extra key value `parsed_data`    &#x20;

You can also use [extension](https://fruitask.com/extensions/) with Workplace Dropdown, install the extension to any workplace, you will have the configuration to single dropdown settings. You can sync or connect workplace, and make your dropdown data. This still experimental and only use the first column data as your dropdown.

It will create extra key value `sync_drop{row_position}`

{% hint style="info" %}
Note: If there's a linked Dynamic List url from the column settings, you can configure in Column then Extra and Dynamic List, it will disregard the extension and Link workplace type from the API and will create extra key value `dynamic_{column_name}`
{% endhint %}

#### Output Usage

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET 'https://api.fruitask.com/v3/tables/{token}/parse/?api_key=YOUR_API'

```

{% endtab %}

{% tab title="PHP" %}

```php
// API endpoint URL
$url = 'https://api.fruitask.com/v3/tables/{token}/parse/?api_key=Your_Key';

// Set headers
$headers = array(
    'Content-Type: application/json'
);

// Initialize cURL session
$curl = curl_init();

// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

// Execute the request
$response = curl_exec($curl);

// Check for errors
if (curl_errno($curl)) {
    $error = curl_error($curl);
    // Handle the error
    echo "cURL Error: " . $error;
} else {
    // Process the response
    echo $response;
}

// Close the cURL session
curl_close($curl);
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const apiUrl = 'https://api.fruitask.com/v3/tables/{token}/parse/?api_key=YOUR_API_KEY';

fetch(apiUrl)
  .then(response => response.json())
  .then(data => {
    console.log(data); // Do something with the retrieved data
  })
  .catch(error => {
    console.error('Error:', error);
  });

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class APIClient {
    public static void main(String[] args) {
        String apiUrl = "https://api.fruitask.com/v3/tables/{token}/parse/?api_key=YOUR_API_KEY";

        try {
            URL url = new URL(apiUrl);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set request method to GET
            connection.setRequestMethod("GET");

            // Get response code
            int responseCode = connection.getResponseCode();
            System.out.println("Response Code: " + responseCode);

            // Read response
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();

            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            reader.close();

            // Print response
            System.out.println("Response: " + response.toString());

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# API endpoint URL
url = 'https://api.fruitask.com/v3/tables/{token}/parse/?api_key=Your_Key'

# Set headers
headers = {
    'Content-Type': 'application/json'
}

# Make the GET request
response = requests.get(url, headers=headers)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

```

{% endtab %}
{% endtabs %}

```json

{
    "success": true,
    "result": [
        {
            "Name": "Properties",
            "Info": "",
            "W458": "Star Fruit",
            "Sample": "",
            "dynamic_W458": [...] //from the dynamic list webhook if exist
            "parsed_data": "No data found" // if you don't use token
        },
        {
            "Name": "Users",
            "Info": "",
            "W458": "ISgam4MEqsJFJvw", //workplace token
            "Sample": "",
            "sync_drop1": [ //pulled data using Workplace Dropdown extension
                {
                    "Name": "John Doe",
                    "Gender": "Male",
                    "Age": "63"
                },
                {
                    "Name": "Lexi Lore",
                    "Gender": "Female",
                    "Age": "30"
                }
            "parsed_data": [ //pulled data using Link workplace column type
                {
                    "Name": "John Doe",
                    "Gender": "Male",
                    "Age": "63"
                },
                {
                    "Name": "Lexi Lore",
                    "Gender": "Female",
                    "Age": "30"
                }
                //.. more
            ]
        },
        {
            "Name": "",
            "Info": "",
            "W458": "",
            "Sample": ""
        }
        //... do it more
    ]
}
```

## Get Row

<mark style="color:blue;">`GET`</mark> `https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API`

You can pull a specific row data with row id.

#### Path Parameters

| Name                                 | Type    | Description                    |
| ------------------------------------ | ------- | ------------------------------ |
| id<mark style="color:red;">\*</mark> | integer | Row position from your project |

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| api\_key<mark style="color:red;">\*</mark> | String | YOUR\_API   |

{% tabs %}
{% tab title="200: OK Load single row data" %}

```json
{
    "success": true,
    "result": {
        "Name": "Uk10RGlOc1VXYjJRYjdrPQ",
        "Info": "UXRwQ2w5WVZXWmlmZi9oeHAxQVp1MmVqREVyY3MwWnZqbE56UFhwNy9hYTk",
        "Status": "Ujg5QW5ONGZIZz09",
        "Sample": "Zjk1YWlNUkxWdGFYYWExOXQxZ2U4RDJvQmdlRHUwOW1pZ2RqZlhKcStieTg3dTdwY3VEQ3llM1hqQT09"
    }
}
```

{% endtab %}

{% tab title="204: No Content Successful but Null result" %}

```json
{
    "success": true,
    "result": null
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API'

```

{% endtab %}

{% tab title="PHP" %}

```php
$apiUrl = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo "Error: " . curl_error($ch);
} else {
    echo $response; // This will output the response data
}

curl_close($ch);

```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const apiUrl = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API';

fetch(apiUrl)
  .then(response => response.text())
  .then(data => {
    console.log(data); // Output the response data
  })
  .catch(error => {
    console.error('Error:', error);
  });

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class HttpURLConnectionExample {
    public static void main(String[] args) {
        String apiUrl = "https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API";

        try {
            URL url = new URL(apiUrl);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            connection.setRequestMethod("GET");

            int responseCode = connection.getResponseCode();
            System.out.println("Response Code: " + responseCode);

            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();

            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            reader.close();

            System.out.println("Response: " + response.toString());

            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# API endpoint URL
api_url = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API'

# Make the GET request
response = requests.get(api_url)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

```

{% endtab %}
{% endtabs %}

## Get Quota

<mark style="color:blue;">`GET`</mark> `https://api.fruitask.com/v3/quota/{token}/?api_key=YOUR_API`

Get workplace/table limit. Remember a single project is limited to 60KB overall data counts per letters.

#### Path Parameters

| Name                                    | Type   | Description   |
| --------------------------------------- | ------ | ------------- |
| token<mark style="color:red;">\*</mark> | String | Project token |

#### Query Parameters

| Name                                       | Type   | Description     |
| ------------------------------------------ | ------ | --------------- |
| api\_key<mark style="color:red;">\*</mark> | String | Account API key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "success": true,
    "result": {
        "used_limit": 21,
        "max_limit": 60,
        "by_percentage": 32
    }
}

```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET 'https://api.fruitask.com/v3/quota/{token}/?api_key=YOUR_API'

```

{% endtab %}

{% tab title="PHP" %}

```php
$apiUrl = 'https://api.fruitask.com/v3/quota/{token}/?api_key=YOUR_API';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo "Error: " . curl_error($ch);
} else {
    echo $response; // This will output the response data
}

curl_close($ch);

```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const apiUrl = 'https://api.fruitask.com/v3/quota/{token}/?api_key=YOUR_API';

fetch(apiUrl)
  .then(response => response.json())
  .then(data => {
    console.log(data); // Output the response data
  })
  .catch(error => {
    console.error('Error:', error);
  });

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class HttpURLConnectionExample {
    public static void main(String[] args) {
        String apiUrl = "https://api.fruitask.com/v3/quota/{token}/?api_key=YOUR_API";

        try {
            URL url = new URL(apiUrl);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            connection.setRequestMethod("GET");

            int responseCode = connection.getResponseCode();
            System.out.println("Response Code: " + responseCode);

            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();

            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            reader.close();

            System.out.println("Response: " + response.toString());

            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# API endpoint URL
api_url = 'https://api.fruitask.com/v3/quota/{token}/?api_key=YOUR_API'

# Make the GET request
response = requests.get(api_url)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

```

{% endtab %}
{% endtabs %}

## Get Collaborators

<mark style="color:blue;">`GET`</mark> `https://api.fruitask.com/v3/users/{token}/?api_key=YOUR_API`

#### Path Parameters

| Name                                    | Type   | Description        |
| --------------------------------------- | ------ | ------------------ |
| token<mark style="color:red;">\*</mark> | String | YOUR PROJECT TOKEN |

#### Query Parameters

| Name                                       | Type   | Description  |
| ------------------------------------------ | ------ | ------------ |
| api\_key<mark style="color:red;">\*</mark> | String | YOUR API KEY |

## Delete Row

<mark style="color:red;">`DELETE`</mark> `https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API`

You can delete a specific row using row id.

#### Path Parameters

| Name                                 | Type    | Description  |
| ------------------------------------ | ------- | ------------ |
| id<mark style="color:red;">\*</mark> | Integer | Row position |

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| api\_key<mark style="color:red;">\*</mark> | String | YOUR\_API   |

{% tabs %}
{% tab title="200: OK Successfully Deleted" %}

```json
{
    "success": true,
    "result": "Row deleted successfully.",
    "row": 17
}

```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X DELETE 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API'

```

{% endtab %}

{% tab title="PHP" %}

```php
$apiUrl = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API';

$ch = curl_init();

// Set the URL
curl_setopt($ch, CURLOPT_URL, $apiUrl);

// Set the custom HTTP method to DELETE
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

// Return the response instead of outputting it directly
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the request and capture the response
$response = curl_exec($ch);

// Check for errors
if (curl_errno($ch)) {
    echo "Error: " . curl_error($ch);
} else {
    echo $response; // Output the response data
}

// Close the cURL session
curl_close($ch);

```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const apiUrl = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API';

fetch(apiUrl, {
  method: 'DELETE', // Specify the DELETE method
})
  .then(response => response.json())
  .then(data => {
    console.log(data); // Output the response data
  })
  .catch(error => {
    console.error('Error:', error);
  });

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class HttpURLConnectionExample {
    public static void main(String[] args) {
        String apiUrl = "https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API";

        try {
            URL url = new URL(apiUrl);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            connection.setRequestMethod("DELETE");

            int responseCode = connection.getResponseCode();
            System.out.println("Response Code: " + responseCode);

            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();

            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            reader.close();

            System.out.println("Response: " + response.toString());

            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# API endpoint URL
api_url = 'https://api.fruitask.com/v3/tables/{token}/rows/{id}/?api_key=YOUR_API'

# Make the DELETE request
response = requests.delete(api_url)

# Check if the request was successful
if response.status_code == 200:
    # Process the response
    print(response.text)
else:
    # Handle the error
    print(f"Error: {response.status_code}, {response.text}")

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avocado-5.gitbook.io/fruitask-api/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
