The Airtable API lets you connect an Airtable base, explore its schema, fetch records, and use that data to generate PDFs. These endpoints act as a proxy to the Airtable API, handling authentication and formatting records for template rendering.
Method Endpoint Description POST/v1/airtable/connectValidate an Airtable token and list accessible bases GET/v1/airtable/bases/:baseId/tablesList tables in a base GET/v1/airtable/bases/:baseId/tables/:tableId/schemaGet field schema for a table GET/v1/airtable/bases/:baseId/tables/:tableId/recordsFetch sample records GET/v1/airtable/bases/:baseId/tables/:tableId/records/:recordIdGet a single record
POST /v1/airtable/connect
Validate an Airtable Personal Access Token (PAT) and return a list of accessible bases. This is the first step in the Airtable integration flow.
Header Required Description AuthorizationYes Bearer gk_your_api_keyContent-TypeYes application/json
"apiKey" : " patXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "
Parameter Type Required Description apiKeystring Yes Airtable Personal Access Token (pat...) or legacy API key (key...)
"id" : " appXXXXXXXXXXXXXX " ,
"name" : " Sales Pipeline " ,
"permissionLevel" : " create "
"id" : " appYYYYYYYYYYYYYY " ,
"permissionLevel" : " read "
"message" : " Connected successfully. Found 2 accessible base(s). "
Field Type Description successboolean Whether the connection succeeded basesarray List of accessible Airtable bases bases[].idstring Base ID (starts with app) bases[].namestring Human-readable base name bases[].permissionLevelstring Permission level (read, comment, edit, create) messagestring Summary message
400 Bad Request — Invalid key format
"error" : " Invalid Airtable API key format. Keys should start with 'pat' (personal access token) or 'key' (legacy). " ,
"code" : " INVALID_KEY_FORMAT "
401 Unauthorized — Invalid token
"error" : " Failed to connect to Airtable. Please check your API key. " ,
"code" : " AIRTABLE_AUTH_ERROR "
curl -X POST https://api.glyph.you/v1/airtable/connect \
-H " Authorization: Bearer gk_your_api_key " \
-H " Content-Type: application/json " \
-d ' {"apiKey": "patXXXXXXXXXXXXXX.XXXX"} '
const response = await fetch ( ' https://api.glyph.you/v1/airtable/connect ' , {
' Authorization ' : ' Bearer gk_your_api_key ' ,
' Content-Type ' : ' application/json '
apiKey: ' patXXXXXXXXXXXXXX.XXXX '
const { success , bases } = await response . json ();
for ( const base of bases ) {
console . log ( ` ${ base . name } ( ${ base . id } ) - ${ base . permissionLevel } ` );
response = requests. post (
' https://api.glyph.you/v1/airtable/connect ' ,
' Authorization ' : ' Bearer gk_your_api_key ' ,
' Content-Type ' : ' application/json '
json = { ' apiKey ' : ' patXXXXXXXXXXXXXX.XXXX ' }
for base in result[ ' bases ' ]:
print ( f " {base [ ' name ' ] } ( {base [ ' id ' ] } ) - {base [ ' permissionLevel ' ] } " )
GET /v1/airtable/bases/:baseId/tables
List all tables in an Airtable base with their field counts and view counts.
Header Required Description AuthorizationYes Bearer gk_your_api_keyX-Airtable-KeyYes Airtable PAT for accessing the base
Parameter Type Description baseIdstring Airtable base ID (e.g. appXXXXXXXXXXXXXX)
"baseId" : " appXXXXXXXXXXXXXX " ,
"id" : " tblXXXXXXXXXXXXXX " ,
"description" : " All customer orders " ,
"primaryFieldId" : " fldXXXXXXXXXXXXXX " ,
Field Type Description tables[].idstring Table ID tables[].namestring Table name tables[].descriptionstring Table description (if set in Airtable) tables[].primaryFieldIdstring ID of the primary field tables[].fieldCountnumber Number of fields in the table tables[].viewCountnumber Number of views
curl https://api.glyph.you/v1/airtable/bases/appXXXXXXXXXXXXXX/tables \
-H " Authorization: Bearer gk_your_api_key " \
-H " X-Airtable-Key: patXXXXXXXXXXXXXX.XXXX "
const response = await fetch (
' https://api.glyph.you/v1/airtable/bases/appXXXXXXXXXXXXXX/tables ' ,
' Authorization ' : ' Bearer gk_your_api_key ' ,
' X-Airtable-Key ' : ' patXXXXXXXXXXXXXX.XXXX '
const { tables } = await response . json ();
for ( const table of tables ) {
console . log ( ` ${ table . name } : ${ table . fieldCount } fields, ${ table . viewCount } views ` );
GET /v1/airtable/bases/:baseId/tables/:tableId/schema
Get the detailed field schema for a table, including field types, descriptions, and AI-optimized schema output.
Header Required Description AuthorizationYes Bearer gk_your_api_keyX-Airtable-KeyYes Airtable PAT
Parameter Type Description baseIdstring Airtable base ID tableIdstring Table ID or table name
"baseId" : " appXXXXXXXXXXXXXX " ,
"id" : " tblXXXXXXXXXXXXXX " ,
"description" : " All customer orders " ,
"primaryFieldId" : " fldXXXXXXXXXXXXXX "
"id" : " fldXXXXXXXXXXXXXX " ,
"type" : " singleLineText " ,
"description" : " Unique order identifier " ,
"id" : " fldYYYYYYYYYYYYYY " ,
"id" : " viwXXXXXXXXXXXXXX " ,
"aiSchema" : " Order Number (singleLineText), Total (currency), ... "
Field Type Description fields[].idstring Field ID fields[].namestring Human-readable field name fields[].typestring Airtable field type (e.g. singleLineText, currency, multipleRecordLinks) fields[].descriptionstring Field description (if set) fields[].optionsobject Type-specific options (precision, choices, linked table, etc.) viewsarray Available views for filtering records aiSchemastring AI-optimized schema summary for template generation
curl https://api.glyph.you/v1/airtable/bases/appXXXX/tables/tblXXXX/schema \
-H " Authorization: Bearer gk_your_api_key " \
-H " X-Airtable-Key: patXXXXXXXXXXXXXX.XXXX "
GET /v1/airtable/bases/:baseId/tables/:tableId/records
Fetch sample records from a table. Records are returned in both raw Airtable format and a template-friendly format.
Header Required Description AuthorizationYes Bearer gk_your_api_keyX-Airtable-KeyYes Airtable PAT
Parameter Type Description baseIdstring Airtable base ID tableIdstring Table ID or table name
Parameter Type Default Description maxRecordsnumber 5 Number of records to fetch (1-100) viewstring — Airtable view name or ID to filter records
"baseId" : " appXXXXXXXXXXXXXX " ,
"tableId" : " tblXXXXXXXXXXXXXX " ,
"Order Number" : " ORD-001 " ,
"id" : " recXXXXXXXXXXXXXX " ,
"createdTime" : " 2026-01-15T10:00:00.000Z " ,
"Order Number" : " ORD-001 " ,
"Status" : { "name" : " Paid " , "color" : " greenBright " }
Field Type Description recordsarray Template-friendly records with formatted values (currency symbols, dates, etc.) rawRecordsarray Raw Airtable records with original field types rawRecords[].idstring Airtable record ID rawRecords[].fieldsobject Raw field values
# Fetch 10 records from a specific view
curl " https://api.glyph.you/v1/airtable/bases/appXXXX/tables/tblXXXX/records?maxRecords=10&view=Grid%20view " \
-H " Authorization: Bearer gk_your_api_key " \
-H " X-Airtable-Key: patXXXXXXXXXXXXXX.XXXX "
const baseId = ' appXXXXXXXXXXXXXX ' ;
const tableId = ' tblXXXXXXXXXXXXXX ' ;
const response = await fetch (
` https://api.glyph.you/v1/airtable/bases/ ${ baseId } /tables/ ${ tableId } /records?maxRecords=10 ` ,
' Authorization ' : ' Bearer gk_your_api_key ' ,
' X-Airtable-Key ' : airtableToken
const { records , recordCount } = await response . json ();
console . log ( ` Fetched ${ recordCount } records ` );
// Use the first record to generate a PDF
const pdfResponse = await fetch ( ' https://api.glyph.you/v1/create ' , {
' Authorization ' : ' Bearer gk_your_api_key ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json '
intent: ' professional invoice '
GET /v1/airtable/bases/:baseId/tables/:tableId/records/:recordId
Fetch a single record by its Airtable record ID.
Header Required Description AuthorizationYes Bearer gk_your_api_keyX-Airtable-KeyYes Airtable PAT
Parameter Type Description baseIdstring Airtable base ID tableIdstring Table ID or table name recordIdstring Airtable record ID (starts with rec)
"baseId" : " appXXXXXXXXXXXXXX " ,
"tableId" : " tblXXXXXXXXXXXXXX " ,
"Order Number" : " ORD-001 " ,
"id" : " recXXXXXXXXXXXXXX " ,
"createdTime" : " 2026-01-15T10:00:00.000Z " ,
"Order Number" : " ORD-001 " ,
curl https://api.glyph.you/v1/airtable/bases/appXXXX/tables/tblXXXX/records/recXXXX \
-H " Authorization: Bearer gk_your_api_key " \
-H " X-Airtable-Key: patXXXXXXXXXXXXXX.XXXX "
Here is a complete example that connects to Airtable, fetches a record, and generates a PDF:
const GLYPH_KEY = ' gk_your_api_key ' ;
const AIRTABLE_TOKEN = ' patXXXXXXXXXXXXXX.XXXX ' ;
// Step 1: Connect and find the base
const connectRes = await fetch ( ' https://api.glyph.you/v1/airtable/connect ' , {
' Authorization ' : ` Bearer ${ GLYPH_KEY } ` ,
' Content-Type ' : ' application/json '
body: JSON . stringify ( { apiKey: AIRTABLE_TOKEN } )
const { bases } = await connectRes . json ();
const baseId = bases [ 0 ] . id ;
const tablesRes = await fetch (
` https://api.glyph.you/v1/airtable/bases/ ${ baseId } /tables ` ,
' Authorization ' : ` Bearer ${ GLYPH_KEY } ` ,
' X-Airtable-Key ' : AIRTABLE_TOKEN
const { tables } = await tablesRes . json ();
const tableId = tables [ 0 ] . id ;
const recordsRes = await fetch (
` https://api.glyph.you/v1/airtable/bases/ ${ baseId } /tables/ ${ tableId } /records?maxRecords=1 ` ,
' Authorization ' : ` Bearer ${ GLYPH_KEY } ` ,
' X-Airtable-Key ' : AIRTABLE_TOKEN
const { records } = await recordsRes . json ();
// Step 4: Generate PDF from the record data
const pdfRes = await fetch ( ' https://api.glyph.you/v1/create ' , {
' Authorization ' : ` Bearer ${ GLYPH_KEY } ` ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json '
intent: ' professional invoice ' ,
const pdf = await pdfRes . json ();
console . log ( ` Generated: ${ pdf . filename } ( ${ pdf . size } bytes) ` );
All Airtable endpoints share these common errors:
Status Code Description 400 VALIDATION_ERRORInvalid request data 400 INVALID_KEY_FORMATAirtable key does not start with pat or key 400 MISSING_REQUIREDMissing X-Airtable-Key header 401 AIRTABLE_AUTH_ERRORInvalid Airtable token 404 NOT_FOUNDTable or record not found 502 AIRTABLE_ERRORFailed to communicate with Airtable API