Skip to main content

Update My Campaign

PUT 
/campaign/:campaignId

Update a campaign's properties by campaignId. Please note: only sample messages are editable.

Request

Path Parameters

    campaignId Campaignidrequired

Body

required

    resellerId Resellerid (string)

    Possible values: <= 8 characters

    Alphanumeric identifier of the reseller that you want to associate with this campaign.

    sample1 Sample1 (string)

    Possible values: <= 255 characters

    Message sample. Some campaign tiers require 1 or more message samples.

    sample2 Sample2 (string)

    Possible values: <= 255 characters

    Message sample. Some campaign tiers require 2 or more message samples.

    sample3 Sample3 (string)

    Possible values: <= 255 characters

    Message sample. Some campaign tiers require 3 or more message samples.

    sample4 Sample4 (string)

    Possible values: <= 255 characters

    Message sample. Some campaign tiers require 4 or more message samples.

    sample5 Sample5 (string)

    Possible values: <= 255 characters

    Message sample. Some campaign tiers require 5 or more message samples.

    messageFlow Messageflow (string)

    Possible values: <= 2048 characters

    Message flow description.

    helpMessage Helpmessage (string)

    Possible values: <= 255 characters

    Help message of the campaign.

    autoRenewal Autorenewal (boolean)

    Default value: true

    Help message of the campaign.

    webhookURL WebhookURL (string)

    Webhook to which campaign status updates are sent.

    webhookFailoverURL WebhookURL (string)

    Webhook failover to which campaign status updates are sent.

Responses

200: Successful Response

422: Validation Error

Request samples


curl -L -X PUT 'https://api.telnyx.com/v2/10dlc/campaign/:campaignId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"resellerId": "string",
"sample1": "string",
"sample2": "string",
"sample3": "string",
"sample4": "string",
"sample5": "string",
"messageFlow": "string",
"helpMessage": "string",
"autoRenewal": true,
"webhookURL": "string",
"webhookFailoverURL": "string"
}'

Response samples


{
"ageGated": true,
"autoRenewal": true,
"billedDate": "string",
"brandId": "d2ca9d69-641b-4131-83fa-5d0744f4c8a9",
"brandDisplayName": "ABC Mobile",
"campaignId": "823d6b1a-6ed6-41a3-9c50-c8ff41b682ba",
"tcrBrandId": "BBRAND1",
"tcrCampaignId": "CCAMP1",
"createDate": "string",
"cspId": "string",
"description": "string",
"directLending": true,
"embeddedLink": true,
"embeddedPhone": true,
"helpKeywords": "string",
"helpMessage": "string",
"messageFlow": "string",
"mock": true,
"nextRenewalOrExpirationDate": "string",
"numberPool": true,
"optinKeywords": "string",
"optinMessage": "string",
"optoutKeywords": "string",
"optoutMessage": "string",
"referenceId": "string",
"resellerId": "string",
"sample1": "string",
"sample2": "string",
"sample3": "string",
"sample4": "string",
"sample5": "string",
"status": "string",
"subUsecases": [
"string"
],
"subscriberHelp": true,
"subscriberOptin": true,
"subscriberOptout": true,
"termsAndConditions": true,
"usecase": "string",
"webhookURL": "https://example.com/webhook",
"webhookFailoverURL": "https://example.com/failover-webhook",
"isTMobileRegistered": true,
"isTMobileSuspended": true,
"isTMobileNumberPoolingEnabled": true,
"campaignStatus": "TCR_ACCEPTED",
"privacyPolicyLink": "string",
"termsAndConditionsLink": "string",
"embeddedLinkSample": "string"
}