Version 1

Review this information when implemented a Resolve Token API for Tokenized Sending in Marketing Cloud Engagement. New users must use Version 2 of the specifications. Version 1 information is a reference for users with existing implementations.

This request supports HTTP basic authentication. Provide login credentials when you set up the account and use SSL connection to encrypt usernames or passwords. You can also use OAuth2 with the client_credentials grant type.

JSON Response Body Format

Name Type Required Description
resolvedTokens None array Yes Array of ResolvedToken objects
Each resolvedTokens object contains these properties:
tokenRequestId string Yes UUID generated per token during the request
tokenValue string Yes The resolved email address or phone number. You can also call this value email for backwards compatibility.
attributes string Yes Array of attributes associated with the resolved email address or phone number, presented in name and value pairs
unresolvedTokens None array Yes Array of UnresolvedToken objects
Each unresolvedTokens array contains these properties:
tokenRequestId string Yes UUID generated per token during the request
message string No Error message indicating the cause of the unresolved token

HTTP Response Examples

The examples include response body with email addresses and attributes, response body with email addresses only, and response body with phone numbers.

Response Body with Email Addresses and Attributes

{
    "resolvedTokens": [
    {
    "tokenRequestId":"abc123thn567",
    "tokenValue": "user1@exacttarget.com",
    "attributes": [
    {
    "name": "FirstName",
    "value": "Alice"
    },
    {
    "name": "LastName",
    "value": "Smith"
    }
    ]
    },
    {
    "tokenRequestId":"abc098thn654",
    "tokenValue ": "user2@gmail.com",
    "attributes": [
    {
    "name": "FirstName",
    "value": "John"
    },
    {
    "name": "LastName",
    "value": "Smith"
    }
    ]
    }
    ],
    "unresolvedTokens": []
    }

Response Body with Email Addresses

Note
Note Not supported by MobileConnect.
{
    "resolvedTokens": [
    {
    "tokenRequestId":"abc123thn567",
    "tokenValue": "user2@gmail.com"
    }
    ],
    "unresolvedTokens": [
    {
    "tokenRequestId":"abc098thn654",
    "message": "Invalid token; token does not exist." 
    }
    ]
    }

Response Body with Phone Numbers

{
    "resolvedTokens": [
    {
    "tokenRequestId":"abc123thn567",
    "tokenValue": "13175551212"
    }
    ],
    "unresolvedTokens": [
    {
    "tokenRequestId":"abc098thn654",
    "message": "Invalid token; token does not exist." 
    }
    ]
    }

JSON Request Body Format

The JSON Request Body Format includes a valid JSON object (application/json content type) with these properties.

New Users must use Version 2 of the specification.

Name Type Required Description
tokens   array Yes Array of token objects
Each tokens object contains an array of this object:
token string (required) Yes String value containing the token to resolve with information from your data system
sendKey   string Yes External key for send definition used by message. This property uses the name of the email in the send if the send doesn’t use an email send definition.

Example with Email Addresses

{
    "tokens": [
        {
            "token":"t1234@example.com"
        },
        {
            "token":"t5678@example.com"
        }
    ],
    "sendKey": "ExampleEmailSend_12345" 
}

Example with Phone Number

{
    "tokens": [
        {
            "token":"+353.1234"
        },
        {
            "token":"+353.5678"
        }
    ], 
    "sendKey": "ExampleMessage_12345"
}