- Now scroll down to the Create Snippet.
- Enter an endpoint title in the Create Snippet field.
Note: Do not enter any Special Characters [!@#$%^&*_()+-=] into the title.
- Now, click on the Save Changes button.

- After saving the settings, REST API URL will be displayed under the Create Snippet field.

- Here, you have to use the following URI parameters and replace the following parameters.
- {token} : replace with your 16 digit generated token.
- {snippet-title}: replace with a new title.
- {var}: use 0 for empty or enter comma separated values like, username,email etc.
- {shortcode} : use 1 for enable and 0 for disable.
- {php} : use 1 to make it php or 0 for empty.
- {wptexturize} : use 1 to enable wptexturize or 0 to disable.
- {snippet-code} : write simple/plain text, HTML, PHP etc.
- {snippet-description} : enter a short description for your snippet.
- After replacing the parameters with new URI parameters, the URL will look like this:
- https://wordpress-444586-2318562.cloudwaysapps.com/wp-json/post-snippets/restapiSnippet/A2DjNM62Igvkr4AM/newSnippet/fname,lname/0/1/0/snippet?snippet_code=$fname = {fname}; $lname = {lname}; echo $fname; echo $lname;&description=this is the rest api snippet
- Now, go to your browser search tab and paste the URI.
- Or go to the Postman, paste the URI in the Enter request URL tab.
- Click on the Send button.
- Your response result will be successful.

- Your Snippet will be successfully created.
- Go to the All Snippets section to check your newly created snippet.

- Open your newly created snippet.
