Skip to content

Your first template

A template is a reusable schema definition. You declare what fields you want, what type each field is, and DataMaker generates rows that match. Templates live inside a project and can be invoked from the UI, the REST API, the Python SDK, the MCP server, or the chat agent.

We’ll build a small Customer template with five fields and preview the output as we go.

1. Open the template builder

From the project sidebar, click Templates → New template. Give it a name (Customer) and click Create.

The builder shows a two-pane view: a field editor on the left, a live preview on the right. The preview updates as soon as you add or change a field — no need to “run” anything.

2. Add fields

Click Add field five times (or hit Alt+Shift+N four extra times). For each row, type a name and pick a data type. For our Customer:

Field nameData typeNotes
first_nameFirst NameDefault locale (en); we’ll change this.
emailE-Mail
companyCompany
ibanIBANDefaults to a country-mixed IBAN.
balanceCurrency

The preview pane on the right will update to show JSON like:

[
{ "first_name": "Alice", "email": "alice.smith@example.com", ... },
{ "first_name": "Bob", "email": "bob.jones@example.com", ... }
]

3. Switch the locale to German

Click the Settings gear next to the first_name field. Under Locale, pick de_DE. Do the same for iban. The preview now shows realistic German names and country-DE IBANs that pass MOD-97.

For more on locales and what fields support them, see Templates → Field types.

4. Save the template

Click Save (or hit Alt+Shift+S). Templates are versioned — every save creates a new revision you can roll back to.

The sidebar now shows Customer under Templates.

What you can do with this template

  • Generate N rows in the UI (Generate → 100 rows → JSON).

  • Push directly into a connected database or REST endpoint — see Connections.

  • Trigger from CI via the REST API:

    Terminal window
    curl -X POST https://api.datamaker.automators.com/templates/{id}/generate \
    -H "Authorization: Bearer $DM_API_KEY" \
    -d '{"count": 100, "format": "json"}'
  • Drop it into the AI agent: in any DataMaker chat, type generate 100 customers — the agent finds your template by name.

Next

Export the data →