# Set up an API DELETE request - Airtable

The **Data Collections** allows you to create API requests to any database or tool with an available REST API.

In this tutorial, we're guiding you on how to create a **DELETE request** to delete data in an external data source from your app. We are going to use an already existing data collection.

If you don't have a Data collection yet, go to [**Data Collection & Binding: Complete Collection**](/connect-api/data-library-and-binding-complete-collection.md)**.**

<figure><img src="/files/uyQFxYjipsyamVprvM5h" alt=""><figcaption></figcaption></figure>

**Figma file Sample**

Here is the [Figma file](https://www.figma.com/file/wcw77bpYd48s83G1KEFGap/Bravo-samples%3A-Form-Scores?type=design\&node-id=0-1\&mode=design\&t=FpbVWedz7lh9feXH-0) used in the example.

**Database Sample**

Copy this [Airtable](https://airtable.com/appByFWSaH1HB4xav/shrjetk4AeKeUuumw/tbl2s8gq2LGRy9XDu/viwFaPmiAYHKddmcj?blocks=hide) as the database to delete data.

**Remote action tag**

Ensure the `delete` element in your Figma file includes the [remote action](/data-binding/data-binding-types/data-binding-add-remote-actions-to-your-ui.md) tag.

```
[action:remote]
```

<figure><img src="/files/AJ1gEcJKWh4Kfgtceqdi" alt=""><figcaption></figcaption></figure>

### Delete records from Airtable's API

To delete records from the Score table using the Airtable API, follow these steps:

1. Open the Help menu by clicking on the **Help** button located at the top right of the screen.
2. Scroll to the end to select **Api Documentation**. A new page with the API documentation will then be displayed.

![Airtable API documentation for DELETE request](/files/jeVCNkGFNtyBWzf0FMo1)

3. From the left-hand side menu, find the **Score Table** and then choose **Delete Scores records.**

<figure><img src="/files/ooUFXucPjsVWYK9mqUGV" alt=""><figcaption></figcaption></figure>

4. Now, we'll copy a URL from an example request provided. To get the correct URL example, make sure to click on **"***You can also issue a **DELETE** request to the record endpoint to delete a single record. Click here to show an example."*
5. **Copy** the example request URL provided.

## How to set up a DELETE request in Bravo

1. To create a new request, click the blue "+" button.
2. Add a name for the request.
3. Choose the DELETE method from the request options.
4. Paste the URL that you have copied from Airtable's API.

<figure><img src="/files/U9e2ckaA9h6n3Ffpb7DS" alt=""><figcaption></figcaption></figure>

5. The URL provided contains the ID "recPe7CDVCMiCFEMJ" at the end. Replace this with the [variable](/connect-api/request-url-variables.md) name `${id}`. This change makes it possible to delete any record the user selects by dynamically changing the `${id}` variable.
6. To test, you may either use the same ID found in the URL or refer back to the Airtable API documentation to find an example ID provided in a sample request.

<figure><img src="/files/Jn1eViTiFT2kj7YBR0vi" alt=""><figcaption></figcaption></figure>

7. Add the key and the value in the **Test Values** tab. In this example:&#x20;
   * The key field should contain the variable name "id"
   * The value field should contain: "recPe7CDVCMiCFEMJ".

<figure><img src="/files/nBwssrNH5g91A3RWHnYh" alt=""><figcaption></figcaption></figure>

8. Last but not least, do not forget to add the authentication in the request's Headers. The API documentation will specify the **Headers** you also need to enter the DELETE request. \
   \
   In this case, Airtable uses 'Authorization:Bearer'. Since the Airtable Wizard was used to create the API collection, the headers have been automatically generated. Therefore, we will use the same headers as in the Scores Detail request.

{% hint style="info" %}
If you haven't already set up your API collection with Airtable Wizard, you'll need to obtain the Header from the [Personal Access Token](/connect-api/browse-by-backend/airtable/update-airtable-access-token.md).
{% endhint %}

<figure><img src="/files/7jpgXj5tev6C8MgjWP9S" alt=""><figcaption></figcaption></figure>

9. Execute the request by clicking on the **Send** button.

<figure><img src="/files/NgXjq7Ky7LQ8KVjX0o5k" alt=""><figcaption></figcaption></figure>

9. To verify whether an ID has been deleted, please check the Debug tool or Airtable.

### The Binding

1. Go to the app's binding section.
2. On the left-hand side, under Elements, select the delete element marked by a lightning icon, where you previously inserted the `[action:remote]` tag.
3. After selecting the delete element, navigate to the right-hand side and locate the "Remote action" section. Here, choose the API delete request. You can also set your preferred actions for both "On success" and "On error" scenarios.
4. That's it! Proceed with testing using Bravo Vision.

<figure><img src="/files/BTRxESJnUfvyfIvP5qVR" alt=""><figcaption></figcaption></figure>

Now, you are ready to go!!&#x20;

Here's an additional example using Airtable:

{% embed url="<https://www.youtube.com/watch?v=NPpgCaYZ0TE&list=PLzg-UiRu-a_YTj5_eTVuR1uNmAFHKBuew&index=6>" %}

Your feedback is valuable to us. If you have any suggestions or questions, please don't hesitate to reach out to us in the [community](https://community.bravostudio.app/home).


---

# 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://docs.bravostudio.app/connect-api/set-up-api-requests/creating-an-api-collection/airtable/data-library-connect-to-any-api-delete-request.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.
