What type of API does Duda provide?
Based on the search results, Duda uses a REST API. The key points are:
-
Duda's Partner API is organized around REST. The API has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
-
Duda's API uses basic HTTP authentication to authenticate requests. Requests require an Authorization header with a base64 encoded username and password.
-
The API is only available over HTTPS and requires TLS v1.2 or higher for security.
-
Duda's primary API endpoint is https://api.duda.co/api
.
-
The API follows REST principles like being stateless, resource-based, having a uniform interface, and being cacheable.
-
It uses standard HTTP methods like GET, POST, PUT, DELETE for interacting with resources.
In summary, Duda provides a RESTful API that follows standard REST architectural principles and uses HTTP/HTTPS protocols. It is not a SOAP, GraphQL or RPC-style API.
Does the Duda API have webhooks?
Yes, the official Duda API does have webhooks. Here are the key points about Duda's webhook functionality:
Available Webhook Events
Duda offers several types of webhook events that you can subscribe to:
- PUBLISH - Triggered when a site is published
- SITE_CREATED - Triggered when a new site is created
- CERTIFICATE_CREATED - Triggered when an SSL certificate is generated for a site
- UNPUBLISH - Triggered when a site is unpublished
- DOMAIN_UPDATED - Triggered when a site's domain is updated
- CONTENT_LIB_CHANGED - Triggered when the content library is changed
- CONTENT_LIB_PUBLISHED - Triggered when the content library is published
Registering for Webhooks
To register for webhooks, you need to configure them in your App Manifest:
{
"webhooks": {
"endpoint": "https://your-endpoint.com/webhook",
"events": [
"PUBLISH",
"SITE_CREATED",
"DOMAIN_UPDATED"
]
}
}
Key Considerations
- Webhooks are limited based on the scopes assigned to your app.
- Updating webhooks in the manifest will not affect existing installations - you may need to reinstall the app.
- Webhook events provide detailed information about the action that occurred, including timestamps, site details, and the source of the action.
Webhook Configuration
For managed accounts, Duda needs to configure webhooks on their end:
- You need to provide a secure (HTTPS) endpoint to receive webhooks.
- You must specify which webhook events you want to receive.
- Webhook configuration requires submitting a request to Duda's support team.
Best Practices
- Implement proper authentication for your webhook endpoint to ensure security.
- Handle rate limits appropriately, as Duda has both global and endpoint-specific rate limits.
- Process webhook events asynchronously to avoid blocking your application.
In summary, Duda's API offers a robust webhook system that allows you to stay synchronized with various events occurring on the Duda platform, enabling real-time updates and integrations for your applications.
Rate Limits and other limitations
Here are the key points about the API Rate Limits of the Duda API:
Global Rate Limit
- There is a hard global limit of 10 API calls per second across all endpoints.
- Duda recommends limiting requests to one every 125ms (8 per second) to avoid hitting this limit.
Endpoint-Specific Rate Limits
- Publish Site and Unpublish Site: 20 calls per minute
- Create Site: 60 calls per minute
- Create Account: 60 calls per minute
- Refresh Collection Data by External ID: 1 call every 15 minutes
- Get Contact Form Submissions: 800 calls per minute
- Analytics: 60 calls per minute
- Form Submissions: 300 calls per minute
Rate Limit Response
- Duda will respond with a 429 Too Many Requests status code if you hit the rate limit.
Best Practices
- For batch processes, limit requests to 8 per second to stay under the global limit.
- Monitor the rate limit headers returned with each API response to track your usage.
- Use batching capabilities where available to reduce the number of API calls needed.
Key Considerations
- Rate limits are enforced to maintain performance and stability for all customers.
- Limits may be increased upon request for some endpoints - contact Duda support if you need higher limits.
- Use the rate limit response headers to build in rate limiting logic to your integration.
By following these rate limits and best practices, you can build a robust integration with the Duda API while avoiding throttling issues. Let me know if you need any clarification or have additional questions!
Latest API Version
Based on the search results provided, I could not find a specific mention of the most recent version of the Duda API. The search results contain general information about the Duda API, its features, and recent updates, but do not specify a version number.
Here are the key points to consider:
-
The Duda API is organized around REST and uses HTTPS for secure communication [1].
-
Authentication is done using basic HTTP authentication with a username and password specific to your account [1].
-
The primary path for all production API endpoints is: https://api.duda.co/api
[1].
-
There have been recent updates to the API, including new features and improvements, but no specific version number is mentioned [2].
-
The API documentation includes information on various endpoints for managing sites, content, collections, and eCommerce functionality [4].
While I cannot provide the most recent version number, it's clear that Duda regularly updates their API with new features and improvements. To get the most up-to-date information on the API version, you may want to:
- Check the official Duda developer documentation for any version information.
- Contact Duda support directly for the most accurate and current version information.
- Look for any changelog or release notes on the Duda developer portal.
It's worth noting that many APIs, especially those that are continuously updated, may not have traditional version numbers and instead rely on ongoing improvements and additions to their functionality.
How to get a Duda developer account and API Keys?
To get a developer account for Duda and create an API integration, here are the key steps:
1. Sign up for a Duda account
- Go to the Duda website and create an account or log in if you already have one.
2. Upgrade to a Custom plan
- API access is only granted to users on a paid custom plan.
- You'll need to apply for a custom pricing offer by filling out an online form.
3. Access API credentials
- Once approved for API access, log into your Duda dashboard.
- Go to Business Tools > API Access section.
- Here you can find your API username and password.
4. Review API documentation
- Duda provides a Developer Portal with extensive documentation on using their API.
- Review the API reference and guides to understand how to integrate it.
5. Develop your integration
- Use the API credentials and documentation to develop your custom integration.
- You can create websites, manage content, handle domains, etc. via the API.
What can you do with the Duda API?
Here's the markdown text with the trailing list of URLs and citation references removed, and any URLs inside the content formatted correctly for the markdown file format:
Here's a list of data models you can interact with using the Duda API, along with what is possible for each:
Sites
- Create new sites
- Update existing sites
- Delete sites
- Publish and unpublish sites
- Get site details
- Manage site content and structure
Accounts
- Create new accounts
- Update account information
- Delete accounts
- Manage account permissions and access
Content Library
- Get content library data
- Update content library
- Publish content library changes
- Manage locations (create, update, delete)
- Manage injected content
Collections
- List collections
- Get collection details
- Create new collections
- Update existing collections
- Delete collections
- Refresh collection data
eCommerce
- Manage products (list, create, update, delete)
- Manage product variations
- Manage product options and choices
- Manage orders (list, get details, update)
- Manage refunds
- Manage payment gateways
- Manage categories
- Manage shipping providers
- Manage custom fields
Navigation
- List navigation items
- Get navigation by language
- Create navigation items
- Update navigation items
URL Rules
- List URL rules
- Get rule details
- Create new rules
- Update existing rules
- Delete rules
Site Plans
- List site plans
- Get site plan details
- Update site plans
Authentication
- Generate SSO links
- Create password reset links
- Create welcome links
Permissions
- Manage client permissions
- Manage team permissions and groups
Simple Editor
- Update Simple Editor settings
This list covers the main data models and operations available through the Duda API. Each model allows for various interactions and management capabilities, enabling developers to integrate Duda's functionality into their own workflows and applications.