Skip to content

Campaign API V3 — Developer Guide


1. Overview

Campaigns are used in Sprinklr as primary tags to categorize outbound messages for reporting. They can align with your traditional marketing or PR campaigns and can be customized to give you the outbound categories you need for Reporting. Campaigns that you create through the API appear as selectable options when you create and publish outbound content in Sprinklr. Sprinklr Campaign Management APIs let you create, update, retrieve, and delete campaigns.

Campaign V3 exposes full CRUD on a single resource path — /api/v3/campaign — differentiated by HTTP method, plus one sub-resource for briefs:

OperationMethodPath
Create campaign or sub-campaignPOST/api/v3/campaign
List all campaignsGET/api/v3/campaign
Fetch by campaign IDGET/api/v3/campaign?campaignId={id}
Fetch by external sourceGET/api/v3/campaign?externalSource={source}&externalSourceId={id}
Update campaign (full)PUT/api/v3/campaign?campaignId={id}
Update external campaign (full)PUT/api/v3/campaign?externalSource={source}&externalSourceId={id}
Update campaign (partial)PATCH/api/v3/campaign?campaignId={id} or ?externalSource=&externalSourceId=
Delete campaignDELETE/api/v3/campaign?campaignId={id}
Delete external campaignDELETE/api/v3/campaign?externalSource={source}&externalSourceId={id}
Add campaign briefPOST/api/v3/campaign/brief?campaignId={id}

1.1 The campaign data model

LayerField(s)What it holds
Identityid, displayId, parentCampaignId, externalSource, externalSourceIdHow the campaign is addressed inside Sprinklr and in your system.
Descriptivename, description, startDate, endDate, tags, statusThe campaign itself
Custom datapartnerCustomFields / partnerCustomProperties, clientCustomFields / clientCustomPropertiesPartner-level and client (workspace)-level custom fields, each a map of field ID → list of string values.
Sharingvisibility.globallyVisible, visibility.visibilityConfig[]Who can see the campaign
Lifecyclearchived, deleted, createdTime, modifiedTime, ownerSystem-managed state.
ConnectorsexternalCampaignDetails[]External connector IDs per channel.

Note: A sub-campaign is a campaign that includes parentCampaignId. As in V2, pass parentCampaignId in the create payload to nest a campaign under a parent. displayId is populated by the platform for sub-campaigns.

1.2 Addressing a campaign

You can address a campaign in two mutually exclusive ways:

  • By Sprinklr campaign ID — campaignId, for example 66001165_7624 or 1_7714
  • By external key — The pair externalSource and externalSourceId, for example CAMPAIGN_PORTAL and dgsg3456y45tygvcd3456tyhgfde3456yhfgfd_02

Campaign IDs are opaque strings that follow the format {partnerId}_{sequence}. For example, 66001165_7623, 66001165_7624, and 66001165_7629. Never parse or arithmetically manipulate them, and never store them in a numeric column.

Notes:

  • GET, PUT, PATCH, and DELETE all accept both forms.
  • POST takes no identifier — identity comes from the body. POST /campaign/brief accepts campaignId only.

2. Base URLs and environments

All API calls are sent to the production endpoint:

https://api3.sprinklr.com/{env}/api/v3

So the campaign resource is:

https://api3.sprinklr.com/{env}/api/v3/campaign

Replace {env} with your assigned environment identifier. The V3 specification enumerates: prod, prod0, prod2, and so on. See APIs | Sprinklr Developer Portal for the current environment list.


3. Authentication and common headers

All Campaign API calls are authenticated with OAuth 2.0 (bearerAuth, HTTP bearer, JWT) combined with an API key header (apiKeyAuth, header name Key). See Developer Tools in Sprinklr and the Authorize section of the developer portal for API key and secret generation.

HeaderValuePurposeRequired on
AuthorizationBearer {{accessToken}}Authenticates the user with the server.All requests
Key{{apiKey}}Authenticates the application with the server.All requests
Content-Typeapplication/jsonDeclares the request body media type.POST, PUT, PATCH
Content-Typemultipart/form-dataDeclares the brief upload media type.POST /campaign/brief
Acceptapplication/jsonDeclares the acceptable response type.All requests

