# Send ZNS

{% hint style="info" %}
**Note:**

* For APIs used for Shop, the API key is: [`<api_key>`](/api-etelecom-english/api-integration/shop/account.md). The base\_url information of the [Shop](/api-etelecom-english/api-integration/shop/account.md).
* For APIs used for Partner, the API key is: [`<shop_key>`](/api-etelecom-english/api-integration/partner/usage.md#retrieve-the-shop_key-information). The base\_url information of the [Partner](/api-etelecom-english/api-integration/partner/account.md).
  {% endhint %}

**Request:**

```
curl --location '$BASE_URL.Zalo/SendZNS' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "mode": "unknown",
  "oa_id": "string",
  "phone": "string",
  "sending_mode": "unknown",
  "template_data": {
    "property1": "string",
    "property2": "string"
  },
  "template_id": "<int>",
  "tracking_id": "<string>"
}'
```

**Response:**

```
{
  "campaign_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "delivery_status": "unknown",
  "delivery_time": "2019-08-24T14:15:22Z",
  "error_code": 0,
  "error_message": "string",
  "fee_main": 0,
  "fee_token": 0,
  "id": "string",
  "is_charged": true,
  "is_development": true,
  "journey_id": "string",
  "msg_id": "string",
  "oa_id": "string",
  "phone": "string",
  "sent_time": "2019-08-24T14:15:22Z",
  "sending_mode": "unknown",
  "shop_id": "string",
  "status": "Z",
  "template_data": {
    "property1": "string",
    "property2": "string"
  },
  "template_id": 0,
  "timeout": 0,
  "tracking_id": "string",
  "type": "unknown",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "string"
}
```

**Request body structure**

<table><thead><tr><th width="140">Parameters</th><th width="100">Data type</th><th>Describe</th></tr></thead><tbody><tr><td>mode</td><td>string</td><td><p><strong>Enum: "unknown" "development"</strong> <strong>development</strong> : When you need to send a ZNS sample for testing before sending it officially, you can call the ZNS API command in development mode. Development mode only supports sending a ZNS sample to the application administrator or OA administrator.</p><p>If the mode parameter is not passed, defaults <strong>to mode = unknown</strong></p></td></tr><tr><td>id</td><td>int64</td><td>OA ID</td></tr><tr><td>template_id</td><td>int</td><td>ID of the message</td></tr><tr><td>sending_mode</td><td>string</td><td>Send mode:</td></tr><tr><td>phone</td><td>string</td><td>Recipient phone number</td></tr><tr><td>template_data</td><td>object</td><td><p>Properties of the message you registered with Zalo</p><p>Note: The template_data structure is specified separately for each message.</p></td></tr><tr><td>tracking_id</td><td>string</td><td>Your API call tracking number, defined by you. You can use tracking_id for reconciliation without depending on the message_id provided by eTelecom.</td></tr></tbody></table>

| Value     | Send mode name  | Describe                                                                                                                                                     |
| --------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| "unknown" | Unknown         | Unknown                                                                                                                                                      |
| "default" | Regular Send    | ZNS messages are sent in the usual manner.                                                                                                                   |
| "tag3"    | Send over limit | Mechanism to allow OA to send ZNS tag 3 messages exceeding the limit Note: Sending over limit mode (sending\_mode = "tag3") only applies to whitelisted OAs. |

**Return data attribute structure**

<table><thead><tr><th width="148">Parameters</th><th width="166">Data type</th><th>Describe</th></tr></thead><tbody><tr><td>id</td><td>int64</td><td>Message ID on eTelecom system</td></tr><tr><td>shop_id</td><td>int64</td><td>Store ID on eTelecom system</td></tr><tr><td>user_id</td><td>int64</td><td>Sender ID on eTelecom system</td></tr><tr><td>campaign_id</td><td>int64</td><td>Campaign ID</td></tr><tr><td>delivery_status</td><td>string</td><td><p><strong><code>Unkown</code></strong>: Unknown</p><p><strong><code>Received</code></strong>: Received </p><p><strong><code>Seen</code></strong>: Viewed</p></td></tr><tr><td>delivery_time</td><td>string&#x3C;date-time></td><td>Time the user's device receives the ZNS notification</td></tr><tr><td>error_code</td><td>int</td><td>Error code</td></tr><tr><td>error_message</td><td>string</td><td>Error message</td></tr><tr><td>fee_main</td><td>int</td><td>Main fee</td></tr><tr><td>fee_token</td><td>int</td><td>Token Creation Fee</td></tr><tr><td>is_charged</td><td>boolean</td><td><p><strong><code>True</code></strong>: ZNS News is charged</p><p><strong><code>False</code></strong>: ZNS news is free of charge</p></td></tr><tr><td>is_development</td><td>boolean</td><td><p><strong><code>True</code></strong>: ZNS message in experimental development mode</p><p><strong><code>False</code></strong>: ZNS message is not in beta development mode</p></td></tr><tr><td>journey_id</td><td>string</td><td>Journey ID</td></tr><tr><td>msg_id</td><td>string</td><td>ZNS message ID</td></tr><tr><td>type</td><td>string</td><td><p><strong><code>template</code></strong>: ZNS usually</p><p><strong><code>journey</code></strong>: ZNS journey</p></td></tr><tr><td>status</td><td>string</td><td><p>Status </p><p><strong><code>Z</code></strong>: Newly created </p><p><strong><code>P</code></strong>: Enable </p><p><strong><code>N</code></strong>: Disable</p></td></tr><tr><td>template_data</td><td>object</td><td>Message parameters</td></tr><tr><td>phone</td><td>string</td><td>Recipient phone number</td></tr><tr><td>sent_time</td><td>string&#x3C;date-time></td><td>ZNS notification sending time</td></tr><tr><td>sending_mode</td><td>string</td><td><p>Value included:</p><ul><li>"unknown": Unknown</li><li>"default": ZNS messages are sent in the usual way</li><li>"tag3": ZNS message sent by over-limit mechanism</li></ul></td></tr><tr><td>template_id</td><td>integer</td><td>ID of the message</td></tr><tr><td>timeout</td><td>integer</td><td>Maximum time required by the system to process the request</td></tr><tr><td>tracking_id</td><td>string</td><td>Your API call tracking number, defined by you. You can use tracking_id for reconciliation without depending on the message_id provided by eTelecom.</td></tr><tr><td>updated_at</td><td>string&#x3C;date-time></td><td>Update date</td></tr><tr><td>created_at</td><td>string&#x3C;date-time></td><td>Date created</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.etelecom.vn/api-etelecom-english/api-integration/zalo-cloud/zalo-cloud-api/send-zns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
