Skip to content

POST /api/v3/drive-templates

Summary

POST /drive-templates

Description

Create a new drive template

Tags: templates

Parameters

Header Parameters

Name Type Required Description Example
Authorization string ✓ Yes Bearer {AuthToken}
Content-Type string ✓ Yes application/json
Accept string ✓ Yes application/json
AppIdV3 string ✓ Yes LCUID-LAP-********-****-****-****-************

Request Body

Required: Yes

Content Type: application/json

Schema

Type: object

Required fields: name, templates, variants, assets

Properties:

  • name (string) (required): The name of the drive template
  • description (string): The description of the drive template
  • templates (string) (required): JSON string containing the template data
  • variants (string) (required): JSON string containing the variants data
  • assets (string) (required): JSON string containing the assets data
  • parent_lcuid (string): The LCUID of the parent object (typically an account)
  • inventory_item_class (string): JSON string containing inventory item classes

Responses

Response: 200

Description: Sample Response

Content Type: application/json

Schema

Type: object

Properties:

  • success (boolean): Indicates if the request was successful
  • drive_template (object) Type: object

Properties:

  • name (string)
  • description (string)
  • status (integer)
  • templates (object) Type: object

    Properties:

    • base (object) Type: object

    Properties:

    • some_template_data (string)
    • render_app_version (string)
  • variants (array)

    • Array items: object Type: object

    Properties:

    • css (string)
  • assets (array)

    • Array items: array
  • options (object) Type: object

    Properties:

    • _init (array)
    • data_source_macro_scope_cache (object) Type: object

    Properties:

    • has_data_source_scoped_macros (boolean)
    • data_source_scoped_macros (array)
    • linked_data_source_scoped_macro_feed_providers (array)
    • linked_data_source_scoped_macro_feeds (array)

    • template_attached_to_missing_feeds (string)

  • lcuid (string)

  • inventory_item_class (array)
  • template_hash (string)
  • created_at (string)
  • updated_at (string)
  • inventory_item_class_data (array)
  • parent (object) Type: object

    Properties:

    • name (string)
    • options (object) Type: object

    Properties:

    • primary_image_public_url (string)
    • primary_image_background_removed_public_url (string)

    • lcuid (string)

    • slug (string)
    • website (string)
    • description (string)
    • created_at (string)
    • inventory_item_class (array)
    • Array items: string
    • account_class (string)
    • inventory_item_class_description (string)
    • account_class_description (string)
    • is_parent_account (boolean)
Example Response
{
    "success": true,
    "drive_template": {
        "name": "Test Template",
        "description": "This is a test template",
        "status": 0,
        "templates": {
            "base": {
                "some_template_data": "value",
                "render_app_version": "v1"
            }
        },
        "variants": [
            {
                "css": "some css here"
            }
        ],
        "assets": [
            []
        ],
        "options": {
            "_init": [],
            "data_source_macro_scope_cache": {
                "has_data_source_scoped_macros": false,
                "data_source_scoped_macros": [],
                "linked_data_source_scoped_macro_feed_providers": [],
                "linked_data_source_scoped_macro_feeds": []
            },
            "template_attached_to_missing_feeds": null
        },
        "lcuid": "LCUID-LDT-35bbcec5-ad61-415e-b71e-7e9903333820",
        "inventory_item_class": [],
        "template_hash": "1bcb9f7938f140fd31cb88967190dfdb",
        "created_at": "2026-02-03T18:07:34.000000Z",
        "updated_at": "2026-02-03T18:07:34.000000Z",
        "inventory_item_class_data": [],
        "parent": {
            "name": "Test Account",
            "options": {
                "primary_image_public_url": null,
                "primary_image_background_removed_public_url": null
            },
            "lcuid": "LCUID-LA-5abbd10b-c94f-4323-b5e5-6dbb717ce137",
            "slug": "UnitTestAccount59lma",
            "website": null,
            "description": "Here is a new unit test account description",
            "created_at": "2026-02-03T18:07:34.000000Z",
            "inventory_item_class": [
                "App\\LuCore\\InventoryItems\\GenericInventoryItemClass"
            ],
            "account_class": "App\\LuCore\\Accounts\\InventoryAccountClass",
            "inventory_item_class_description": "Generic",
            "account_class_description": "Inventory",
            "is_parent_account": false
        }
    }
}

