Skip to main content

DELETE/email_campaign/{email_campaign_id}

This method deletes the email campaign specified by the email_campaign_id path parameter.

Call getEmailCampaigns to retrieve all of the seller's email campaigns. Use the email_campaign_id of the desired email campaign in the response as the path parameter for this request.

Input

Resource URI

DELETE https://api.ebay.com/sell/marketing/v1/email_campaign/{email_campaign_id}

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
email_campaign_idstringThis path parameter specifies the unique eBay-assigned identifier for the email campaign being deleted.

You can retrieve the email campaign IDs for a specified seller using the getEmailCampaigns method.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/sell.marketing

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
emailCampaignIdstring

The unique eBay-assigned ID for the email campaign that is generated when the email campaign is created.

Occurrence: Always

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200OK
400Bad Request
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
35000STORE_CRMAPPLICATIONInternal server error encountered. If this problem persists, contact the eBay Developers Program for support.
35001STORE_CRMBUSINESSA store subscription is required for this call, please check the store subscription status for current seller.
35401STORE_CRMREQUESTNo email campaign found for email campaign ID {email_campaign_id}.

Warnings

This call has no warnings.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Deleting an Email Campaign

This method deletes an email campaign specified by the email_campaign_id path parameter.

Input

The email_campaign_id path parameter is required for this call. Email Campaign IDs can be retrieved for a specific seller using the getEmailCampaigns method.

In this sample, the ID is a********9.

DELETEhttps://api.ebay.com/sell/marketing/v1/email_campaign/a********9

Output

If the call is successful, status code 200 OK is returned and the specified email campaign is deleted. The emailCampaignId for the deleted campaign is returned.