1. Home
  2. Integration
  3. API
  4. API Documentation

API Documentation

The Crowd Content API is accessed by sending POST requests. An example usage of the API would be to use cURL and PHP, but you can use any language that has the ability to make POST requests.

Firstly to make operational requests you need to request a token. To do this you would format the following POST request. The parameters and action that you want needs to be formatted as valid JSON.

POST

Requests should be posted to.https://DOMAIN/request=

Request a Token

To request a TOKEN you do not need to pass an action as it will assume you are requesting access based on the type of account you are connecting with.

The response will be:

{  
   "message":"Token is already created.",
   "token":"e3990215af5fadae9cdb7868473c08014497a1af",
   "last_access":"1427737602"
}

Make a Request

Once you have the token you can now make an operational request. This would be formatted as follows.

{
"params":{
"whitelabel_id":"API_ID",
"whitelabel_key":"API_KEY",
"client_id":"CLIENT_ID",
"client_key":"CLIENT_KEY",
"token":"REQUESTED_TOKEN",
},
"action":"ACTION"
}

Response Types

Unfortunately, the Crowd Content API is not configured as a true RESTful however whenever an error occurs it will notify you.

If you make a request to an undefined action or there is a technical problem you will see this.

{  
   "error":"bad request"
}

If you make a request and fail to send the required parameters you will see the following, it will return the list of parameters that you missed.

{
	"error":1,
	"message":"Missing parameters",
	"missing_params":[
	"category_id",
	"project_id",
	"processing_time",
	"min_word_count",
	"max_word_count",
	"title"
	]
}

Examples

You can download example wrappers below. Please note that these are intended for example usage only. Any code you run in a production environment needs to be secured and tested to your standards. Crowd Content does not accept responsibility for this code.

Example PHP Wrapper

Example Python Wrapper

Updated on March 6, 2020

Was this article helpful?

Leave a Comment