Permissions: Users in your Sprinklr environment need the appropriate roles and permissions to create and view campaigns. Missing permissions return a 403 Forbidden response. For more information, see Campaign Permissions


4. Write operations

4.1 Create a campaign or sub-campaign

POST /api/v3/campaign

Use this endpoint to create an internal campaign, external campaign, or sub-campaign.

Request body

ParameterSub-parameterRequiredTypeDescription
nameRequiredStringName of the campaign.
statusRequiredStringStatus of the campaign.
descriptionOptionalStringDescription of the campaign.
parentCampaignIdOptionalStringParent campaign ID for a sub-campaign.
startDateOptionalInteger (int64)Start date of the campaign, in epoch milliseconds.
endDateOptionalInteger (int64)End date of the campaign, in epoch milliseconds.
tagsOptionalArray[String]Tags associated with the campaign.
archivedOptionalBooleanSpecifies whether the campaign is archived.
Default: false
partnerCustomFieldsOptionalMap<String, List>Partner-level custom fields, keyed by custom field ID.
clientCustomFieldsOptionalMap<String, List>Client-level custom fields, keyed by custom field ID.
externalSourceRequired to create an external campaign.StringName of the external system. Provide this parameter with externalSourceId to create an external campaign.
externalSourceIdRequired to create an external campaign.StringIdentifier of the campaign in the external system. Provide this parameter with externalSource to create an external campaign.
visibilityOptionalObjectCampaign visibility settings.
globallyVisibleOptionalBooleanSpecifies whether the campaign is globally visible.
visibilityConfigOptionalArray[Object]Sharing configuration entries.
visibilityConfig[].typeRequired within the entryStringShare target type.
For example CLIENT, CLIENT_GROUP, USER, USER_GROUP, GLOBAL
visibilityConfig[].idsOptionalArray[String]Identifiers associated with the visibility target type.
externalCampaignDetailsOptionalArray[Object]External connector details for a campaign.
connectorOptionalEnum (ChannelType)Channel or connector associated with the external identifiers.
externalIdsOptionalArray[String]External identifiers associated with the connector.

Request — Internal campaign

curl --location 'https://api3.sprinklr.com/{env}/api/v3/campaign' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "name": "SampleCampaign",
    "description": "Sample description",
    "startDate": 1560159652000,
    "endDate": 2209563421000,
    "tags": ["Int Tag","Campaign Tag"],
    "status": "APPROVED",
    "partnerCustomFields": {"5c35cbf2e4b0e1b05edd1b01": ["1"]},
    "clientCustomFields": {"5ad59e6fe4b024f15e8384ef": ["ABC"]},
    "visibility": {
        "globallyVisible": "false",
        "visibilityConfig": [{type": "CLIENT","ids": ["2"]},
            {"type": "CLIENT_GROUP","ids": ["60740690d4644c337059b7a1"]},
            {"type": "USER","ids": ["600000003"]},
            {"type": "USER_GROUP","ids": ["61923d665f0ec3151749d108"]}
        ]
    }
}'

Request — External campaign

To create an external campaign, include both externalSource and externalSourceId in the request body.

curl --location 'https://qa6-api2-v3.sprinklr.com/api/v3/campaign' \
--header 'Authorization: Bearer {{token}}' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "name": "SampleExtCampaign",
    "description": "Testing",
    "externalSource": "DCM",
    "externalSourceId": "69b11ab96fd8b8456bc1e12d",
    "tags": ["Int Tag","Campaign Tag"],
    "status": "APPROVED",
    "partnerCustomFields": {"5c35cbf2e4b0e1b05edd1b01": ["1"]},
    "clientCustomFields": {"5ad59e6fe4b024f15e8384ef": ["ABC"]},
    "visibility": {
        "globallyVisible": "false",
        "visibilityConfig": [{type": "CLIENT","ids": ["2"]},
            {"type": "CLIENT_GROUP","ids": ["60740690d4644c337059b7a1"]},
            {"type": "USER","ids": ["600000003"]},
            {"type": "USER_GROUP","ids": ["61923d665f0ec3151749d108"]}
        ]
    }
}'

Request — Sub-campaign

To create a sub-campaign, include parentCampaignId in the request body.

