> For the complete documentation index, see [llms.txt](https://docs.omnichat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omnichat.ai/en/features/marketing/chatbot-2.0/call-an-api-card-add-on-feature.md).

# Call an API Card (add-on feature)

Supported Platforms: Facebook, Instagram, LINE, WhatsApp

### Call an API Card - What It Can Do:

✅ **Data Lookup**: Fetch the most up-to-date information from an external database.\
✅ **Data Submission**: Send customer input to a designated database.

When certain data needs to be checked, API sends the customer's question to the brand's database. Once the database responds, Omnichat turns the answer into a chatbot message and sends it to the customer through their social channel.

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FHWk9LgnRI22Pwz93NnaM%2Fimage.png?alt=media&amp;token=45fcb80f-a195-4cd4-a373-b2de1ddd7b8f" alt=""><figcaption><p>How Call an API Card works</p></figcaption></figure>

{% hint style="info" %}
Search results from the brand database will be sent as messages to customers on social channels, but data won’t be saved as [Custom Attributes](https://en-docs.omnichat.ai/features/social-cdp/custom-attribute-cdp-subscription-plan-only) in Omnichat.
{% endhint %}

This card can also interact with other systems to send emails, SMS messages, or app notifications.

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FbwpPVAbYAF7sp9lokzmP%2Fimage.png?alt=media&amp;token=7cecf560-f37e-46f9-9035-e4374b600278" alt=""><figcaption><p>Call in API card can call other systems to take actions</p></figcaption></figure>

Call an API card has 4 editable sections:

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2Fed3nU9IWxLFy6WTP2mTj%2Fcall%20an%20API%20card%202.png?alt=media&amp;token=4110c4b3-9feb-42d1-b803-1158bb2f5146" alt="" width="375"><figcaption><p>Call an API Card</p></figcaption></figure>

1. **Endpoint:** Your API URL. E.g., <https://www.example.com/get\\_point>
2. **Header:** Information required by the API. E.g., Authorization format
3. **Payload:** Data to be sent, retrieved, or searched. E.g., member ID, customer phone number, or product/event details
4. **Trigger on Success/Failure**: The message Block replies to the customer based on whether the API call is successful or fails.

### Use Case

#### Data Lookup

**Personalized Information – Member Details**

If a customer's information is stored in the brand's system, Call an API card can be used to check customer's details such as order number, delivery status, coupons, or travel schedule.

{% hint style="success" %}
**Example Scenario: Travel Industry**

After a customer verifies their identity and binds their phone number, they can access their membership details directly on LINE.

When they tap "My Tickets", Call an API card is used to search the brand's database and retrieve their unused ticket information.

The chatbot then replies with a preset message block showing the ticket details to the customer.
{% endhint %}

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FFRrCyWatTIjn74JR92tY%2Fcall%20an%20api%20example%203.png?alt=media&amp;token=6a8d5807-7712-4ccf-8171-1166d65e088b" alt=""><figcaption><p>No agent needed. Customers can check their personalized information on their own.</p></figcaption></figure>

**Non-personalized Information - Real-Time Updates**

Customers can search for this type of information without binding their personal details.

The searched info is not tied to any personal data and may include real-time information such as hot selling products, upcoming events, or trending news.

{% hint style="success" %}
**Example Scenario 1: Finance Industry**

Customers in the finance industry often ask about the latest credit card welcome offers.

Since these campaigns are updated frequently, Call an API card can be used to pull the latest information directly from the brand's database and reply to customers.

This helps reduce the workload for both marketing and support teams, while also ensuring customers always get the most up-to-date information.
{% endhint %}

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FghQn0u4vmH35qEvTTD9u%2Fcall%20an%20api%20example%202.png?alt=media&amp;token=f5afd5b4-e109-4169-bd73-e8f823167e75" alt=""><figcaption><p>Customers can interact with the chatbot to get the latest information anytime.</p></figcaption></figure>

{% hint style="success" %}
**Example Scenario 2: Retail Industry**

Customers often look at best selling product rankings for shopping inspiration.

By using Call an API card, latest product info can be pulled directly from a brand's database and sent to customers automatically.

Marketing teams no longer need to manually update chatbot content, and customers can always get the most recent information without delay.
{% endhint %}

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FCrT9lHh4R2NtsZ8RxSBC%2Fcall%20an%20api%20retail.png?alt=media&amp;token=095a019d-0c85-4a50-99a7-6216c75b470a" alt=""><figcaption><p>Product recommendations stay up to date automatically, no manual updates required.</p></figcaption></figure>

#### **Data Submission**

When a customer interacts with chatbots and submits information, such as filling out a survey or registering for an event, you can use the Call an API card to send that data to your brand's database. This allows the system to respond instantly based on the customer's input.

{% hint style="success" %}
**Use case example:**\
**Suitable when customers fill out surveys or event registration forms.**

When a customer provides personal information through chatbots (e.g. name, contact details, or registration info), the data is saved in Omnichat as custom attributes.

Call an API card then sends these attributes to your brand's database. After the request is processed, the database returns a response, which is sent to the customer through chatbot messages.
{% endhint %}

<figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FoXHi98CYATxAGlVrq6Nf%2Fcall%20an%20api%20last%20example.png?alt=media&amp;token=184d41d8-c6e2-4911-9c94-3ab4a5360842" alt=""><figcaption><p>Return customer data to brand's database.</p></figcaption></figure>

If you'd like to explore more use cases, please feel free to message Omnichat support team through webchat plugin on our [official website](https://www.omnichat.ai/). 🙌
