Tools Blog Learn Quizzes Smile API Log In / Sign Up
Tools Blog Learn Quizzes Smile API Log In / Sign Up
We have updated our privacy policy to let you know that we use cookies to personalise content and ads. We also use cookies to analyse our traffic and we share information about your use of our site and application with our advertising and analytics partners. By using this website or our application you agree to our use of cookies. Learn more about the way this website uses cookies or remove this message.

Codepunker API Docs

Clone on Github GitHub Build Passed
Getting Started :: Uglify Tool :: Sitemap Generator :: String Converter

End Point

By default all requests should be sent to:


If you want to access one of the API end points I manage you'll need a valid API key. To generate one, register or . You'll find your API key in the profile menu after you've authenticated.

Token Generation

Once you've got a valid API key, you have to generate a token which will be used to authenticate you for future requests. Tokens are only valid for 24 hours. To generate the token send a POST request with the parameters below:

                    execute [type]: string [value]:authorizeAPI
                    key [type]: string [value]:YOUR_API_KEY
                    rand [type]: string [value]: a random 32 characters long alphanumeric string1
                    RESPONSE EXAMPLE:
                    {"type":"success", "response":"i_am_a_32_characters_token"} or 
                    {"type":"error", "response":"i_am_an_error_message"}
                    1 [The random string is required for tasks that use a callback URL]

API End Points:

  • UglifyIt

    Description: Uglifies/minifies your JavaScript and CSS code. Compiles LESS and SASS into CSS and minifies it.


                Send a POST request with the following parameters:
                    1: "urlcode" [array] (an array of valid URLs**)
                       "pastedcode" [string] (the JavaScript/CSS/LESS/SASS code)
                    2: "language" [string] (values: JavaScript/CSS/LESS/SASS 1)
                    4: "execute" [string] (value: executeUglify)
                    5: "token" [string] (the apiToken you generated at step1)
                    1[langauge name is case sensitive]
                    2[If your css pre-processor has dependencies from other files make sure you URLs are ordered correctly]

  • SiteMap Generator

    Description: Crawls your website pages and generates an XML Sitemap containing all your internal links.


                --- STEP 1 ---
                    * REQUEST PARAMS: 
                        1. "execute" [type]: string [value]:executeSitemapGenerator
                        2. "domain" [type]: string [value]: the domain for which you want to generate the sitemap
                        3. "freq" [type]:string [value]: valid frequency keywords are: always, 'hourly', 'daily', 'weekly', 'monthly', 'yearly' or 'never'
                        4. "token" [type]: string [value]: the token you received as a response after the first request
                        5. "callbackuri" [type]: string [value]: a valid url that I should notify that the sitemap is ready for download
                        RESPONSE EXAMPLE:
                        [example]: {"type":"success", "response":"the current status of your request"} or {"type":"error", "response":"an error message"}
                --- STEP 2 ---
                    * Your callback url should be able to receive a request from "" once the site-map generation is done. will send the following json encoded string through a POST request to
                        1. "data" [type]: string [value]: 
                                {"type": "success", "response": ""} or
                                {"type":"error", "response":"an error message"}
                        2. rand [type]: string [value]: 
                                the random 32 characters alphanumeric string you sent in your first request will be sent back to you to confirm that the request is a valid one.

  • String Converter

    Description: Convert, encode and hash strings to almost anything you can think of.


                Send a POST request with the following parameters:
                    1: "string"  [string] (the string you are trying to work with) - required
                    2. "method"  [string] ("encode", "decode" or "hash1") - required
                    3: "token" [string] (the apiToken you generated at step1)
                    4. "execute" [string] (value: executeStringConversion) - required
                    1 Full list of hashing algorithms: ["md2", "md4", "md5", - "sha1", "sha256", "sha384", "sha512", - "ripemd128", "ripemd160", "ripemd256", "ripemd320", - "whirlpool", - "tiger128,3", "tiger160,3", "tiger192,3", "tiger128,4", "tiger160,4", "tiger192,4", - "snefru", - "gost", - "adler32", - "crc32", "crc32b", - "haval128,3", "haval160,3", "haval192,3", "haval224,3", "haval256,3", "haval128,4", "haval160,4", "haval192,4", "haval224,4", "haval256,4", "haval128,5", "haval160,5", "haval192,5", "haval224,5", "haval256,5"]


2017-05-23 - The zend_string_extend function in Zend/zend_string.h in PHP through 7.1.5 does not prevent changes to string objects that result in a negative length, which allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact by leveraging a script's use of .= with a long string. Read more ...
2017-02-16 - The bcpowmod function in ext/bcmath/bcmath.c in PHP before 5.5.35, 5.6.x before 5.6.21, and 7.x before 7.0.6 accepts a negative integer for the scale argument, which allows remote attackers to cause a denial of service or possibly have unspecified other impact via a crafted call. Read more ...

See All Entries...