curl --location 'https://qa6-api2-v3.sprinklr.com/api/v3/campaign' \
--header 'Authorization: Bearer {{token}}' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "name": "SampleSubCampaign",
    "description": "Testing06",
    "parentCampaignId": "66000002_8163",
    "startDate": 1560159652000,
    "endDate": 2209563421000,
    "tags": ["Int Tag","Campaign Tag"],
    "status": "APPROVED",
    "partnerCustomFields": {"5c35cbf2e4b0e1b05edd1b01": ["1"]},
    "clientCustomFields": {"5ad59e6fe4b024f15e8384ef": ["ABC"]},
    "visibility": {
        "globallyVisible": "false",
        "visibilityConfig": [{type": "CLIENT","ids": ["2"]},
            {"type": "CLIENT_GROUP","ids": ["60740690d4644c337059b7a1"]},
            {"type": "USER","ids": ["600000003"]},
            {"type": "USER_GROUP","ids": ["61923d665f0ec3151749d108"]}
        ]
    }
}'

Response

A successful request returns 201 Created and campaign details in the data object. The response also returns an errors array.

The response structure is the same for Internal campaigns, sub-campaigns, and external campaigns. Additional fields are returned based on the campaign type:

  • Sub-campaigns include parentCampaignId and displayId.
  • External campaigns include externalSource and externalSourceId.

For a complete list of response fields, see §6.2.

{
"data": {
    "id": "66001165_8318",
    "name": "SampleCampaign",
    "description": "Sample description",
    "createdTime": 1788218719757,
    "modifiedTime": 1788218719014,
    "startDate": 1560159652000,
    "endDate": 2209563421000,
    "tags": ["Int Tag", "Campaign Tag"],
    "owner": 66077412,
    "partnerCustomProperties": {
        "5c35cbf2e4b0e1b05edd1b01": ["1"]
    },
    "clientCustomProperties": {
        "5ad59e6fe4b024f15e8384ef": ["ABC"]
    },
    "status": "APPROVED",
    "archived": false,
    "deleted": false
},
"errors": []
}

Note the field-name asymmetry. You write partnerCustomFields / clientCustomFields and you read back partnerCustomProperties / clientCustomProperties. This asymmetry exists in V2 and is carried into the V3 Campaign and CampaignRequest schemas. Do not round-trip a response object straight back into a PUT body without remapping these two keys.

Duplicate external campaigns

Creating a campaign with an externalSourceId that already exists returns an error in the errors array.

{
  "errors": [
    {
      "id": "5df8fcdec6e1aa000166cc8c",
      "code": 400,
      "message": "Campaign already exists with external details : CAMPAIGN_PORTAL - dgsg3456y45tygvcd3456tyhgfde3456yhfgfd_02"
    }
  ]
}

4.2 Update a campaign — Full update

  • PUT /api/v3/campaign?campaignId={id}
  • PUT /api/v3/campaign?externalSource={source}&externalSourceId={id}

Use this endpoint to update an existing campaign. Provide the complete campaign definition in the request body. The API replaces the existing campaign with the payload you provide.

Query parameters

ParameterTypeRequiredDescriptionExample
campaignIdStringOptionalIdentifier of the campaign to update.1_7714
externalSourceStringOptionalName of the external system associated with the campaign. Use with externalSourceId.CAMPAIGN_PORTAL
externalSourceIdStringOptionalIdentifier of the campaign in the external system. Use with externalSource.dgsg3456y45tygvcd3456tyhgfde3456yhfgfd_02

Supply either campaignId or the externalSource and externalSourceId pair.

Request body

Update campaign by Campaign ID

curl --location --request PUT 'https://api3.sprinklr.com/{env}/api/v3/campaign?campaignId=66001165\_8318' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
    "name": "SampleCampaign",
    "description": "Updated campaign description",
    "startDate": 1560159652000,
    "endDate": 2209563421000,
    "tags": ["Int Tag","Campaign Tag"],
    "status": "APPROVED"
}'

Update campaign by External Source

curl --location --request PUT 'https://api3.sprinklr.com/{env}/api/v3/campaign?externalSource=DCM&externalSourceId=69b11ab96fd8b8456bc1e12d' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
    "name": "SampleExtCampaign",
    "description": "Updated external campaign",
    "status": "APPROVED"
}'

