Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

Check the list of available endpoints and methods to work with sending policies using the Delivery methods API:

Endpoints and methods

Description

GET /policies see below

Lists the available sending policies in the domain.

GET /policy/{id} see below

Gets a detailed description of a specific sending policy.

Endpoints and methods

GET /policies

Retrieves a list of the sending policies in the domain.

 Request

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.

curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api.us.devo.com/delco/policies"
 Response

Check the list of available responses:

Code

Description

200

Successful response. Available sending policies retrieved.

[
  {
    "id": 284,
    "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"
    }
  },
  {
    "id": 1275,
    "name": "mySendingPolicy",
    "isDefault": false,
    "scheduled": {
      "days": [
        "TUESDAY",
        "THURSDAY"
      ],
      "from": "09:30",
      "to": "18:30"
    },
    "deliveryMethods": [
      {
        "id": 331,
        "type": "email",
        "name": "default-email"
      }
    ],
    "antiFloodingPolicy": {
      "id": 267,
      "name": "default AF"
    }
  },
  {
    "id": 467,
    "name": "Workweek - Support Hours",
    "isDefault": false,
    "scheduled": {
      "days": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY"
      ],
      "from": "08:00",
      "to": "20:00"
    },
    "deliveryMethods": [
      {
        "id": 331,
        "type": "email",
        "name": "default-email"
      }
    ],
    "antiFloodingPolicy": null
  }
]

400

Request error.

{
  "code": 400,
  "msg": "string",
  "cid": "string"
}

403

Authentication required.

{
  "code": 403,
  "msg": "string",
  "cid": "string"
}

GET /policies/{id}

Gets a detailed description of a specific sending policy given its ID.

 Request

Path parameters

Add the following path parameters as part of the endpoint:

Parameter

Type

Definition

id required

integer

ID of the delivery method you want to retrieve.

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.

curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api.us.devo.com/delco/policies/123"
 Response

Check the list of available responses:

Code

Description

200

Successful response. Details of the sending policy retrieved.

{
  "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": 400,
  "msg": "string",
  "cid": "string"
}

403

Authentication required.

{
  "code": 403,
  "msg": "string",
  "cid": "string"
}
  • No labels