API Documentation

Documentation for interacting with the cogmint.com API

Add Task

POST https://www.cogmint.com/api/v1/projects/add_task

This endpoint allows you to add new tasks to a given project. It expects you to provide the necessary parameters to create a new task under the specified project, and will post it immediately. We recommend setting up projects using www.cogmint.com to create the task templates, set project settings (such as minimum number of responses per task and other defaults) and then sharing your project's UUID with the developers to add tasks programmatically.

Headers

Name
Type
Description

apikey

string

API Key for your account; available under your account settings.

Request Body

Name
Type
Description

task

string

A key-value representation of the task you wish to have created. Params: "required_submissions": The number of different workers you want to answer this question. Default is inherited from the project settings. "reward": The amount, in pennies, you're willing to offer each respondent for completing this task. Total cost for this task will be required_submissions * reward. You can cancel outstanding tasks per-project using the web UI. "callback_url": The URL to send completion event webhooks to. The webhook must be confirmed before we send any data to it. If we detect that this is a new webhook, we will attempt to confirm it before sending data. Example Task object: ```javascript { "required_submissions": 1, (optional, default is project default) "reward": 0, (optional, default: 0) "callback_url": "http://mywebsite.com/webhooks/cogmint", (optional) "substitutions": {"name": "George!", "occupation": "developer" } } ```

project_uuid

string

UUID of the project you wish to add a task to. Available at the bottom of the project page.

{
    "data": {
        "prompt": "Please confirm George is a developer.", 
        "task_uuid": "1234-123456-123456-1234", 
        "reward": 0, 
        "callback_url": "https://www.example.com/incomingwebhooks",
        "required_submissions": 3,
        "submission_count": 0, 
        "checked_out_at": null, 
        "allowed_completion_time_seconds": 3600 // default. 
        "external_image_url": null
        "submissions": []    
    }
}

Last updated

Was this helpful?