Skip to main content
Question

Sms & Whatsapp Delivery not working

  • January 13, 2025
  • 2 replies
  • 59 views

Forum|alt.badge.img+1

Hello,

I'm having trouble creating the envelope when I set the delivery method to SMS or WhatsApp. In my tests, I send the following JSON to the Docusign API:

{
  "emailSubject": "Test AppBuilder - 1_1",
  "documents": []
  "recipients": {
    "signers": [
      {
        "roleName": "CONTRACTOR",
        "name": "Carlos Oliveira",
        "email": "",
        "recipientId": "",
        "routingOrder": "1",
        "clientUserId": "",
        "deliveryMethod": "SMS",
        "phoneNumber": {
          "countryCode": "55",
          "number": ""
        },
        "tabs": {},
        }
    ],
  },
  "status": "sent",
  "sentDate": 1736456976955,
  "completeDate": null
}

The country code is the country code of Brazil.

I get an error while requesting server, received a non successful HTTP code [400] with response Body: "errorCode": "INVALID_PHONE_NUMBER_FOR_RECIPIENT",
"message": "The Phone number is invalid. Envelope definition is missing a phoneNumber for recipientId: "

2 replies

Michael.Rave
Docusign Employee
Forum|alt.badge.img+14
  • Docusign Employee
  • 927 replies
  • January 14, 2025

@ME Developer 

I can see in your code snippet that you did not provide a phone number, so the error message is correct and tells you what to fix. I highlighted the missing value in the code snippet below:

        "phoneNumber": {
          "countryCode": "55",
          "number": ""
        },

 

Providing a valid phone number (only numbers, no spaces or special characters) should be able to create an envelope.


Forum|alt.badge.img+1
  • Author
  • Newcomer
  • 1 reply
  • January 15, 2025

Thank you for the response, Michael.

However, I made a mistake in the example I provided in the post. Actually, in my case, I am indeed sending a value in the phone number field.

{
  "emailSubject": "Test AppBuilder - 1_1",
  "documents": []
  "recipients": {
    "signers": [
      {
        "roleName": "CONTRACTOR",
        "name": "Carlos Oliveira",
        "email": "***Redacted content***",
        "recipientId": "***Redacted content***",
        "routingOrder": "1",
        "clientUserId": "***Redacted content***",
        "deliveryMethod": "SMS",
        "phoneNumber": {
          "countryCode": "55",
          "number": "***Redacted content***"
        },
        "tabs": {},
        }
    ],
  },
  "status": "sent",
  "sentDate": 1736456976955,
  "completeDate": null
}

Still, I keep receiving the same error message: INVALID_PHONE_NUMBER_FOR_RECIPIENT - The Phone number is invalid. Envelope definition is missing a phoneNumber for recipientId: