Table of Contents |
---|
minLevel | 2 |
---|
maxLevel | 2 |
---|
outline | false |
---|
type | flat |
---|
separator | brackets |
---|
printable | true |
---|
|
Overview
Check the list of available endpoints and methods to work with sending policies using the Delivery methods API:
...
Endpoints and methods
...
Description
...
/policies
see below...
Lists the available sending policies in the domain.
...
/policy/{id}
see below...
Gets a detailed description of a specific sending policy.
Endpoints and methods
...
Retrieves a list of the sending policies in the domain.
Expand |
---|
|
ExampleFind below a request example in cURL language. This request will retrieve all the email type delivery methods in the domain that corresponds to the given token. Learn how to authorize your request in this article. Code Block |
---|
curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api.us.devo.com/delco/policies" |
|
...
Check the list of available responses:
...
Code
...
Description
...
200
Successful response. Available sending policies retrieved.
...
Table of Contents |
---|
minLevel | 2 |
---|
maxLevel | 2 |
---|
outline | false |
---|
type | flat |
---|
separator | brackets |
---|
printable | true |
---|
|
Overview
Check the list of available endpoints and methods to work with sending policies using the Delivery methods API:
Endpoints and methods | Description |
/policies see below | Lists the available sending policies in the domain. |
/policy/{id} see below | Gets a detailed description of a specific sending policy. |
/policies see below | Creates a new sending policy. |
/policies see below | Edits a sending policy. |
/policies/{id} see below | Deletes a sending policy. |
Endpoints and methods
GET/policies
Retrieves a list of the sending policies in the domain.
Expand |
---|
|
ExampleFind below a request example in cURL language. This request will retrieve all the email type delivery methods in the domain that corresponds to the given token. Learn how to authorize your request in this article. Code Block |
---|
curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api-us.devo.com/delco/policies" |
|
Expand |
---|
|
Check the list of available responses: Code | Description |
---|
200 | Successful response. Available sending policies retrieved. Code Block |
---|
[
{
"id": 284,
"name": "Workweek - Support Hoursdefault-delivery",
"isDefault": falsetrue,
"scheduled": {
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
],
"from": "0800:00",
"to": "2023:0059"
},
"deliveryMethods": [
{
"id": 331,
"type": "email",
"name": "default-email"
}
],
"antiFloodingPolicy": null{
} ] |
| 400 | Request error. Code Block |
---|
{ "codeid": 400267,
"msgname": "string",default AF"
}
"cid": "string"
} |
| 403 | Authentication required. Code Block |
---|
{ },
{
"codeid": 4031275,
"msgname": "stringmySendingPolicy",
"cidisDefault": "string"
} |
|
|
...
Gets a detailed description of a specific sending policy given its ID.
Expand |
---|
|
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Definition |
---|
id required
| integer
| ID of the sending policy you want to retrieve.
Note |
---|
How can I get the ID of a sending policy
You can use the GET/policies
endpoint to get the IDs of the sending policies defined in your domain.Example
Find below a request example in cURL language. This request will retrieve all the email type delivery methods in the domain that corresponds to the given token. Learn how to authorize your request in this article.
Code Block |
---|
curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api.us.devo.com/delco/policies/123" |
Expand |
---|
|
Check the list of available responses: Code | Description |
---|
200 | Successful response. Details of the sending policy retrieved. Code Block | {
"id": 123,
"name": "default-delivery",
"isDefault": true,
"scheduled": {
"days": [false,
"scheduled": {
"days": [
"TUESDAY",
"THURSDAY"
],
"from": "09:30",
"to": "18:30"
},
"deliveryMethods": [
{
"id": 331,
"type": "email",
"name": "default-email"
}
],
"antiFloodingPolicy": {
"id": 267,
" |
| MONDAY","TUESDAY"WEDNESDAY
THURSDAY, "FRIDAY
SATURDAY SUNDAY], from"00:00","to":23:59},"deliveryMethods":[{ id:331,"type":email",
"name": "default-email"
}
],
"antiFloodingPolicy": {
"id": 267,
"name": "default AF"
}
}THURSDAY",
"FRIDAY"
],
"from": "08:00",
"to": "20:00"
},
"deliveryMethods": [
{
"id": 331,
"type": "email",
"name": "default-email"
}
],
"antiFloodingPolicy": null
}
] |
| 400 | Request error. Code Block |
---|
{
"code": 400,
"msg": "string",
"cid": "string"
} |
| 403 | Authentication required. Code Block |
---|
{
"code": 403,
"msg": "string",
"cid": "string"
} |
|
|
GET/policy/{id}
Gets a detailed description of a specific sending policy given its ID.
Expand |
---|
|
Path parametersAdd the following path parameters as part of the endpoint: Parameter | Type | Definition |
---|
id required
| integer
| ID of the sending policy you want to retrieve. Note |
---|
How can I get the ID of a sending policy You can use the GET/policies endpoint to get the IDs of the sending policies defined in your domain. |
|
ExampleFind below a request example in cURL language. This request will retrieve all the email type delivery methods in the domain that corresponds to the given token. Learn how to authorize your request in this article. Code Block |
---|
curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api-us.devo.com/delco/policies/123" |
|
Expand |
---|
|
Check the list of available responses: Code | Description |
---|
200 | Successful response. Details of the sending policy retrieved. Code Block |
---|
{
"id": 123,
"name": "default-delivery",
"isDefault": true,
"scheduled": {
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
],
"from": "00:00",
"to": "23:59"
},
"deliveryMethods": [
{
"id": 331,
"type": "email",
"name": "default-email"
}
],
"antiFloodingPolicy": {
"id": 267,
"name": "default AF"
}
} |
| 400 | Request error. Code Block |
---|
{
"code": 400,
"msg": "string",
"cid": "string"
} |
| 403 | Authentication required. Code Block |
---|
{
"code": 403,
"msg": "string",
"cid": "string"
} |
|
|
POST/policies
Creates a new sending policy.
Expand |
---|
|
Request bodyYou must specify the updates you need to apply to the delivery method in the request body: Parameter | Type | Definition |
---|
name required
| string
| Name of the new sending policy. | deliveryMethods required
| object
| Recipient of the alert, which corresponds to a delivery method created in the domain. Define an object with the following parameters: Note |
---|
Note that both the delivery method type and name must exist in the corresponding domain. Otherwise, the request won’t work. |
Example Code Block |
---|
"deliveryMethods": [
"type": "email",
"name": "my-delivery-method"
] |
Visit Create and manage delivery methods to know more. | isDefault
| boolean
| If you set this to true , this policy will be automatically assigned to new alerts and predefined alerts that have not actively been assigned a sending policy. | antiFloodingPolicy
| | Frequency limit established for persistent alerts. You can choose between none, default, or one of your own creation. Visit Create and manage delivery methods to know more. | scheduled
| object
| Days and hours during which alerts should be distributed. The time zone defined in the delivery method(s) selected is used to calculate times. Define an object with the following parameters: Code Block |
---|
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
], |
Example Code Block |
---|
"scheduled": {
"days": [
"TUESDAY",
"THURSDAY"
],
"from": "00:00",
"to": "23:59"
}, |
|
|
Expand |
---|
|
Check the list of available responses: Code | Description |
---|
200 | Successful response. Sending policy created. Code Block |
---|
{
"id": 123,
"name": "default-delivery",
"isDefault": true,
"scheduled": {
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
],
"from": "00:00",
"to": "23:59"
},
"deliveryMethods": [
{
"id": 331,
"type": "email",
"name": "default-email"
}
],
"antiFloodingPolicy": {
"id": 267,
"name": "default AF"
}
} |
| 400 | Request error. Code Block |
---|
{
"code": 400,
"msg": "string",
"cid": "string"
} |
| 403 | Authentication required. Code Block |
---|
{
"code": 403,
"msg": "string",
"cid": "string"
} |
|
|
PUT/policies
Edits an existing sending policy.
Expand |
---|
|
Request bodyYou must specify the updates you need to apply to the delivery method in the request body: Parameter | Type | Definition |
---|
name required
| string
| Name of the new sending policy. | deliveryMethods required
| object
| Recipient of the alert, which corresponds to a delivery method created in the domain. Define an object with the following parameters: Note |
---|
Note that both the delivery method type and name must exist in the corresponding domain. Otherwise, the request won’t work. |
Example Code Block |
---|
"deliveryMethods": [
"type": "email",
"name": "my-delivery-method"
] |
Visit Create and manage delivery methods to know more. | isDefault
| boolean
| If you set this to true , this policy will be automatically assigned to new alerts and predefined alerts that have not actively been assigned a sending policy. | antiFloodingPolicy
| | Frequency limit established for persistent alerts. You can choose between none, default, or one of your own creation. Visit Create and manage delivery methods to know more. | scheduled
| object
| Days and hours during which alerts should be distributed. The time zone defined in the delivery method(s) selected is used to calculate times. Define an object with the following parameters: Code Block |
---|
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
], |
Example Code Block |
---|
"scheduled": {
"days": [
"TUESDAY",
"THURSDAY"
],
"from": "00:00",
"to": "23:59"
}, |
|
|
Expand |
---|
|
Check the list of available responses: Code | Description |
---|
200 | Successful response. Sending policy created. Code Block |
---|
{
"id": 123,
"name": "default-delivery",
"isDefault": true,
"scheduled": {
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
],
"from": "00:00",
"to": "23:59"
},
"deliveryMethods": [
{
"id": 331,
"type": "email",
"name": "default-email"
}
],
"antiFloodingPolicy": {
"id": 267,
"name": "default AF"
}
} |
| 400 | Request error. Code Block |
---|
{
"code": 400,
"msg": "string",
"cid": "string"
} |
| 403 | Authentication required. Code Block |
---|
{
"code": 403,
"msg": "string",
"cid": "string"
} |
|
|
DELETE/policies/{id}
Deletes a sending policy.
Expand |
---|
|
Path parametersAdd the following path parameters as part of the endpoint: Parameter | Type | Definition |
---|
id required
| integer
| ID of the sending policy you want to delete. Note |
---|
How can I get the ID of a sending policy You can use the GET/policies endpoint to get the IDs of the sending policies defined in your domain. |
|
ExampleFind below a request example in cURL language. This request will delete the sending policy with ID 123 in the domain that corresponds to the given token. Learn how to authorize your request in this article. Code Block |
---|
curl -H "standAloneToken:YOUR_TOKEN" -X DELETE "https://api-us.devo.com/delco/policies/123" |
|
Expand |
---|
|
Check the list of available responses: Code | Description |
---|
200 | Successful response. Sending policy deleted. | 400 | Request error. Code Block |
---|
{
"code": 400,
"msg": "string",
"cid": "string"
} |
| 403 | Authentication required. Code Block |
---|
{
"code": 403,
"msg": "string",
"cid": "string"
} |
|
|