Методы API
DEVELOPER PLATFORM · v1

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

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

Скачать OpenAPI

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

GET

Lifecycle Campaign

/api/v1/developer/campaigns/{campaignId}

Возвращает точные lifecycle/schedule facts и сохранённую preparation-конфигурацию Campaign. configurationReady означает наличие frozen audience и согласованной primary route; текущую доступность sender нужно сверять с отдельным каталогом. Snapshot/member, actor и tenant facts не раскрываются; отсутствующий и чужой id дают одинаковый 404.

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

Authorization: Bearer YOUR_PROJECT_TOKEN

Параметры

campaignIdобязательно · path

stringminLength: 1 · maxLength: 160

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

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

curl --request GET   'https://YOUR_NOVA_HOST/api/v1/developer/campaigns/CAMPAIGN_ID'   --header 'Authorization: Bearer YOUR_PROJECT_TOKEN'

Ответы

200 Minimized Campaign lifecycle detail
application/json

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"
preparationобязательно
object
Вложенная схема

object

audienceFrozenобязательно
boolean
templateобязательно
object | null
Вложенная схема

object | null

templateIdобязательно
stringminLength: 1 · maxLength: 160
versionобязательно
integerexclusiveMinimum: 0
channelTypeобязательно
stringminLength: 1 · maxLength: 100
localeобязательно
stringminLength: 1 · maxLength: 100
JSON Schema
{
  "type": [
    "object",
    "null"
  ],
  "properties": {
    "templateId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "version": {
      "type": "integer",
      "exclusiveMinimum": 0
    },
    "channelType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "locale": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "templateId",
    "version",
    "channelType",
    "locale"
  ],
  "additionalProperties": false
}
senderобязательно
object | null
Вложенная схема

object | null

channelIdобязательно
stringminLength: 1 · maxLength: 160
providerTypeобязательно
stringminLength: 1 · maxLength: 100
JSON Schema
{
  "type": [
    "object",
    "null"
  ],
  "properties": {
    "channelId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "providerType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "channelId",
    "providerType"
  ],
  "additionalProperties": false
}
fallbackRouteобязательно
object | null
Вложенная схема

object | null

templateобязательно
object
Вложенная схема

object

templateIdобязательно
stringminLength: 1 · maxLength: 160
versionобязательно
integerexclusiveMinimum: 0
channelTypeобязательно
stringminLength: 1 · maxLength: 100
localeобязательно
stringminLength: 1 · maxLength: 100
JSON Schema
{
  "type": "object",
  "properties": {
    "templateId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "version": {
      "type": "integer",
      "exclusiveMinimum": 0
    },
    "channelType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "locale": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "templateId",
    "version",
    "channelType",
    "locale"
  ],
  "additionalProperties": false
}
senderобязательно
object
Вложенная схема

object

channelIdобязательно
stringminLength: 1 · maxLength: 160
providerTypeобязательно
stringminLength: 1 · maxLength: 100
JSON Schema
{
  "type": "object",
  "properties": {
    "channelId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "providerType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "channelId",
    "providerType"
  ],
  "additionalProperties": false
}
JSON Schema
{
  "type": [
    "object",
    "null"
  ],
  "properties": {
    "template": {
      "type": "object",
      "properties": {
        "templateId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "channelType": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "locale": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      },
      "required": [
        "templateId",
        "version",
        "channelType",
        "locale"
      ],
      "additionalProperties": false
    },
    "sender": {
      "type": "object",
      "properties": {
        "channelId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "providerType": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      },
      "required": [
        "channelId",
        "providerType"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "template",
    "sender"
  ],
  "additionalProperties": false
}
configurationReadyобязательно
boolean
missingобязательно
arraymaxItems: 4
Вложенная схема

arraymaxItems: 4

stringenum: ["audience","template","sender","primary_route_mismatch"]

JSON Schema
{
  "type": "string",
  "enum": [
    "audience",
    "template",
    "sender",
    "primary_route_mismatch"
  ]
}
JSON Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "audience",
      "template",
      "sender",
      "primary_route_mismatch"
    ]
  },
  "maxItems": 4
}
JSON Schema
{
  "type": "object",
  "properties": {
    "audienceFrozen": {
      "type": "boolean"
    },
    "template": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "templateId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "channelType": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "locale": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      },
      "required": [
        "templateId",
        "version",
        "channelType",
        "locale"
      ],
      "additionalProperties": false
    },
    "sender": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "channelId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "providerType": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      },
      "required": [
        "channelId",
        "providerType"
      ],
      "additionalProperties": false
    },
    "fallbackRoute": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "template": {
          "type": "object",
          "properties": {
            "templateId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "version": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "channelType": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "locale": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "required": [
            "templateId",
            "version",
            "channelType",
            "locale"
          ],
          "additionalProperties": false
        },
        "sender": {
          "type": "object",
          "properties": {
            "channelId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "providerType": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "required": [
            "channelId",
            "providerType"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "template",
        "sender"
      ],
      "additionalProperties": false
    },
    "configurationReady": {
      "type": "boolean"
    },
    "missing": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "audience",
          "template",
          "sender",
          "primary_route_mismatch"
        ]
      },
      "maxItems": 4
    }
  },
  "required": [
    "audienceFrozen",
    "template",
    "sender",
    "fallbackRoute",
    "configurationReady",
    "missing"
  ],
  "additionalProperties": false
}
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"
    },
    "preparation": {
      "type": "object",
      "properties": {
        "audienceFrozen": {
          "type": "boolean"
        },
        "template": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "templateId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "version": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "channelType": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "locale": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "required": [
            "templateId",
            "version",
            "channelType",
            "locale"
          ],
          "additionalProperties": false
        },
        "sender": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "channelId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "providerType": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "required": [
            "channelId",
            "providerType"
          ],
          "additionalProperties": false
        },
        "fallbackRoute": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "template": {
              "type": "object",
              "properties": {
                "templateId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "channelType": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "locale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "templateId",
                "version",
                "channelType",
                "locale"
              ],
              "additionalProperties": false
            },
            "sender": {
              "type": "object",
              "properties": {
                "channelId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "providerType": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "channelId",
                "providerType"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "template",
            "sender"
          ],
          "additionalProperties": false
        },
        "configurationReady": {
          "type": "boolean"
        },
        "missing": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "audience",
              "template",
              "sender",
              "primary_route_mismatch"
            ]
          },
          "maxItems": 4
        }
      },
      "required": [
        "audienceFrozen",
        "template",
        "sender",
        "fallbackRoute",
        "configurationReady",
        "missing"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "name",
    "status",
    "scheduledFor",
    "scheduleTimezone",
    "scheduleLocalDateTime",
    "sendsPerMinute",
    "startedAt",
    "pausedAt",
    "completedAt",
    "cancelledAt",
    "version",
    "createdAt",
    "updatedAt",
    "preparation"
  ],
  "additionalProperties": false,
  "$ref": "#/components/schemas/DeveloperCampaignDetailResponse"
}
400 Invalid Campaign identifier
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"
  ]
}
404 Campaign not found
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"
  ]
}