Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

API call unsuccessful: Error creating distribution

JS_its
JS_its MI, USACommunity Member, Qualtrics Brand Admin Qubie ✭
edited July 6 in Qualtrics API

I am working with the Qualtrics API to create a Distribution to send a survey invite to a singular contact in a mailing list. I have successfully created a distribution via the Qualtrics UI, with all of the corresponding parameters so I know they should work. This is the key documentation I am working from: https://api.qualtrics.com/api-reference/reference/distributions.json/paths/~1distributions/post . Any insight would be greatly appreciated.

Thank you and here is the relavent info:

I receive this error when running as a script in python and posting in Postman:

 {"meta":

{"httpStatus":"400 - Bad Request",

"error":

{

"errorMessage":"API Call Unsuccessful: Error creating distribution",

"errorCode":"DEC_8"

},

"requestId":"cb1c2477-0755-49c5-8243-cdf5ed86308e"

}

}

 Here is url: https://<mydatacenter>.qualtrics.com/API/v3/distributions

header = {API-token: <my token>, content-type:"application/json"}

And the json payload:

{

    "message": {

        "libraryId": "UR_2488CVRwq2XH4B7",

        "messageId": "MS_a3G4NLBKv5wso1E"

    },

    "recipients": {

        "contactId": "CGC_sdvm6nTY2O0nKws",

        "mailingListId": "CG_VOOB22zHx9o2wVj"

    },

    "header": {

        "fromName": "Qualtrics Test ",

        "replyToEmail": "[email protected]m",

        "fromEmail": "[email protected]",

        "subject": "Test Survey Distribution"

    },

    "surveyLink": {

        "surveyId": "SV_87isJC9tHvmSgex",

        "expirationDate": "2021-07-13T12:46:11Z",

        "type": "Individual"

    },

    "sendDate": "2021-07-06T12:46:11Z"

}

 

Best Answer

  • JS_its
    JS_its MI, USACommunity Member, Qualtrics Brand Admin Qubie ✭
    Accepted Answer

    SOLVED! Qualtrics support got back to me with this statement...

    "The DEC_8 error often occurs when the From Domain (in this case, "@mydomain.co") has not been verified for the brand. Custom From Addresses can only be used if they have been added to the brand according to the instructions found on this page. "

    I was using an email that was not part of the brand for testing.