Методы API
DEVELOPER PLATFORM · v1

API, с которым удобно работать

CRM, кампании, аналитика и интеграции. Точные контракты, понятные примеры и подписанные вебхуки.

Скачать OpenAPI

Private preview: API доступен с проектным ключом. Публичные SLA и сроки поддержки ещё не установлены.

GET

Каталог Campaign

/api/v1/developer/campaigns

Возвращает проектно-привязанную страницу Campaign с lifecycle/schedule facts; без project, actor, audience, template, sender channel или fallback-route identifiers.

Право доступаcampaigns.read

Authorization: Bearer YOUR_PROJECT_TOKEN

Параметры

limitнеобязательно · query

integerminimum: 1 · maximum: 100 · default: 50

JSON Schema
{
  "type": "integer",
  "minimum": 1,
  "maximum": 100,
  "default": 50
}
cursorнеобязательно · query

stringminLength: 1 · maxLength: 4096

JSON Schema
{
  "type": "string",
  "minLength": 1,
  "maxLength": 4096
}

Примеры запроса

curl --request GET   'https://YOUR_NOVA_HOST/api/v1/developer/campaigns?limit=50'   --header 'Authorization: Bearer YOUR_PROJECT_TOKEN'

Ответы

200 Paginated minimized Campaign directory
application/json

object

campaignsобязательно
arraymaxItems: 100
Вложенная схема

arraymaxItems: 100

object

idобязательно
stringminLength: 1 · maxLength: 160
nameобязательно
stringminLength: 1 · maxLength: 160
statusобязательно
stringenum: ["draft","scheduled","sending","paused","completed","cancelled"]
scheduledForобязательно
string | nullformat: "date-time"
scheduleTimezoneобязательно
string | nullminLength: 1 · maxLength: 100
scheduleLocalDateTimeобязательно
string | nullpattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
sendsPerMinuteобязательно
integer | nullexclusiveMinimum: 0
startedAtобязательно
string | nullformat: "date-time"
pausedAtобязательно
string | nullformat: "date-time"
completedAtобязательно
string | nullformat: "date-time"
cancelledAtобязательно
string | nullformat: "date-time"
versionобязательно
integerexclusiveMinimum: 0
createdAtобязательно
stringformat: "date-time"
updatedAtобязательно
stringformat: "date-time"
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "scheduled",
        "sending",
        "paused",
        "completed",
        "cancelled"
      ]
    },
    "scheduledFor": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "scheduleTimezone": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 100
    },
    "scheduleLocalDateTime": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
    },
    "sendsPerMinute": {
      "type": [
        "integer",
        "null"
      ],
      "exclusiveMinimum": 0
    },
    "startedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "pausedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "cancelledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "version": {
      "type": "integer",
      "exclusiveMinimum": 0
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "name",
    "status",
    "scheduledFor",
    "scheduleTimezone",
    "scheduleLocalDateTime",
    "sendsPerMinute",
    "startedAt",
    "pausedAt",
    "completedAt",
    "cancelledAt",
    "version",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false
}
JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160
      },
      "status": {
        "type": "string",
        "enum": [
          "draft",
          "scheduled",
          "sending",
          "paused",
          "completed",
          "cancelled"
        ]
      },
      "scheduledFor": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "scheduleTimezone": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1,
        "maxLength": 100
      },
      "scheduleLocalDateTime": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
      },
      "sendsPerMinute": {
        "type": [
          "integer",
          "null"
        ],
        "exclusiveMinimum": 0
      },
      "startedAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "pausedAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "completedAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "cancelledAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "version": {
        "type": "integer",
        "exclusiveMinimum": 0
      },
      "createdAt": {
        "type": "string",
        "format": "date-time"
      },
      "updatedAt": {
        "type": "string",
        "format": "date-time"
      }
    },
    "required": [
      "id",
      "name",
      "status",
      "scheduledFor",
      "scheduleTimezone",
      "scheduleLocalDateTime",
      "sendsPerMinute",
      "startedAt",
      "pausedAt",
      "completedAt",
      "cancelledAt",
      "version",
      "createdAt",
      "updatedAt"
    ],
    "additionalProperties": false
  },
  "maxItems": 100
}
nextCursorобязательно
string | nullmaxLength: 4096
JSON Schema
{
  "type": "object",
  "properties": {
    "campaigns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "sending",
              "paused",
              "completed",
              "cancelled"
            ]
          },
          "scheduledFor": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scheduleTimezone": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 100
          },
          "scheduleLocalDateTime": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
          },
          "sendsPerMinute": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pausedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "scheduledFor",
          "scheduleTimezone",
          "scheduleLocalDateTime",
          "sendsPerMinute",
          "startedAt",
          "pausedAt",
          "completedAt",
          "cancelledAt",
          "version",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "maxItems": 100
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 4096
    }
  },
  "required": [
    "campaigns",
    "nextCursor"
  ],
  "additionalProperties": false,
  "$ref": "#/components/schemas/DeveloperCampaignPageResponse"
}
400 Invalid Campaign page
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
401 Invalid developer credential
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
403 Campaign directory unavailable
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
429 Developer API rate limit exceeded
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
503 Developer API rate limiter unavailable
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}