Softservv API
  1. Messages
Softservv API
  • Authentication
    • Login
      POST
  • Accounts
    • Get Account
      GET
  • Whatsapp Accounts
    • Get Whatsapp Accounts
      GET
    • Get Whatsapp Account
      GET
    • Update Whatsapp Account Webhook
      POST
    • Upgrade Whatsapp Account Plan
      POST
    • Suspend Whatsapp Account (Resellers Only)
      POST
    • Unsuspend Whatsapp Account (Resellers Only)
      POST
  • Messages
    • JSON Examples for Sending Messages
    • Get Conversations List
      GET
    • Get Conversation Messages
      GET
    • Get Received Messages
      GET
    • Get Received Message
      GET
    • Get Sent Messages
      GET
    • Get Sent Message
      GET
    • Send Message
      POST
    • Mark Message As Read
      POST
  • Media
    • Get Media
      GET
    • Upload Media
      POST
    • Delete Media
      DELETE
  • Templates
    • JSON Examples for Creating Templates
    • Get Templates
      GET
    • Get Template
      GET
    • Create New Template
      POST
    • Update Template
      POST
    • Delete Template
      DELETE
  • Billing
    • Get Pricing Plans
  • Embedded Inbox
    • Embedded Inbox - How To
    • Generate Embed Code
    • Generate Embed Token
  • Onboarding
    • Create Onboarding Invite
  • Schemas
    • Schemas
  1. Messages

JSON Examples for Sending Messages

Text Message:
{
    "preview_url": <ENABLE_LINK_PREVIEW>,
    "body": "<BODY_TEXT>"
}
Image Message:
{
    "id": "<MEDIA_ID>",
    "caption": "<MEDIA_CAPTION_TEXT>"
}
Video Message
{
    "id" : "<MEDIA_ID>",
    "caption": "<VIDEO_CAPTION_TEXT>"
}
Document Message
{
    "id": "<MEDIA_ID>",
    "caption": "<MEDIA_CAPTION_TEXT>",
    "filename": "<MEDIA_FILENAME>",
    "caption": "<MEDIA_CAPTION_TEXT>"
}
Audio Message
{
    "id": "<MEDIA_ID>"
}
Contacts Message
[
    {
        "addresses": [
            {
                "street": "<STREET_NUMBER_AND_NAME>",
                "city": "<CITY>",
                "state": "<STATE_CODE>",
                "zip": "<ZIP_CODE>",
                "country": "<COUNTRY_NAME>",
                "country_code": "<COUNTRY_CODE>",
                "type": "<ADDRESS_TYPE>"
            }
            <!-- Additional addresses objects go here -->
        ],
        "birthday": "<BIRTHDAY>",
        "emails": [
            {
                "email": "<EMAIL_ADDRESS>",
                "type": "<EMAIL_TYPE>"
            }
            <!-- Additional emails objects go here -->
        ],
        "name": {
            "formatted_name": "<FULL_NAME>",
            "first_name": "<FIRST_NAME>",
            "last_name": "<LAST_NAME>",
            "middle_name": "<MIDDLE_NAME>",
            "suffix": "<SUFFIX>",
            "prefix": "<PREFIX>"
        },
        "org": {
            "company": "<COMPANY_OR_ORG_NAME>",
            "department": "<DEPARTMENT_NAME>",
            "title": "<JOB_TITLE>"
        },
        "phones": [
            {
                "phone": "<PHONE_NUMBER>",
                "type": "<PHONE_NUMBER_TYPE>",
                "wa_id": "<WHATSAPP_USER_ID>"
            }
            <!-- Additional phones objects go here -->
        ],
        "urls": [
            {
              "url": "<WEBSITE_URL>",
              "type": "<WEBSITE_TYPE>"
            }
            <!-- Additional URLs go here -->
        ]
    }
]
Location Message
{
    "latitude": "<LOCATION_LATITUDE>",
    "longitude": "<LOCATION_LONGITUDE>",
    "name": "<LOCATION_NAME>",
    "address": "<LOCATION_ADDRESS>"
}
Reaction Message
{
    "message_id": "<WHATSAPP_MESSAGE_ID>",
    "emoji": "<EMOJI>"
}
Sticker Message
{
    "id": "<MEDIA_ID>"
}
Template Message with Named Parameters
{
    "name": "TEMPLATE_NAME",
    "language": {
        "code": "LANGUAGE_AND_LOCALE_CODE"
    },
    "components": [
        {
            "type": "body",
            "parameters": [
                {
                    "type": "text",
                    "parameter_name": "customer_name",
                    "text": "John"
                },
                {
                    "type": "text",
                    "parameter_name": "order_id",
                    "text": "9128312831"
                }        
            ]
        }
    ]
}
Template Message with Positional Parameters
{
    "name": "TEMPLATE_NAME",
    "language": {
        "code": "LANGUAGE_AND_LOCALE_CODE"
    },
    "components": [
        {
            "type": "body",
            "parameters": [
                {
                    "type": "text",
                    "text": "John"
                },
                {
                    "type": "text",
                    "text": "9128312831"
                }        
            ]
        }
    ]
}
Interactive Call-To-Action URL
{
    "type": "cta_url",
    <!-- If using document header, otherwise omit -->
    "header": {
        "type": "document",
        "document": {
            "id": "<MEDIA_ID>"
         }
    },
    <!-- If using image header, otherwise omit -->
    "header": {
        "type": "image",
        "image": {
            "id": "<MEDIA_ID>"
        }
    },
    <!-- If using text header, otherwise omit -->
    "header": {
        "type": "text",
        "text": "<HEADER_TEXT>"
        }
    },
    <!-- If using video header, otherwise omit -->
    "header": {
        "type": "video",
        "video": {
            "id": "<MEDIA_ID>"
        }
    },
    "body": {
        "text": "<BODY_TEXT>"
    },
    "action": {
        "name": "cta_url",
        "parameters": {
            "display_text": "<BUTTON_LABEL_TEXT>",
            "url": "<BUTTON_URL>"
        }
    },
    <!-- If using footer text, otherwise omit -->
    "footer": {
        "text": "<FOOTER_TEXT>"
    }
}
Interactive List
{
    "type": "list",
    "header": {
      "type": "text",
      "text": "<MESSAGE_HEADER_TEXT>"
    },
    "body": {
      "text": "<MESSAGE_BODY_TEXT>"
    },
    "footer": {
      "text": "<MESSAGE_FOOTER_TEXT>"
    },
    "action": {
        "button": "<BUTTON_TEXT>",
        "sections": [
            {
                "title": "<SECTION_TITLE_TEXT>",
                "rows": [
                    {
                        "id": "<ROW_ID>",
                        "title": "<ROW_TITLE_TEXT>",
                        "description": "<ROW_DESCRIPTION_TEXT>"
                    }
                    <!-- Additional rows would go here -->
                ]
            }
            <!-- Additional sections would go here -->
        ]
    }
}
Interactive Reply Buttons
{
    "type": "button",
    "header": {
        <MESSAGE_HEADER>
    },
    "body": {
      "text": "<BODY_TEXT>"
    },
    "footer": {
      "text": "<FOOTER_TEXT>"
    },
    "action": {
        "buttons": [
            {
                "type": "reply",
                "reply": {
                    "id": "<BUTTON_ID>",
                    "title": "<BUTTON_LABEL_TEXT>"
                }
            }
            <!-- Additional buttons would go here (maximum 3) -->
        ]
    }
}
Modified at 2025-07-30 07:35:57
Previous
Unsuspend Whatsapp Account (Resellers Only)
Next
Get Conversations List
Built with