⚠️ PUT replaces — it does not merge

Any field you omit from a PUT body — tags, description, partnerCustomFields, visibility — is at risk of being cleared. Before issuing a PUT:

  1. GET the current campaign.
  2. Remap partnerCustomProperties → partnerCustomFields and clientCustomProperties → clientCustomFields.
  3. Merge your changes into the result.
  4. PUT the merged document back.

If you need to update only a few fields, use PATCH (§4.3) instead.

Response: A successful request returns 200 OK and the updated campaign object. For information about the response parameters, see §6.2.


4.3 Update a campaign — Partial update

  • PATCH /api/v3/campaign?campaignId={id}
  • PATCH /api/v3/campaign?externalSource={source}&externalSourceId={id}

Use this API to update specific fields in an existing campaign. Unlike Update a campaign, you do not need to provide the complete campaign definition in the request body. Include only the fields that you want to update.

Query parameters

ParameterTypeDescription
campaignIdStringIdentifier of the campaign to update.
externalSourceStringName of the external system associated with the campaign. Use with externalSourceId.
externalSourceIdStringIdentifier of the campaign in the external system. Use with externalSource.

Request body

Campaign partial update (PATCH). Send only fields to change. No field is required.

ParameterTypeDescription
nameStringName of the campaign.
descriptionStringDescription of the campaign.
startDateInteger (int64)Start date, epoch milliseconds
endDateInteger (int64)End date, epoch milliseconds
tagsArray[String]Tags on the campaign
partnerCustomFieldsMap<String, List>Partner-level custom fields on the campaign
clientCustomFieldsMap<String, List>Client-level custom fields on the campaign
externalSourceStringExternal system name
externalSourceIdStringExternal system ID
visibilityObjectVisibility of the campaign (globallyVisible, visibilityConfig[])
statusString (CampaignStatus)Status of the campaign
archivedBooleantrue if the campaign is archived
externalCampaignDetailsArray[Object]External connector details (connector, externalIds[])

Note: PATCH cannot change parentCampaignId. Re-parenting a sub-campaign requires a PUT.

curl --location --request PATCH 'https://api3.sprinklr.com/{env}/api/v3/campaign?campaignId=66001165_8318' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
    "name": "Updated Campaign Name",
    "status": "APPROVED"
}

Response: A successful request returns 200 OK and the updated campaign object. For information about the response parameters, see §6.2.


4.4 Delete a campaign

  • DELETE /api/v3/campaign?campaignId={id}
  • DELETE /api/v3/campaign?externalSource={source}&externalSourceId={id}

Delete Campaign by Campaign ID

curl --location --request DELETE 'https://api3.sprinklr.com/{env}/api/v3/campaign?campaignId=66001165\_8318' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Accept: application/json'

Delete Campaign by External Source

curl --location --request DELETE 'https://api3.sprinklr.com/{env}/api/v3/campaign?externalSource=DCM&externalSourceId=69b11ab96fd8b8456bc1e12d' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Accept: application/json'

Response: A successful request returns 204 No Content, indicating that the campaign was deleted successfully.

Note: Use the value of archived as true when you want to archive a campaign without deleting it. Use the Delete Campaign API when you want to remove a campaign.


4.5 Add a campaign brief

POST /api/v3/campaign/brief?campaignId={id}

Attaches a campaign brief, uploaded as an HTML file, to an existing campaign.

Campaign Briefs are attached to campaigns to give the agency or internal creative team enough information to strategize the concept for the campaign. You can add multiple briefs to campaigns and sub-campaigns.

Query parameters

ParameterTypeRequiredDescription
campaignIdStringOptional in the spec; required in practiceIdentifier of the campaign to which the brief is attached.

Form-data parameters

ParameterRequiredTypeDescription
briefNameRequiredStringName of the campaign brief.
htmlFileRequired.html fileHTML file that contains the campaign brief content.

The HTML can include all tags except <link>.
curl --location --request POST 'https://api3.sprinklr.com/{env}/api/v3/campaign/brief?campaignId=66001165\_8318' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Accept: application/json' \
--form 'briefName="Spring Product Launch"' \
--form 'htmlFile=@"/path/to/brief.html"'

Response: A successful request returns 200 OK along with a confirmation message indicating that the brief was added successfully.

