Docs
Integrate Code Examples
Integrate Code Examples
How to use the custom endpoint with code
Prerequisites
Before you start, ensure you have the following:
- programming language like JavaScript.
- Basic understanding of HTTP requests and responses.
Examples
The following examples are written in Javascript.
Note: Before we start, note that you don't need to include the Content-Type field in the headers. The data type of the body is automatically detected and sent with the request when there is a body.
1. Get data
- Use your Generated API Key and your new custom segment in your created API endpoint to start using the customized API responses.
2. Create New data
3. Update data
4. Delete data
Note:
https://mask.maskapi.dev/api/v1/users/
is the base URl for all of your requests.mask-api
header is used to authenticate your API requests.
Queries and Params
Suppose we want to filter or add parameters to the URL. Fortunately, Mask API supports filtering by taking the sent search parameters and adding them to your original URL.
Here's an example for that:
Next Step
- Explore Response builder data types configurations in the Response builder.