How to pass data to a REST API Request?

Hello there!

I am trying to leverage the REST API plugin to make a request based on certain data. I found the Properties section in the Advanced section of a POST request. How can I reference the property in the Data being sent to the API?

Thanks!

1 Like

Our REST API works very similar to Postman, so you can send headers, body and all kinds of stuff to manipulate what you are getting.

Are you using some popular API, so I can research it a bit, like WordPress or something? If you can give me URL to your api would be great

@Studio350

Properties you create in REST API are being shown in builder when choosing source.

So best use case for this is for example Search, Limit, Page, etc things you want to be able to dynamically manipulate.

Once you’ve created few properties, you should then configure them either in Params, Body and Headers (depending on the API you are referring to).

Use $properties variable with ->get(‘KEY_HERE’) function.

2 Likes

Wow!

I am so sorry I missed this a couple of months ago…

Here is a quick example: What are SendFox's API Endpoints? - SendFox FAQ

I would like to use the POST /contacts endpoint to sign up someone to my list.

Let’s keep it super simple and say I just have a form with 1 field - email and a button to fire off the API request.

It would be super helpful to see I can get that done in Divhunt.

Thanks!