REST API V3 / Emails / Get
URL
GET /wp-json/gh/v3/emails
Method
This endpoint supports the GET
method.
Request
You can pass the search string to get SMS with that string.
PARAM | TYPE | REQUIRED | DESCRIPTION |
search |
string | no | String to search in email. |
q |
string | no | String to search in email. |
select |
bool | no | Returns select formate data. |
select2 |
bool | no | Returns select2 formate data. |
Example
Here is the full example of the URI with the query string. If a query argument is not present in the URI it will return all the emails.
http://yoursite.com/wp-json/gh/v3/emails?q=hype
Response
If the email is found then you will receive a 200 OK response with the email detail. An example response is below.
{ "emails": [ { "ID": "9", "content": "<div class=\"row\" style=\"\"> HTML CODE with the key word HYPE </div>\r\n", "subject": "Excitement Generator", "pre_header": "", "from_user": "1", "author": "1", "status": "draft", "last_updated": "2019-03-22 16:46:34", "date_created": "2019-03-22 16:46:34", "is_template": "0" } ], "status": "success" }