---
agentTools:
  projectIndex: https://docs.nvecta.com/llms.txt
---

# Send to an Individual User

This endpoint is used to send an email campaign to an individual user based on their user ID. The user_id and email_campaign are required parameters for this API.  You need to create the campaign from NotifyVisitors panel and use the campaign_id in email_campaign parameter.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "<h2>This Email REST API can be used to :</h2> <p>Send email to all users/a list of users/users belonging to a particular segment, or even an individual user</p>\n<p>All requests to the API will be authenticated by an authentication token in a request header, as explained in the next section.</p>",
    "version": "1.0.0",
    "title": "Email API",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "email": "info@notifyvisitors.com"
    }
  },
  "paths": {
    "/sendMessage": {
      "post": {
        "tags": [
          "Email API"
        ],
        "summary": "Send to an Individual User",
        "description": "this endpoint can send email or sms campaigns to specific users on the basis of their userid",
        "operationId": "sendMessage",
        "parameters": [
          {
            "name": "x-brand-id",
            "in": "header",
            "description": "Brand id of notifyvisitors account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "description": "Api key of notifyvisitors",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sendMessage"
              }
            }
          },
          "description": "Body Parameter",
          "required": true
        },
        "responses": {
          "200": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_200"
                }
              }
            }
          },
          "400": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_400"
                }
              }
            }
          },
          "401": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_401"
                }
              }
            }
          },
          "403": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_403"
                }
              }
            }
          },
          "500": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_500"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://mail.notifyvisitors.com/api/v1"
    }
  ],
  "components": {
    "schemas": {
      "sendMessage": {
        "type": "object",
        "properties": {
          "email_campaign": {
            "type": "integer",
            "format": "int64",
            "description": "email camapign ID"
          },
          "sms_campaign": {
            "type": "integer",
            "format": "int64",
            "description": "sms campaign ID"
          },
          "userID": {
            "type": "integer",
            "format": "int64",
            "description": "userid of user"
          },
          "time": {
            "type": "integer",
            "format": "int64",
            "description": "time after which camapign send in seconds."
          }
        }
      },
      "inline_response_200": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Success",
            "description": "Success"
          },
          "status": {
            "type": "number",
            "example": 200,
            "description": "200"
          }
        }
      },
      "inline_response_400": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Bad Request",
            "description": "Bad Request"
          },
          "status": {
            "type": "number",
            "example": 400,
            "description": "400"
          }
        }
      },
      "inline_response_401": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Missing Parameter",
            "description": "Missing Parameter"
          },
          "status": {
            "type": "number",
            "example": 401,
            "description": "401"
          }
        }
      },
      "inline_response_403": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Require Parameters Missing",
            "description": "Require Parameters Missing"
          },
          "status": {
            "type": "number",
            "example": 403,
            "description": "403"
          }
        }
      },
      "inline_response_500": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Something Went Wrong",
            "description": "Something Went Wrong"
          },
          "status": {
            "type": "number",
            "example": 500,
            "description": "500"
          }
        }
      }
    }
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-enabled": true,
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python"
  ],
  "_id": {
    "buffer": {
      "0": 95,
      "1": 218,
      "2": 8,
      "3": 240,
      "4": 30,
      "5": 83,
      "6": 23,
      "7": 0,
      "8": 17,
      "9": 99,
      "10": 223,
      "11": 142
    }
  }
}
```