For most integrations, we recommend using the Resolve endpoint. This endpoint is optimized for speed and is intended for situations where you simply need to retrieve the translated version of a URL.If a translation exists, the translated URL is returned. If no translation can be found, the original URL is returned unchanged.When translating multiple URLs at once, use the Resolve Bulk endpoint to reduce the number of API requests and improve performance.
The Create endpoint is intended for integrations that need to generate and store new URL translations in Clonable.Use this endpoint only when you explicitly want to create new translations or manage URL translations programmatically. If you only need to retrieve existing translations, the Resolve endpoint is the preferred option.Keep in mind that creating URL translations through the API may affect or override translations that would otherwise be managed automatically by Clonable.For creating or retrieving translations for multiple URLs, use the Create Bulk endpoint. The bulk endpoints are optimized for larger workloads and preserve the order of the supplied URLs in the response.
The Clonable API can be called directly from JavaScript applications hosted on any domain. Cross-origin requests support:
Methods: GET, POST, and OPTIONS
Request headers: Authorization, Content-Type, Accept, and X-Requested-With
Exposed response headers: Content-Length
Preflight caching for up to 12 hours Protected endpoints still require a bearer token in the Authorization header:
Do not expose your API key
The public Resolve endpoints can be called directly from a browser. For protected endpoints, send requests through your own backend.The following example is intended for trusted server-side JavaScript only:
Cookie-based credentials are not supported. Do not set credentials: "include" when making cross-origin requests. Bearer tokens sent through the Authorization header are supported.CORS controls browser access only; it does not replace authentication or authorization.