cURL
curl --request POST \ --url https://api.example.com/api/open/forms/{form}/duplicate
{ "message": "<string>", "new_form": { "id": 123, "slug": "<string>", "title": "<string>", "properties": [ {} ], "removed_properties": [ {} ] } }
Create a copy of an existing form
curl -X POST "https://api.opnform.com/api/open/forms/contact-form-abc123/duplicate" \ -H "Authorization: Bearer YOUR_API_TOKEN"
{ "message": "Form successfully duplicated. You are now editing the duplicated version of the form.", "new_form": { "id": 2, "workspace_id": 1, "slug": "550e8400-e29b-41d4-a716-446655440000", "title": "Copy of Contact Form", "description": "Get in touch with us", "visibility": "public", "properties": [ { "id": "name", "name": "Name", "type": "text", "required": true }, { "id": "email", "name": "Email", "type": "email", "required": true } ], "removed_properties": [], "theme": "default", "dark_mode": "auto", "color": "#3B82F6", "size": "md", "submitted_text": "Thank you for your message!", "share_url": "https://opnform.com/forms/550e8400-e29b-41d4-a716-446655440000", "created_at": "2024-01-22T10:15:00Z", "updated_at": "2024-01-22T10:15:00Z" } }
removed_properties