---
title: "API_GetRecordAsHTML"
slug: "api-getrecordashtml"
updated: 2025-08-18T09:22:47Z
published: 2025-08-18T09:22:47Z
---

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

# API_GetRecordAsHTML

**Don't forget to check out our**[**JSON RESTful APIs**](https://developer.quickbase.com/)**, they can help you utilize and extend Quickbase with ease.**

## Overview

Use API_GetRecordAsHTML to get a record within an HTML fragment that can be embedded in another Web page.

## Request parameters

| Parameter | Value | Required? |
| --- | --- | --- |
| rid | The record ID of the record to be edited. You can obtain the recordID of any record in a query. (See API_DoQuery.) If you use a key field OTHER than the record id (rid), you should use the key parameter rather than rid. | yes |
| dfid | The dform id of the form used to generate the HTML. The resulting display matches the contents and layout of the form you specify. You can obtain the dfid of a form by previewing or editing the form; the dfid is part of the URL in the browser’s address bar. | no |
| ticket | A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call. | yes, one of: - ticket - username/password - user token |
| usertoken | The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quickbase UI. | yes, one of: - ticket - username/password - user token |
| apptoken | Supply a valid application token. | yes, if the application requires application tokens |
| udata | A string value that you want returned. It will not be handled by Quickbase but it will be returned in the response. | no |

## Response values

The requested record, in an HTML fragment.

| Element Name | Value |
| --- | --- |
| action | Echoes the originating request, for example, API_AddField. |
| errcode | Identifies the error code, if any. (See the[Error Codes appendix](/v1/docs/error-codes) for a list of possible error codes.) 0 indicates that no error was encountered. |
| errtext | Text that explains the error code. "No error" indicates that no error was encountered. |
| udata | Optional. Contains any udata value supplied in the request. |

## Sample XML Request

```xml
POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_GetRecordAsHTML

<qdbapi>
   <udata>mydata</udata>
   <ticket>auth_ticket</ticket>
   <apptoken>app_token</apptoken>
   <rid>2</rid>
   <dfid>10</dfid>
</qdbapi>
```

## URL alternative

```plaintext
https://target_domain/db/target_dbid?a=API_GetRecordAsHTML&rid=18&dfid=10
&ticket=auth_ticket&apptoken=app_token
```

where *target_domain* is the domain against which you are invoking this call, for example, *quickbase.com*. [Read about this notation](/v1/docs/understanding-the-api-call-reference).

## Embedding a Quickbase record into a Web page

To embed a Quickbase record into a Web page on your site, add the following code to the body of your Web page:

```xml
<div id="dbPagePayload"></div>
<script lang="text/javascript">
$.post("./target_dbid?a=API_GetRecordAsHTML&rid=n", {}, function(response){
$("#dbPagePayload").html(response);
});
</script>
```

where *target_domain* is the domain against which you are invoking this call, for example, *quickbase.com*. [Read about this notation](/v1/docs/understanding-the-api-call-reference).

## Example Web Page Code

```xml
<html>
<head>
<!-- put styling information here -->
</head>
<body>
<h1>Example</h1>
<p> A Quickbase table embedded in a page of HTML</p>
<div id="dbPagePayload"></div>
<script lang="text/javascript">
$.post("./target_dbid?a=API_GetRecordAsHTML&rid=20", {}, function(response){
$("#dbPagePayload").html(response);
});
</script>
</body>
</head>
</html>
```
