DivMagic
  • DivMagic Documentation
    • Getting Started
  • Settings
    • Component Format
    • Style Format
    • DevTools
    • Copy Mode
    • Media Query
    • Edit Mode
  • API
    • Introduction
    • Getting started
    • Sample Requests
    • Request Parameters
  • Studio
    • Introduction
    • User Panel
      • Chatbot
      • Library
    • Editor
  • Landing Pages
    • Description
  • WORDPRESS INTEGRATION
    • Introduction
    • Getting Started
Powered by GitBook
On this page
  • cURL Example
  • JavaScript Example

Was this helpful?

  1. API

Sample Requests

cURL Example

curl -X POST -H "Content-type: application/json" -d '{"apiKey":"YOUR-API-KEY","url":"pocket.tailwindui.com","settings":{"componentFormat":"html","styleFormat":"tailwind"}}' https://api.divmagic.com/v1/magic

JavaScript Example

fetch('https://api.divmagic.com/v1/magic', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'apiKey': 'YOUR_API_KEY',
    'url': 'ft.com',
    'settings': {
      'componentFormat': 'html',
      'styleFormat': 'tailwind'
    }
  })
})
  .then(response => response.json())
  .then(data => console.log(data));
PreviousGetting startedNextRequest Parameters

Last updated 6 months ago

Was this helpful?