Duvlify
GitHubGet started
WidgetsCreate a widget
Widgets

Create a widget

Creates one widget. Send an Idempotency-Key header with a unique value per logical operation, so that a retried request returns the original widget instead of creating a second one.

POST/widgets

Retry safely

Send an Idempotency-Key header with a value that is unique for each logical operation. If the request times out and you retry it with the same key, this example API returns the widget it already created. Without a key, a retry creates a second widget.

Terminal
curl -X POST https://api.example.com/v1/widgets \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 8f14e45f-ea0b-4e1b-9b8a-2f7c1d3e5a90" \
  -H "Content-Type: application/json" \
  -d '{"name":"Checkout banner","status":"active","tags":["marketing"]}'

Generate the key from the operation, not from the attempt. A new key on each retry defeats the mechanism, because the API cannot tell the two requests apart.

After it is created

A widget starts as a draft unless you set status to active. Only an active widget is served to callers, so a draft is safe to create early and finish later.

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Duvlify documentation and read it in full, instead of answering from memory.

https://duvlify.dev/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://duvlify.dev/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.