Region: Global
Language: EN
Recent additions:
Discover pronunciations:

Because application developers are a diverse bunch, we've set up a number of ways to use Cofactor Web functions programmatically.

Cofactor Web function APIs

You can access the REST/HTTP interfaces of Cofactor Web functions directly from your applications.

The Cofactor Web function APIs are RESTful APIs located at

The Cofactor API speaks exclusively in JSON. When carrying body data, POST requests can only include JSON payloads. You should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by Web functions.


Cofactor Web functions use keys for authentication/authorization. A key is a token that your application needs to provide when making HTTP requests.

There are three ways you can provide the key with your requests:

  1. Include the key in the query string. The key is sent as a value of the key query parameter. This works for both GET and POST requests:
  2. Include the key in the JSON payload of POST requests. The key is sent as a value of the key field of the JSON payload and is sent in the body of the request.
  3. Use the X-Cofactor-Key HTTP header. Add the X-Cofactor-Key header with the value of the key. This works for both GET and POST requests.
    X-Cofactor-Key YOUR_KEY
    X-Cofactor-Key YOUR_KEY

The keys are supposed to be kept secret. Key-based authentication is only considered secure if used together with HTTPS/SSL.

Long-running jobs and polling

Some Web functions may take several minutes to run.They initially respond with the 202 status code and the job ID.

Polling is the mechanism that allows you to check the status of the long-running job using the following URL:

Auckland · New Zealand
© 2019 Cofactor Ltd.