{
"data": "Successfully added the requested brief: \"Spring Product Launch\" to the campaign \"66001165_8318\".",
"errors": []
}

4.6 Method comparison — when to use which

POSTPUTPATCHDELETE
PurposeCreate a campaign, sub-campaign, or external campaignReplace the full campaign documentChange selected fieldsRemove the campaign
AddressingNone — identity comes from the body?campaignId= or ?externalSource=&externalSourceId=Same as PUTSame as PUT
Body schemaCampaignRequestCampaignRequestCampaignPatchRequestV3DTONone
Required body fieldsname, statusname, statusNone—
Unspecified fieldsN/AReplaced/clearedPreserved—
Can set parentCampaignIdYesYesNo—
Response bodyCampaign objectstringstringstring
Safe for incremental sync—No, without read-modify-writeYes—

5. Read operations

5.1 GET /api/v3/campaign — List or fetch campaigns

This is a multi-mode endpoint that replaces three separate V2 reads:

V2 endpointV3 equivalent
Fetch All Campaign — GET /api/v2/campaignGET /api/v3/campaign
Read Campaign — GET /api/v2/campaign/{campaignId}GET /api/v3/campaign?campaignId={id}
External Read Campaign — GET /api/v2/campaign/{externalSource}/{externalId}GET /api/v3/campaign?externalSource={source}&externalSourceId={id}

Query parameters

ParameterTypeRequiredDescription
campaignIdStringOptionalIdentifier of the campaign to retrieve.
externalSourceStringOptionalName of the external system associated with the campaign.
externalSourceIdStringOptionalIdentifier of the campaign in the external system.
pageNumberStringOptionalPage number (0-based); use with pageSize for the partner-wide list
pageSizeStringOptionalPage size (default 20, maximum 100)
sinceTimeStringOptionalAlternative pagination cursor; see API v3 docs
# Mode 1 — all campaigns, first page
curl --location 'https://api3.sprinklr.com/{env}/api/v3/campaign?pageNumber=0&pageSize=100' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Accept: application/json'

# Mode 2 — by campaign ID
curl --location 'https://api3.sprinklr.com/{env}/api/v3/campaign?campaignId=1_7714' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Accept: application/json'

# Mode 3 — by external key
curl --location 'https://api3.sprinklr.com/{env}/api/v3/campaign?externalSource=CAMPAIGN_PORTAL&externalSourceId=dgsg3456y45tygvcd3456tyhgfde3456yhfgfd_02' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Accept: application/json'

Response: A successful request returns 200 OK and the requested campaign data. Depending on the retrieval method, the response contains either a list of campaigns or a single campaign.

{
    "data": [
        {
            "id": "66001165_8318",
            "name": "SampleCampaign",
            "description": "Testing06",
            "createdTime": 1788218719757,
            "modifiedTime": 1788218719014,
            "startDate": 1560159652000,
            "endDate": 2209563421000,
            "tags": ["Int Tag", "Campaign Tag"],
            "owner": 66077412,
            "partnerCustomProperties": { "5c35cbf2e4b0e1b05edd1b01": ["1"]},
            "clientCustomProperties": { "5ad59e6fe4b024f15e8384ef": ["ABC"]},
            "status": "APPROVED",
            "visibility": {
                "globallyVisible": false
                },
            "archived": false,
            "deleted": false
        }
    ],
    "errors": []
}

Do not mix addressing modes. Send campaignId, or the externalSource and externalSourceId pair, or the pagination parameters and not a combination. Mixed parameter sets are not defined in any source and should be treated as unsupported.


6. Response format and status codes

6.1 Envelopes

V3 Campaign responses are not uniformly enveloped, and this is the most important behavioural detail to plan for:

OperationDeclared response
GET /campaignarray of Campaign — bare array, no envelope
POST /campaignCampaign object — bare object, no envelope
PUT, PATCH, DELETE /campaignstring
POST /campaign/briefAPIResponse envelope: { "data": {}, "errors": [], "metadata": {} }
All 4xx responsesErrorResponse envelope: { "data": null, "errors": [], "metadata": {} }

Error objects inside errors[] carry three required fields:

FieldTypeDescription
idString24-character hex ObjectId
codeIntegerNumeric error code
messageStringDotted error key, for example account.not.found

