Skip to main content

Example Postman Call

Follow the steps below to send HTTP requests to your project’s API endpoint using Postman.

1. Download and install Postman

Download Postman and follow the https://learning.postman.com/docs/getting-started/installation-and-updates/.

2. Start a new request

Open Postman and start a new request by clicking HTTP Request.

postman-step2.png

(You may have to click the New button first.)

Type a name for your request and save it in a folder (also known as a collection).

3. Change the request type to POST

Change the request type from GET to POST.

postman-step3.png

4. Insert the URL for your project

Insert the URL for your project in the box next to POST.

postman-step4.png

This URL is generated when you publish your project.

To retrieve the URL after publishing, go to Publish > API > API endpoint.

5. Insert the Content-Type key in the header

Click the Headers tab and enter the following key and value:

KEY

VALUE

Content-Type

application/json;charset=UTF-8

postman-step5.png

6. Insert the Authorization key in the header

Still in the Headers tab, enter the following key and value:

KEY

VALUE

Authorization

bearer <your project's API key>

For VALUE, type "bearer" followed by a space, then paste in the project API Key.

postman-step6.png

7. In the Body tab, select binary

Click the Body tab and select the binary option.

postman-step7.png

8. In the Body tab, upload your request body file

Still in the Body tab, click the Select File button and select your request body file.

Once done, the file name is visible on the interface:

postman-step8.png

This step won't work unless you have converted your data to the correct format for an API call. For further detail, see:

9. Click the Send button

Click the Send button to generate a response.

postman-step9a.png

If the call to the API endpoint is successful, the HTML response status code is 200.

postman-step9b.png

For this example we posted a request body file to the endpoint for a "Describe the Table" project. The generated narrative text is included as the value for the result field within the response object. For details about the other fields in the object, see API responses.

Notice that the returned narrative text is in HTML format — for example, the <p> tag represents a paragraph break. To generate the output in plain text instead, set the contentOutputFormat property to TEXT in the request body file — see Request body options.

Unsuccessful calls to API

If the call to the API endpoint is unsuccessful, you get an HTML status code other than 200:

postman-step9c.png

If the error message is unclear (or there is no message), consult a resource such as Mozilla's HTTP response status codes.