Getting Started

Getting Started

About the Target APIs

Target has three groups of APIs:

  • Delivery
  • Admin APIs
  • Legacy admin APIs

Delivery APIs are publicly accessible and can be used to deliver content from Target edge servers to customer websites and servers. Legacy admin APIs require authentication credentials to be passed with every request. The current generation of APIs require both an API Key and a token in the headers to authenticate. See the Authentication page on how to obtain an API Key and token.

Target’s admin APIs follow the same URL schema as the rest of the marketing cloud:{tenant}/target/{rest-of-url}

For example, the following request would get a list of activities for the demo tenant. Your tenant code is the same code you see in the URL when you log in to the Marketing Cloud.

curl -H "Content-Type: application/" -H "Authorization: Bearer " -H "X-Api-Key: "

The Target APIs enable you to create Target Activities programmatically. The APIs can be integrated neatly into a range of application stacks. They can be used to connect your profile management services, your content management systems, CRMs, and data collection suites.

The APIs connect the Adobe Marketing Cloud with your app to provide targeted content as shown below:



For information about activities, offers, and other Target concepts, refer to Basic Concepts in the Target help.

Note: At this time, these APIs do not support Target using Analytics as the reporting source (A4T).

Using the APIs to provide this content depends on your ability to do the following:

  • Retrieve campaign report information
  • Synchronize website visitor profiles between your platform and Target
  • Create offers outside of Target

For detailed specifications on the available APIs, visit the Developer Connection.

Request Types

The Target APIs use different types of requests to retrieve or deliver information:

  • GET

    Use a GET request to retrieve information, such as a list of existing offers. You can include an ID in the request to get a single item. Do not include an ID to get a list of all items.

  • PUT

    Use a PUT request to update a resource or a collection of resources. For example, if you already have an offer or an activity with specific attributes (such as name =Activity One), and you want to update some or all attributes of that resource, use the PUT call to update the attributes. Put requires a unique identifier so the resource can be located easily on the server.

  • POST

    Use a POST request to create a new item. For example, you might want to create a new offer or a new audience.

    Deletes an individual resource.

Response Codes

The Target APIs send the following codes in their responses:

Response Code Description
200 OK A request succeeded.
201 Created A POST request succeeded creating a new resource.
202 Accepted Successful creation of a task that is worked on asynchronously.
304 Not Modified Signals that a resource is unchanged for a conditional GET request.
400 Bad Request A request is not formatted correctly or you sent incorrect parameters.
401 Unauthorized Your request is missing an API token, or the token was included in the body rather than the header.
403 Forbidden Your request includes an invalid or expired token, or you do not have the permissions required to access the item.
404 Not Found The ID you included in your request is invalid, or you do not have the permissions required to access the item.
405 Method Not Allowed The resource doesn't allow the method, e.g. read-only resources don't allow PUT or POST.
406 Not Acceptable The requested representation is not supported, i.e. anything besides JSON.
409 Conflict The request cannot be fulfilled due to some logical constraint. For example, an attempt to DELETE a catalog referenced  by a Recommendation.
415 Unsupported Media Type The content provided in a PUT or POST is in an unsupported format, i.e. not JSON.
429 Too Many Requests You have made too many requests in a given time period. Wait at least one minute and try again.
500 Internal Server Error An unexpected error happened, e.g. a NullPointerException that the caller cannot do anything about.
503 Service Available The API might be down for service, or might be overloaded. Wait at least one minute and try again.

Representations and Versioning

All of the admin APIs support a JSON representation via the the HTTP Accept and/or Content-Type headers. This header is also used to indicate the version of the API requested. If no format is specified then the newest version of the API will be returned.

APIs are only versioned if the change to an API would result in breaking a consumer of the API that is ignoring unknown properties. Adobe reserves the right to add new properties to the JSON response without revisioning the API. The following changes would results in revisioning an API:

  • Removing an existing property
  • Restructuring a list of ids to a list of objects
  • Changing the meaning of an existing property

Supported Headers

Header  Method Description Example
Accept All Target custom vendor header to indicate JSON + version requested: application/{version}+json application/
Content-Type PUT & DELETE Target custom vendor header to indicate JSON supplied in the body: application/{version}+jsonapplication/{version}+json application/
X-API-Key All Your API key.
Authorization All Your access token from the login.

Any questions?

Have a question about this or any other AEM topic? Ask our Community.
Learn more about AEM topics on our help hub.
Was this helpful?

By submitting your feedback, you accept the Adobe Terms of Use.

Thank you for submitting your feedback.