> For the complete documentation index, see [llms.txt](https://docs.boii.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.boii.dev/fivem-free-resources/bduk/api.md).

# API

This page documents the public exports and events provided by BDUK.

***

## Events

### bduk:notify

Fires a UI notification  to the client.

```lua
TriggerEvent("bduk:notify", {
    type = "success",
    message = "Item added!",
    header = "Done",
    icon = "fa-solid fa-check-circle",
    duration = 5000,
    match_border = true,
    match_shadow = false
})
```

#### Parameters

* `type`: `"success"`, `"error"`, `"info"`, `"warning"` — *(default: `"info"`)*
* `message`: Body text (required)
* `header`: Optional title
* `icon`: Font Awesome class (e.g. `"fa-solid fa-bell"`)
* `duration`: Time in ms (default `5000`, `0` = sticky)
* `match_border`: Whether to color the border based on type
* `match_shadow`: Whether to color the shadow based on type

***

## Exports

### build

Builds and displays a full BDUK UI layout.

```lua
exports.bduk:build(layout)
```

#### Parameters

* `layout`: The full Lua config table for your UI (see: [**Making Your First UI**](/fivem-free-resources/bduk/guides/making-your-first-ui.md))

***

### notify

Triggers a notification programmatically (same as the `bduk:notify` event).

```lua
exports.bduk:notify({
    type = "error",
    message = "Something went wrong!"
})
```

#### Parameters

* Same structure as `bduk:notify` event (see above)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.boii.dev/fivem-free-resources/bduk/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