Example Implementations

Bash (cURL)

curl --request POST \
    "https://api.lucit.app/api/v3/drive-templates" \
    --header "Authorization: Bearer {AuthToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "AppIdV3: LCUID-LAP-********-****-****-****-************" \
    --data "{
    \"name\": \"My Template\",
    \"description\": \"A template for real estate\",
    \"templates\": \"aliquid\",
    \"variants\": \"aliquid\",
    \"assets\": \"aliquid\",
    \"parent_lcuid\": \"aliquid\",
    \"inventory_item_class\": \"aliquid\"
}"

JavaScript (Fetch API)

const url = new URL(
    "https://api.lucit.app/api/v3/drive-templates"
);

const headers = {
    "Authorization": "Bearer {AuthToken}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "AppIdV3": "LCUID-LAP-********-****-****-****-************",
};

let body = {
    "name": "My Template",
    "description": "A template for real estate",
    "templates": "aliquid",
    "variants": "aliquid",
    "assets": "aliquid",
    "parent_lcuid": "aliquid",
    "inventory_item_class": "aliquid"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

PHP (Guzzle)

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.lucit.app/api/v3/drive-templates',
    [
        'headers' => [
            'Authorization' => 'Bearer {AuthToken}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
        ],
        'json' => [
            'name' => 'My Template',
            'description' => 'A template for real estate',
            'templates' => 'aliquid',
            'variants' => 'aliquid',
            'assets' => 'aliquid',
            'parent_lcuid' => 'aliquid',
            'inventory_item_class' => 'aliquid',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Python (Requests)

import requests
import json

url = 'https://api.lucit.app/api/v3/drive-templates'
payload = {
    "name": "My Template",
    "description": "A template for real estate",
    "templates": "aliquid",
    "variants": "aliquid",
    "assets": "aliquid",
    "parent_lcuid": "aliquid",
    "inventory_item_class": "aliquid"
}
headers = {
  'Authorization': 'Bearer {AuthToken}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example Responses

200 Response

{
    "success": true,
    "drive_template": {
        "name": "Test Template",
        "description": "This is a test template",
        "status": 0,
        "templates": {
            "base": {
                "some_template_data": "value",
                "render_app_version": "v1"
            }
        },
        "variants": [
            {
                "css": "some css here"
            }
        ],
        "assets": [
            []
        ],
        "options": {
            "_init": [],
            "data_source_macro_scope_cache": {
                "has_data_source_scoped_macros": false,
                "data_source_scoped_macros": [],
                "linked_data_source_scoped_macro_feed_providers": [],
                "linked_data_source_scoped_macro_feeds": []
            },
            "template_attached_to_missing_feeds": null
        },
        "lcuid": "LCUID-LDT-35bbcec5-ad61-415e-b71e-7e9903333820",
        "inventory_item_class": [],
        "template_hash": "1bcb9f7938f140fd31cb88967190dfdb",
        "created_at": "2026-02-03T18:07:34.000000Z",
        "updated_at": "2026-02-03T18:07:34.000000Z",
        "inventory_item_class_data": [],
        "parent": {
            "name": "Test Account",
            "options": {
                "primary_image_public_url": null,
                "primary_image_background_removed_public_url": null
            },
            "lcuid": "LCUID-LA-5abbd10b-c94f-4323-b5e5-6dbb717ce137",
            "slug": "UnitTestAccount59lma",
            "website": null,
            "description": "Here is a new unit test account description",
            "created_at": "2026-02-03T18:07:34.000000Z",
            "inventory_item_class": [
                "App\\LuCore\\InventoryItems\\GenericInventoryItemClass"
            ],
            "account_class": "App\\LuCore\\Accounts\\InventoryAccountClass",
            "inventory_item_class_description": "Generic",
            "account_class_description": "Inventory",
            "is_parent_account": false
        }
    }
}

← Back to drive-templates index | Back to main index