6.2 The Campaign response object

ParameterSub ParameterTypeDescription
idStringUnique identifier of the campaign.
nameStringName of the campaign.
displayIdLongDisplay identifier for a sub-campaign.
parentCampaignIdStringIdentifier of the parent campaign. Returned for sub-campaigns.
descriptionStringDescription of the campaign.
createdTimeLongTime when Sprinklr creates the campaign, in epoch milliseconds.
modifiedTimeLongTime when Sprinklr last modifies the campaign, in epoch milliseconds.
startDateLongStart date of the campaign, in epoch milliseconds.
endDateLongEnd date of the campaign, in epoch milliseconds.
tagsArray[String]Tags associated with the campaign.
ownerLongOwner of the campaign.
partnerCustomPropertiesMap[String, List[String]]Partner-level custom properties associated with the campaign.
clientCustomPropertiesMap[String, List[String]]Client-level custom properties associated with the campaign.
statusStringStatus of the campaign.
visibilityObjectVisibility of the campaign.
globallyVisibleBooleanSpecifies whether the campaign is globally visible.
visibilityConfigArray[Object]Visibility configuration entries.
externalSourceStringName of the external system associated with the campaign. Returned for external campaigns.
externalSourceIdStringIdentifier of the campaign in the external system. Returned for external campaigns.
externalCampaignDetailsArray[Object]External connector details associated with the campaign.
connectorStringChannel or connector associated with the external identifiers.
externalIdsArray[String]External identifiers associated with the connector.
archivedBooleanSpecifies whether the campaign is archived.
deletedBooleanSpecifies whether the campaign is deleted.

Note:status is the only required field on the Campaign schema. Every other field may be absent from a response — code defensively.

6.3 Response codes

HTTP codeScenarioDescription
200 SuccessSuccessDeclared success response for every Campaign V3 operation, including create.
400 Bad requestInvalid parametersMissing required fields, invalid parameter combinations, or a duplicate external campaign.
401 Missing or invalid authenticationAuthentication failedInvalid or missing Authorization token or Key header.
403 Insufficient permissionsPermission gapThe user lacks campaign create/view permissions.
404 Resource not foundNot foundNo campaign matches the supplied identifier.

7. V2 → V3 migration

7.1 Endpoint mapping

V2V3
POST /api/v2/campaign (Create Campaign)POST /api/v3/campaign
POST /api/v2/campaign (Create External Campaign)POST /api/v3/campaign with externalSource and externalSourceId in the body
GET /api/v2/campaign (Fetch All Campaign)GET /api/v3/campaign
GET /api/v2/campaign/{campaignId} (Read Campaign)GET /api/v3/campaign?campaignId={id}
GET /api/v2/campaign/{externalSource}/{externalId} (External Read Campaign)GET /api/v3/campaign?externalSource={source}&externalSourceId={id}
PUT /api/v2/campaign/{campaignId} (Update Campaign)PUT /api/v3/campaign?campaignId={id}
Update Campaign by external source and source IDPUT /api/v3/campaign?externalSource={source}&externalSourceId={id}
Delete CampaignDELETE /api/v3/campaign?campaignId={id}
External Delete CampaignDELETE /api/v3/campaign?externalSource={source}&externalSourceId={id}
No V2 equivalentPATCH /api/v3/campaign — new in V3
POST /api/v2/campaign/{campaignId}/brief (Create Campaign Brief)POST /api/v3/campaign/brief?campaignId={id}

7.2 What changes structurally

AspectAPI V2API V3Impact
Base path/api/v2/campaign/api/v3/campaignUpdate every URL.
Campaign addressingPath segment — /campaign/{campaignId}Query parameter — /campaign?campaignId={id}URL construction changes; no more path-encoding of IDs.
External addressingSeparate path — /campaign/{externalSource}/{externalId}Same base path, externalSource and externalSourceId query parametersTwo code paths collapse into one.
Brief path/campaign/{campaignId}/brief/campaign/brief?campaignId={id}Sub-resource moves from path to query.
CreateTwo documented flows on one POSTOne POST; body content selects the flowPayload logic unchanged, docs consolidated.
Partial updateNot availablePATCH with CampaignPatchRequestV3DTORemoves the read-modify-write cycle.
List paginationNonepageNumber, pageSize (default 20, max 100), sinceTimeLarge partners must use pagination.
Response envelope{ "data": …, "errors": [] }Bare array/object on GET/POST; string on PUT/PATCH/DELETE; APIResponse on brief

