---
agentTools:
  projectIndex: https://getgrasp.readme.io/llms.txt
---

# Send WhatsApp message

Send WhatsApp message

# OpenAPI definition

````json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Grasp Api",
    "description": "This is a first version of the API to send custom events or order data into Grasp. All endpoints require authorization. Set the value for the ```api_key``` header with your personal key provided by Grasp.",
    "termsOfService": "https://getgrasp.com/terms/",
    "contact": {
      "email": "support@getgrasp.com"
    },
    "version": "1.1.1"
  },
  "externalDocs": {
    "description": "Grasp API confluence doc",
    "url": "https://casengo.atlassian.net/wiki/spaces/HOME/pages/1333723178/Casengo%2BAPI%2B2020%2BMVP"
  },
  "servers": [
    {
      "url": "https://app.getgrasp.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Message",
      "description": "Send messages"
    }
  ],
  "paths": {
    "/messages/whatsApp": {
      "post": {
        "tags": [
          "Message"
        ],
        "summary": "Send WhatsApp message",
        "description": "Send WhatsApp message",
        "operationId": "sendWhatsAppMessage",
        "requestBody": {
          "description": "WhatsApp message",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsAppMessage"
              },
              "examples": {
                "plainMessage": {
                  "value": {
                    "senderPhoneNumber": "123456789",
                    "recipientPhoneNumber": "123456789",
                    "message": "plain text message"
                  }
                },
                "templateMessage": {
                  "value": {
                    "senderPhoneNumber": "123456789",
                    "recipientPhoneNumber": "123456789",
                    "templateId": 123,
                    "templateParams": [
                      {
                        "name": "contactName",
                        "value": "contact param"
                      },
                      {
                        "name": "ownerName",
                        "value": "owner param"
                      }
                    ]
                  }
                },
                "mediaMessage": {
                  "value": {
                    "senderPhoneNumber": "123456789",
                    "recipientPhoneNumber": "123456789",
                    "mediaId": 123
                  }
                },
                "externalMediaMessage": {
                  "value": {
                    "senderPhoneNumber": "123456789",
                    "recipientPhoneNumber": "123456789",
                    "mediaLink": "https://upload.wikimedia.org/wikipedia/commons/6/63/Wikipedia-logo.png"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Message queued successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 96486
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Case does not exist",
            "content": {}
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "WhatsAppMessage": {
        "type": "object",
        "properties": {
          "senderPhoneNumber": {
            "type": "string",
            "example": "3168123456"
          },
          "recipientPhoneNumber": {
            "type": "string",
            "example": "3168123456"
          },
          "updateConvStatusOnSent": {
            "type": "object",
            "properties": {
              "exists": {
                "type": "string",
                "enum": [
                  "KEEP_SAME",
                  "NEW",
                  "OPEN",
                  "RESOLVED",
                  "CLOSED",
                  "DELETED"
                ]
              },
              "new": {
                "type": "string",
                "enum": [
                  "NEW",
                  "OPEN",
                  "RESOLVED",
                  "CLOSED",
                  "DELETED"
                ]
              }
            }
          },
          "updateTimestamp": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "hello!"
          },
          "templateId": {
            "type": "integer",
            "example": 96486
          },
          "templateParams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateParameter"
            }
          },
          "templateAttachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateAttachment"
            }
          },
          "mediaId": {
            "type": "integer",
            "format": "int64",
            "example": 96486
          },
          "mediaLink": {
            "type": "string",
            "example": "https://upload.wikimedia.org/wikipedia/commons/6/63/Wikipedia-logo.png"
          },
          "footer": {
            "type": "string",
            "example": "footer message!"
          },
          "header": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "example": "text",
                "enum": [
                  "text",
                  "image",
                  "document",
                  "video"
                ]
              },
              "text": {
                "type": "string",
                "example": "Header text!"
              }
            }
          },
          "interactive": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "example": "list | button",
                "enum": [
                  "list",
                  "button"
                ]
              },
              "button": {
                "type": "string",
                "example": "List Button Name"
              },
              "buttons": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Button"
                }
              },
              "sections": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Section"
                }
              }
            }
          }
        }
      },
      "TemplateParameter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "contactName"
          },
          "value": {
            "type": "string",
            "example": "John Doe"
          }
        }
      },
      "TemplateAttachment": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "File Name"
          },
          "mime": {
            "type": "string",
            "example": "image/png"
          },
          "type": {
            "type": "string",
            "example": "document"
          },
          "url": {
            "type": "string",
            "example": "www.google.com/image.png"
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "example": 96486
          }
        }
      },
      "SectionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "Unique ID"
          },
          "title": {
            "type": "string",
            "example": "Selection Title"
          },
          "description": {
            "type": "string",
            "example": "Selection Description"
          }
        }
      },
      "Button": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Button Title"
          },
          "id": {
            "type": "string",
            "example": "Unique ID"
          }
        }
      },
      "Section": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Section title"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SectionRow"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 149,
      "2": 223,
      "3": 215,
      "4": 223,
      "5": 75,
      "6": 167,
      "7": 157,
      "8": 126,
      "9": 122,
      "10": 47,
      "11": 119
    }
  }
}
````