API Tools, Re-writer Documentation, Spinner Text, Reword Article

POST requests to send to api.rewriter.tools


Send a task to rewrite text


Param: token - your token that you get in the control panel;

Param: text - your text to be unique;

Param: lang - the language in which your text is written;

Add. param: unique - check uniqueness (default as configured in profile true/false);

Add. param: double - double rewrite (default as configured in profile true/false);

Add. param: webhook - URL address (POST request with result will be sent to this URL).

If you successfully accept the text in the task, you will receive a unique ID.

    {
        "status": "success",
        "result": {
            "id": "00fd4b4549a1094aae926ef62e9dbd3cdcc2e456",
            "token": "8aee7ab77891731083d21b853d6ef12ca044beff"
        }
    }

For this ID in the next query, get the result of the rewrite of your text. If the request contains the webhook parameter, the result will be sent automatically, as soon as it is ready, to the specified URL (for example: https://example.com/webhook) in the form of JSON.


Getting the result of rewriting the text


Param: id - ID of the text you want to receive;

Param: token - your token that you get in the control panel.

If your rewrite is ready, you will receive a JSON result.

    {
        "status": "success",
        "result": {
            "id": "00fd4b4549a1094aae926ef62e9dbd3cdcc2e456",
            "percent": 43.02,
            "words": 2034,
            "spam": 20,
            "water": 34,
            "rewrite": "Your rewrite",
            "chars": 100000,
            "double": false,
            "unique": true
        }
    }

If your text is still being processed, the result will be an error with code 101.

    {
        "status": "error",
        "error": {
            "code": 101,
            "msg": "Your rewrite is not ready yet"
        }
    }

List of possible errors when working with API


101 - Your rewrite is not ready yet

102 - Please fill in the «token» field

103 - Please fill in the «lang» field

104 - Please fill in the «text» field

105 - The «text» field must consist of letters of the English alphabet

106 - The «text» field must be 100 characters long

107 - In the «text» field you have gone beyond the limit

108 - User does not exist

109 - API is not activated


A simple example on NodeJS


Install package sinoni

    npm i sinoni
    const sinoni = require('sinoni');
    sinoni({
        token: "8aee7ab77891731083d21b853d6ef12ca044beff",
        text: "Your article",
        lang: "en"
    }).then(res => {
        console.log(res.rewrite); // Your rewrite
    }).catch(console.error);