Update Developer Campaign
/api/v1/developer/campaigns/{campaignId}Use the access scope below. The generated schemas specify the exact request and responses.
Access scopecampaigns.write
Authorization: Bearer YOUR_PROJECT_TOKEN
Parameters
campaignIdrequired · pathstringminLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160 }idempotency-keyrequired · headerstringpattern: "^[\\x21-\\x7E]+$" · minLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160, "pattern": "^[\\x21-\\x7E]+$" }
Request body
application/jsonunion
Variant 1
object
operationrequired- stringenum: ["rename"]
expectedVersionrequired- integerexclusiveMinimum: 0
namerequired- stringminLength: 1 · maxLength: 160
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"rename"
]
},
"expectedVersion": {
"type": "integer",
"exclusiveMinimum": 0
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"expectedVersion",
"name"
],
"additionalProperties": false
}Variant 2
object
operationrequired- stringenum: ["delete"]
expectedVersionrequired- integerexclusiveMinimum: 0
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"delete"
]
},
"expectedVersion": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"required": [
"operation",
"expectedVersion"
],
"additionalProperties": false
}Variant 3
object
operationrequired- stringenum: ["bind_template"]
templateIdrequired- stringminLength: 1 · maxLength: 160
templateVersionrequired- integerexclusiveMinimum: 0
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"bind_template"
]
},
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"required": [
"operation",
"templateId",
"templateVersion"
],
"additionalProperties": false
}Variant 4
object
operationrequired- stringenum: ["bind_sender"]
channelIdrequired- stringminLength: 1 · maxLength: 160
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"bind_sender"
]
},
"channelId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"channelId"
],
"additionalProperties": false
}Variant 5
object
operationrequired- stringenum: ["set_primary_route"]
templateIdrequired- stringminLength: 1 · maxLength: 160
templateVersionrequired- integerexclusiveMinimum: 0
channelIdrequired- stringminLength: 1 · maxLength: 160
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"set_primary_route"
]
},
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0
},
"channelId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"templateId",
"templateVersion",
"channelId"
],
"additionalProperties": false
}Variant 6
object
operationrequired- stringenum: ["set_fallback_route"]
templateIdrequired- stringminLength: 1 · maxLength: 160
templateVersionrequired- integerexclusiveMinimum: 0
channelIdrequired- stringminLength: 1 · maxLength: 160
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"set_fallback_route"
]
},
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0
},
"channelId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"templateId",
"templateVersion",
"channelId"
],
"additionalProperties": false
}Variant 7
object
operationrequired- stringenum: ["remove_fallback_route"]
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"remove_fallback_route"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
}Variant 8
object
operationrequired- stringenum: ["freeze_audience"]
filterrequired- object
Nested schema
objectcontactStatusrequired- stringenum: ["active","archived","all"]
segmentId- string | nullminLength: 1 · maxLength: 160 · default: null
providerTypesrequired- arraymaxItems: 100
Nested schema
arraymaxItems: 100stringminLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160 }JSON Schema
{ "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100 } requiredTagsrequired- arraymaxItems: 100
Nested schema
arraymaxItems: 100stringminLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160 }JSON Schema
{ "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100 } stageIdsrequired- arraymaxItems: 100
Nested schema
arraymaxItems: 100stringminLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160 }JSON Schema
{ "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100 } loyaltyCardRequired- booleandefault: false
loyaltyLevelIds- arraymaxItems: 100 · default: []
Nested schema
arraymaxItems: 100 · default: []stringminLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160 }JSON Schema
{ "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100, "default": [] } minimumLoyaltyBalance- integer | nullminimum: 0 · maximum: 1000000000 · default: null
readyStampOfferIds- arraymaxItems: 100 · default: []
Nested schema
arraymaxItems: 100 · default: []stringminLength: 1 · maxLength: 160JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 160 }JSON Schema
{ "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100, "default": [] }
JSON Schema
{ "type": "object", "properties": { "contactStatus": { "type": "string", "enum": [ "active", "archived", "all" ] }, "segmentId": { "type": [ "string", "null" ], "minLength": 1, "maxLength": 160, "default": null }, "providerTypes": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100 }, "requiredTags": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100 }, "stageIds": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100 }, "loyaltyCardRequired": { "type": "boolean", "default": false }, "loyaltyLevelIds": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100, "default": [] }, "minimumLoyaltyBalance": { "type": [ "integer", "null" ], "minimum": 0, "maximum": 1000000000, "default": null }, "readyStampOfferIds": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 160 }, "maxItems": 100, "default": [] } }, "required": [ "contactStatus", "providerTypes", "requiredTags", "stageIds" ], "additionalProperties": false }
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"freeze_audience"
]
},
"filter": {
"type": "object",
"properties": {
"contactStatus": {
"type": "string",
"enum": [
"active",
"archived",
"all"
]
},
"segmentId": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 160,
"default": null
},
"providerTypes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100
},
"requiredTags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100
},
"stageIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100
},
"loyaltyCardRequired": {
"type": "boolean",
"default": false
},
"loyaltyLevelIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100,
"default": []
},
"minimumLoyaltyBalance": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000,
"default": null
},
"readyStampOfferIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100,
"default": []
}
},
"required": [
"contactStatus",
"providerTypes",
"requiredTags",
"stageIds"
],
"additionalProperties": false
}
},
"required": [
"operation",
"filter"
],
"additionalProperties": false
}Variant 9
object
operationrequired- stringenum: ["schedule"]
scheduledForLocalrequired- string | nullpattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
sendsPerMinuterequired- integerminimum: 1 · maximum: 60000
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"schedule"
]
},
"scheduledForLocal": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
},
"sendsPerMinute": {
"type": "integer",
"minimum": 1,
"maximum": 60000
}
},
"required": [
"operation",
"scheduledForLocal",
"sendsPerMinute"
],
"additionalProperties": false
}Variant 10
object
operationrequired- stringenum: ["duplicate"]
name- stringminLength: 1 · maxLength: 160
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"duplicate"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation"
],
"additionalProperties": false
}Variant 11
object
operationrequired- stringenum: ["pause"]
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"pause"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
}Variant 12
object
operationrequired- stringenum: ["resume"]
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"resume"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
}Variant 13
object
operationrequired- stringenum: ["cancel"]
JSON Schema
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"cancel"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
}JSON Schema
{
"oneOf": [
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"rename"
]
},
"expectedVersion": {
"type": "integer",
"exclusiveMinimum": 0
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"expectedVersion",
"name"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"delete"
]
},
"expectedVersion": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"required": [
"operation",
"expectedVersion"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"bind_template"
]
},
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"required": [
"operation",
"templateId",
"templateVersion"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"bind_sender"
]
},
"channelId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"channelId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"set_primary_route"
]
},
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0
},
"channelId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"templateId",
"templateVersion",
"channelId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"set_fallback_route"
]
},
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0
},
"channelId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation",
"templateId",
"templateVersion",
"channelId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"remove_fallback_route"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"freeze_audience"
]
},
"filter": {
"type": "object",
"properties": {
"contactStatus": {
"type": "string",
"enum": [
"active",
"archived",
"all"
]
},
"segmentId": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 160,
"default": null
},
"providerTypes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100
},
"requiredTags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100
},
"stageIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100
},
"loyaltyCardRequired": {
"type": "boolean",
"default": false
},
"loyaltyLevelIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100,
"default": []
},
"minimumLoyaltyBalance": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000,
"default": null
},
"readyStampOfferIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"maxItems": 100,
"default": []
}
},
"required": [
"contactStatus",
"providerTypes",
"requiredTags",
"stageIds"
],
"additionalProperties": false
}
},
"required": [
"operation",
"filter"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"schedule"
]
},
"scheduledForLocal": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"
},
"sendsPerMinute": {
"type": "integer",
"minimum": 1,
"maximum": 60000
}
},
"required": [
"operation",
"scheduledForLocal",
"sendsPerMinute"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"duplicate"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"operation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"pause"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"resume"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"cancel"
]
}
},
"required": [
"operation"
],
"additionalProperties": false
}
],
"$ref": "#/components/schemas/UpdateDeveloperCampaignRequest"
}Request examples
curl --request PATCH 'https://YOUR_NOVA_HOST/api/v1/developer/campaigns/CAMPAIGN_ID' --header 'Authorization: Bearer YOUR_PROJECT_TOKEN' --header 'Idempotency-Key: YOUR_UNIQUE_COMMAND_ID' --header 'Content-Type: application/json' --data '{"operation":"duplicate","name":"Копия Campaign"}'Responses
200 Campaign command receipt
application/jsonobject
resourceIdrequired- stringminLength: 1 · maxLength: 160
changedrequired- boolean
JSON Schema
{
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"changed": {
"type": "boolean"
}
},
"required": [
"resourceId",
"changed"
],
"$ref": "#/components/schemas/DeveloperMutationResponse"
}400 Invalid Campaign command or idempotency key
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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 commands unavailable
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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"
]
}409 Campaign state, version, lifecycle or idempotency key conflict
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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+jsonobject
type- stringformat: "uri" · default: "about:blank"
titlerequired- string
statusrequired- 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"
]
}