# ส่ง push notification ด้วย User ID

หากต้องการส่ง push notification ไปยังรายชื่อผู้ใช้ คุณสามารถใช้การเรียก API [`/createMessage`](/th/developer/api-reference/messages-api/#createmessage) หรืออัปโหลดไฟล์ CSV ที่มี User ID ก็ได้

## การส่ง push notification ด้วย User ID ผ่าน API


### createMessage

<Aside type="tip">

โปรดทราบว่าพารามิเตอร์ของ [`/createMessage`](/th/developer/api-reference/messages-api/#createmessage) สามารถปรับแต่งได้อย่างเต็มที่ ดังนั้นคุณจึงสามารถสร้างข้อความ push ที่ปรับแต่งได้ตามความต้องการ

</Aside>


### พารามิเตอร์ของ Request body

| พารามิเตอร์ | คำอธิบาย |
| ----------- | ---------------------------------------------------------------------------------------------------------------- |
| application | Pushwoosh application ID ของคุณที่จะส่งข้อความไป |
| auth | API access token จาก Pushwoosh Control Panel |
| send\_date | ตั้งเวลาที่คุณต้องการให้ส่งข้อความ (ในรูปแบบ UTC) หรือใช้ 'now' เพื่อส่งทันที |
| content | ข้อความสำหรับ push notification ของคุณ |
| users | รายชื่อ User ID ที่จะส่งข้อความ push ของคุณไป คุณสามารถส่ง push ไปยัง User ID ได้สูงสุด 1,000 รายการในครั้งเดียว |

### ตัวอย่าง Request

```
{
	"request": {
		"application": "APPLICATION_CODE",
		"auth": "API_ACCESS_TOKEN",
		"notifications": [{
			"send_date": "now",
			"content": "Hello world!",
			"users":["external_user_1"]
		}]
	}
}
```

### ตัวอย่าง Response

```
{
   "status_code":200,
   "status_message":"OK",
   "response": {
      "Messages":["{Notification code}"]
   } 
}
```