Callback Methods

When you submit new transcription requests to the API, you may opt to receive callbacks with the transcription is completed. These transcriptions can come back to you in the following different methods:

Regardless of the method used, the following parameters will always be returned in the response in the manner described in each of the callback response sections:

We advise that you don't completely rely on callback URLs for receiving transcription results. In the event that your callback server has a connectivity issue, you will never receive the result. We recommend using both a callback URL, and also periodically polling the job.status command for incomplete jobs.

HTTPPOST

Sends POST data to the URL of your choice. Specify the URL you would like the data to be posted to in the callbackdest field when submitting your job. The return parameters will be submitted to the callbackdest as POST parameters. The following is an example of the HTTP response you should expect:

        
            POST /callback.php HTTP/1.1
            Host: www.example.com
            Content-Type: application/x-www-form-urlencoded

            job_id=12345&result=This is the transcription&metadata=Your submitted metadata&datetime_submitted=2012-12-01 01:23:45&datetime_completed=2012-12-01 01:26:45
        
    

RESTPOST

Sends a POST request to the URL of your choice with a JSON-encoded body containing the data. Specify the URL you would like the data to be posted to in the callbackdest field when submitting your job. The return parameters will be submitted to the callbackdest in the body of the request as a JSON object. The following is an example of the HTTP response you should expect.

        
            POST /callback.php HTTP/1.1
            Host: www.example.com
            Content-Type: application/json

            {
            "job_id": "12345",
            "result": "This is the transcription",
            "metadata": "Your submitted metadata",
            "datetime_submitted": "2012-12-01 01:23:45",
            "datetime_completed": "2012-12-01 01:26:45"
            }
        
    

XMLRPC (deprecated)

Sends an XMLRPC request to the URL of your choice. The request body will contain the return parameters listed above.