With this API, you can view, add, edit, and delete variables in a project.
Reading.
Allows you to view the created variables in the project.
GET https://api.smartsender.com/v1/variables
Main parameters:
Name | Description | Validation |
---|---|---|
limitation | Amount of data to display per page | Minimum value 1, maximum 20 |
page | Requested Page | Minimum value 1 |
term | String to search |
|
In case of a successful response, you will receive the following:
{ "cursor": Cursor, "collection": Variable[] }
Answer description:
Creation.
Allows you to create a new variable in the project.
POST https://api.smartsender.com/v1/variables
Main parameters:
Name | Description | Validation |
---|---|---|
name | Name | Unique within the project |
type | Type | Available
|
description | Description | Available |
values | Choices separated by commas | Обязательно если тип enum |
If successful, get the created Variable object.
Update.
Allows you to update an existing variable.
PUT https://api.smartsender.com/v1/variables/{variableId}
Main parameters:
Name | Description |
---|---|
name | Name |
description | Description |
In case of a successful response, you will receive the following:
{ "state": true }
Deletion.
Allows you to delete an existing variable.
DELETE https://api.smartsender.com/v1/variables/{variableId}
In case of a successful response, you will receive the following:
{ "state": true }