7.3 Field mapping

Field names carry over unchanged between V2 and V3 — name, description, parentCampaignId, startDate, endDate, tags, status, archived, partnerCustomFields, clientCustomFields, visibility, externalSource, externalSourceId.

Two additions to be aware of on V3:

FieldWhereNotes
externalCampaignDetails[]CampaignRequest, CampaignPatchRequestV3DTO, CampaignExternal connector details: connector (channel type enum) plus externalIds[]
displayIdCampaign (read-only)Typed integer (int64) in V3; V2's Fetch All Campaign example showed it as a string

7.4 Migration steps

  1. Update the base URL to https://api3.sprinklr.com/{env}/api/v3.
  2. Move identifiers from the path to the query string. /campaign/{id} → /campaign?campaignId={id}; /campaign/{externalSource}/{externalId} → /campaign?externalSource=&externalSourceId=; /campaign/{id}/brief → /campaign/brief?campaignId={id}.
  3. Merge your two create paths. Internal and external creates now hit the same POST /api/v3/campaign.
  4. Split your write path by method. Route creates to POST, authoritative full syncs to PUT, and incremental changes to PATCH.
  5. Introduce pagination on the list call. V2's Fetch All returned everything; V3 pages at a default of 20 and a maximum of 100.
  6. Adjust response parsing. Handle a bare array from GET, a bare object from POST, and a plain string from PUT/PATCH/DELETE.
  7. Keep the custom-field remap. Requests use partnerCustomFields / clientCustomFields; responses return partnerCustomProperties / clientCustomProperties.
  8. Re-test duplicate-external-ID handling. The 400 "Campaign already exists with external details" error remains the signal to switch from create to update.

8. Field reference — supporting objects

8.1 visibility

FieldTypeDescription
globallyVisibleBooleantrue if the asset is globally visible.
visibilityConfigArray[AssetShareConfig]Config to share the asset.
visibilityConfig[].typeString — requiredType, for example USER, GLOBAL, CLIENT. V2 documented CLIENT, CLIENT_GROUP, USER, USER_GROUP.
visibilityConfig[].idsArray[String]IDs based on type.

All visibilityConfig entries are optional and can be used as required by your use case.

8.2 externalCampaignDetails

FieldTypeDescription
connectorEnum (ChannelType)The channel/connector the external IDs belong to.
externalIdsArray[String]External connector IDs for the campaign.

8.3 Custom fields

Both partnerCustomFields and clientCustomFields are Map<String, List<String>> — keyed by the custom field ID, always taking a list of string values even for single-valued fields:

{
  "partnerCustomFields": { "5c35cbf2e4b0e1b05edd1b01": ["1"] },
  "clientCustomFields":  { "5ad59e6fe4b024f15e8384ef": ["ABC"] }
}

Use the Bootstrap API for configuration information — it is how you resolve custom field IDs, as documented on the V2 Create Campaign reference.


9. Use cases

9.1 Create a campaign and immediately attach its brief

Scenario: a marketing tool creates a campaign and uploads the creative brief in one workflow.

  1. POST /api/v3/campaign with name and status. Capture id from the response.
  2. POST /api/v3/campaign/brief?campaignId={id} as multipart/form-data with briefName and htmlFile.

Strip link tags from the HTML before upload — they are the one unsupported tag.

9.2 Keep an external campaign portal in sync

Scenario: a third-party campaign portal owns campaign records and pushes changes to Sprinklr.

Do not store the Sprinklr id; address everything by your own key:

POST   /api/v3/campaign                                          (body carries externalSource and externalSourceId)
GET    /api/v3/campaign?externalSource=…&externalSourceId=…
PATCH  /api/v3/campaign?externalSource=…&externalSourceId=…
DELETE /api/v3/campaign?externalSource=…&externalSourceId=…

This is the single largest ergonomic win in V3 — in V2 the external flows lived on a different path shape from the internal ones.

9.3 Idempotent create-or-update from an external system

