> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deskhoot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Your own API

> Show details from your own system

Show details from your own system beside a conversation, such as a customer's orders. DeskHoot asks an address on your server about the signed-in customer, and turns the answer into a card.

> [!NOTE]
>
> This needs a developer to add an address to your system that answers with the customer's details. **Copy setup prompt** on the page gives them a ready brief.

To add one, open [**Tools › Integrations**](https://app.deskhoot.com/app/integrations?tab=integrations) and select **Add** under **Your own APIs**.

Until it is added, it is a draft that your team cannot see. Adding needs a name, an address and a card. Two integrations cannot share a name.

## The address

| Rule | Detail |
| - | - |
| **Secure** | It has to start with `https://`, be on the public internet, and not redirect. |
| **Customer details** | With POST, DeskHoot also sends the customer's ID, email and billing ID in the body. With GET, which has no body, put a detail such as `{customer.id}` or `{customer.email}` in the address, after the host name, as in `https://api.yoursite.com/customers/{customer.id}`. A detail in the address or a header is filled in for each customer. |
| **Headers** | Up to 10, such as an Authorization header. A saved value is never shown again. |
| **Answer** | A JSON object, within 10 seconds, up to 256 KB. |

> [!WARNING]
>
> The card only fills for customers who are signed in on your website. Details come only from what your website signed or your server sent. A teammate cannot type them in. See [Verify users](https://docs.deskhoot.com/sdk/identify.md).

## Build the card

> [card] Send a test request
>
> DeskHoot calls your address once and builds the card from the answer. It asks about a made-up customer unless you type a real one under **Test customer**.

> [card] Paste an example answer
>
> Paste what your address answers. Nothing is sent.

DeskHoot puts the first 6 values on the card and offers the rest under **Also sent**. A list shows as how many items it holds.

You can reorder, rename and hide the rows, and show each value as Text, Number, Badge, Date, Time ago or Link. A hidden row is hidden from everyone, AutoPilot too.

A card reads up to 40 fields from an answer.

## Who sees it

Under **Who sees it**, show or hide each detail for **Agents**, **Leaders** and **AutoPilot**. Your team starts with every detail, and AutoPilot with none. Admins always see every detail.

The command follows the name, such as `/orders`. See [Integrations](https://docs.deskhoot.com/tools/integrations.md#settings-each-integration-has) for inboxes and loading.

## The signing secret

DeskHoot signs every request, so your server can check that it really came from DeskHoot. The secret is shown once, on the page that opens when you select **Add**. Copy it for your developer. If you leave before copying it, replace it.

> [!WARNING]
>
> **Replace secret** makes the old one stop working straight away. Until your server uses the new one, its requests are refused and the card shows an error.

## What DeskHoot keeps

| | Kept |
| - | - |
| **The secret and header values** | Encrypted, and never shown again. |
| **Answers** | Only the values DeskHoot read, for 5 minutes. |
| **The last test** | Its values, encrypted, until you test again. |
| **A log of each request** | Its time, status and any error. |

## When it fails

| The card says | What to check |
| - | - |
| **Your endpoint took longer than 10 seconds** | Make the address answer faster. |
| **We couldn't reach this address** | The address, and that your server is up and on the public internet. |
| **Your endpoint refused the request (401)** | The signing secret on your server, or your Authorization header. |
| **Your endpoint answered 404** | Whether your system knows this customer. The made-up test customer usually gets this. |
| **Your endpoint redirects** | Use its final address. |
| **Your endpoint didn't answer with JSON** | It has to answer with a JSON object, up to 256 KB. |

Admins see the real error on the card. Everyone else sees "This couldn't be loaded just now."

## Remove it

After **Remove integration**, its card leaves every conversation. Nothing changes on your side.

## Related

> [card] [Integrations](https://docs.deskhoot.com/tools/integrations.md)
>
> Connect Stripe, calendars and your own API.

> [card] [Actions](https://docs.deskhoot.com/tools/actions.md)
>
> Requests to your own systems.

> [card] [Verify users](https://docs.deskhoot.com/sdk/identify.md)
>
> For developers: tell DeskHoot who the customer is.

> [card] [Webhooks](https://docs.deskhoot.com/tools/webhooks.md)
>
> Tell your systems when something happens.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.