Scenario: your sync job does not know whether a campaign already exists in Sprinklr.

  1. GET /api/v3/campaign?externalSource=…&externalSourceId=…
  2. On a result, PATCH the changed fields.
  3. On 404, POST the campaign.

Alternatively, POST first and treat the 400 "Campaign already exists with external details" error as the signal to fall back to PATCH.

9.4 Flip a campaign's status at launch

Scenario: a scheduler approves campaigns at their start date.

curl --location --request PATCH 'https://api3.sprinklr.com/{env}/api/v3/campaign?campaignId=1_7714' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{ "status": "APPROVED" }'

Using PUT requires you to reconstruc name, tags, custom fields, and visibility just to change one string.

9.5 Build a sub-campaign hierarchy

Scenario: one global campaign with per-region children.

  1. POST /api/v3/campaign for the parent; capture id.
  2. POST /api/v3/campaign once per region with parentCampaignId set to that id.
  3. Read the children back with GET /api/v3/campaign?pageNumber=0&pageSize=100 and group by parentCampaignId.

To move a sub-campaign to another parent, use PUT.

9.6 Page through every campaign in a large partner

let pageNumber = 0;
const pageSize = 100;                 // maximum permitted
let all = [];

while (true) {
  const page = await get(
    `/api/v3/campaign?pageNumber=${pageNumber}&pageSize=${pageSize}`
  );

  if (!Array.isArray(page) || page.length === 0) break;

  all = all.concat(page);

  if (page.length < pageSize) break;  // short page ⇒ last page
  pageNumber += 1;
}

The Campaign array carries no hasMore flag, so terminate on a short or empty page.

9.7 Archive rather than delete at end of quarter

Scenario: campaigns must stop appearing in publishing pickers but remain available for reporting.

{ "archived": true }

Send this payload in a PATCH request. Reserve DELETE for records created in error.


10. Caveats and best practices

Method selection

  • Default to PATCH. Reach for PUT only when you hold the complete authoritative document.
  • PUT replaces. Any field absent from the body is at risk.
  • PUT requires name and status on every call; PATCH requires nothing.
  • PATCH cannot set parentCampaignId.

Identifiers

  • Provide either campaignId or the externalSource and externalSourceId pair.
  • externalSourceId must be unique. A duplicate returns 400 with the message Campaign already exists with external details : {source} - {id}.
  • URL-encode externalSourceId values containing reserved characters — external IDs are frequently long opaque strings.
  • Campaign IDs are opaque strings shaped {partnerId}_{sequence} (for example 66001165_7623). Store them as strings; do not parse, increment, or coerce them to numbers.
  • Identifiers travel in the query string, not the request body — this is the form every QA request uses.

Field naming

  • Write partnerCustomFields / clientCustomFields; read partnerCustomProperties / clientCustomProperties. Do not feed a GET response directly back into a PUT.
  • Custom field values are always lists of strings, even when single-valued.

Dates

  • startDate, endDate, createdTime, and modifiedTime are all epoch milliseconds as int64. Do not send seconds.

Pagination

  • Pages are 0-based; the first page is 0.
  • Default pageSize is 20, maximum is 100.
  • pageNumber and pageSize are typed as string in the specification — send them as query strings, not JSON numbers.
  • No hasMore flag is returned; stop on a short or empty page.

Briefs

  • briefName and htmlFile are both required, sent as multipart/form-data.
  • All HTML tags are supported except the link tag.
  • Create the campaign before you attach a brief.

Response handling

  • status is the only required field on Campaign. Treat every other field as optional.
  • Success is 200 on all five operations, including create.
  • Always inspect errors[] where an envelope is returned; each Error carries id, code, and message.
  • Parse defensively for the envelope. Because the spec and the ticket's acceptance criteria disagree and QA captured no responses, branch on the presence of a data key rather than assuming either shape.

Values

  • status: APPROVED is confirmed accepted. The schema imposes no enum, so validate against your own allow-list rather than trusting the API to reject a typo.
  • visibility.globallyVisible: send a JSON boolean (false), not the string "false", even though QA sent the string form.

Permissions

  • Set up the appropriate roles and grant permissions for users who create and view campaigns. A 403 almost always means a permission gap, not a malformed request.