# Line Broadcast

**Component explanation :**

| Field Name    | Description                                                                                                                                                                                       | Required                                |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| Authorization | Generated token id                                                                                                                                                                                | Yes                                     |
| name          | Name of your broadcast                                                                                                                                                                            | Yes                                     |
| channel       | Channel id of your used channel                                                                                                                                                                   | Yes                                     |
| sendingMode   | <p>the sending method you will use. <br>Currently there are 2 sending mode, i.e : send immediately (now)  and scheduled send (scheduled)</p><p></p><p>possible value: <em>Now, Scheduled</em></p> | Yes                                     |
| scheduledDate | <p>the date and time scheduled for sending broadcast.</p><p></p><p>Field format: "yyyy-mm-dd hh:mm:sss"</p>                                                                                       | Yes, when sending mode is *'Scheduled'* |
| templateId    | Id of the template that you want to use for your broadcast                                                                                                                                        | No                                      |
| recipient     | your recipient id                                                                                                                                                                                 | No                                      |
| content       | <p>the contents of your broadcast message.</p><p></p><p>Note : For Channel Line number of maximal content that can be send on a single broadcast is 5.</p>                                        | Yes                                     |

### Send Broadcast Text

| Method     | POST                                                  |
| ---------- | ----------------------------------------------------- |
| Media Type | application/json                                      |
| URL        | https\://\[server]/dolphin/apiv1/graph/broadcast&#xD; |
| Header     | Authorization: Bearer \[generatedToken]               |

#### Body :

```
{
    "name":"your-broadcast-name",
    "channel":"channel-used-for-broadcast",
    "sendingMode":"sending-mode",
    "scheduledDate":"2021-01-01 23:30:334", 
    "content" : [
        { 
        "type" : "text", 
        "message": "First broadcast" 
      } 
    ]
}
```

#### Response : 200

```
{
  "status": "success",
  "data": {
    "id": "[broadcast-id]"
  },
  "message": "Successfully make Broadcast Item",
  "hasMore": false,
  "nextIndex": 0,
  "prevIndex": 0,
  "totalResults": 0
}
```

### Send Broadcast Image

| Method     | POST                                                  |
| ---------- | ----------------------------------------------------- |
| Media Type | application/json                                      |
| URL        | https\://\[server]/dolphin/apiv1/graph/broadcast&#xD; |
| Header     | Authorization : Bearer \[generatedToken]              |

#### Body :

```
{
    "name":"your-broadcast-name",
    "channel":"channel-used-for-broadcast",
    "sendingMode":"sending-mode",
    "scheduledDate":"2021-01-01 23:30:334", 
    "content" : [
      {
        "type": "image",
        "url": "your-url-for-video", | url https, format jpg/png
      },
    ]
}
```

#### Response : 200

```
{
  "status": "success",
  "data": {
    "id": "[broadcast-id]"
  },
  "message": "Successfully make Broadcast Item",
  "hasMore": false,
  "nextIndex": 0,
  "prevIndex": 0,
  "totalResults": 0
}
```

### Send Broadcast Video

| Method     | POST                                                  |
| ---------- | ----------------------------------------------------- |
| Media Type | application/json                                      |
| URL        | https\://\[server]/dolphin/apiv1/graph/broadcast&#xD; |
| Header     | Authorization : Bearer \[generatedToken]              |

#### Body :

```
{
    "name":"your-broadcast-name",
    "channel":"channel-used-for-broadcast",
    "sendingMode":"sending-mode",
    "scheduledDate":"2021-01-01 23:30:334", 
    "content" : [
      {
            "type": "video",
            "url": "your-url-for-video", | url https, format mp4
            "thumbnailUrl" : "your-url-for-thumbnail"
        }
    ]
}
```

#### Response : 200

```
{
  "status": "success",
  "data": {
    "id": "[broadcast-id]"
  },
  "message": "Successfully make Broadcast Item",
  "hasMore": false,
  "nextIndex": 0,
  "prevIndex": 0,
  "totalResults": 0
}
```

### Create Multiple Broadcast

Multiple broadcast allow you to create more than one broadcast at once.&#x20;

| Method     | POST                                                                                                                                                      |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                          |
| URL        | https\://\[server]/dolphin/apiv1/graph/broadcast/multiple&#xD;[&#xD;](<https://venom.3dolphins.ai:9443/dolphin/apiv1/graph/broadcast/multiple&#xD;&#xA;>) |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                  |

#### Body :

```
[ 
*code for first broadcast request
{ 
"name":"your-broadcast-name", 
"channel":"channel-used-for-broadcast", 
"sendingMode":"sending-mode" Values: "Now" | "Scheduled"
"scheduledDate":"2021-01-01 23:30:334", | *Required when sendingMode is Scheduled 
"content" : [ 
     { 
        "type" : "text", 
        "message": "First broadcast" 
      } 
   ] 
},
*code for second broadcast request
{ 
"name":"your-broadcast-name", 
"channel":"channel-used-for-broadcast", 
"sendingMode":"sending-mode" Values: "Now" | "Scheduled"
"scheduledDate":"2021-01-01 23:30:334", | *Required when sendingMode is Scheduled 
"content" : [ 
     { 
        "type" : "text", 
        "message": "Second broadcast" 
      } 
   ] 
}
]
```

#### Response

Response status : 200

```
{
  "status": "success",
  "data": [
    {
      "id": "[id]",
      "message": "Successfully make Broadcast Item",
      "status": "success"
    },
     {
      "id": "[id]",
      "message": "Successfully make Broadcast Item",
      "status": "success"
    }
  ],
  "hasMore": false,
  "nextIndex": 0,
  "prevIndex": 0,
  "totalResults": 0
}
```

### Get Broadcast detail by ID

| Method     | GET                                                                                                                                                     |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                        |
| URL        | https\://\[server]/dolphin/apiv1/graph/broadcast/detail&#xD;[&#xD;](<https://venom.3dolphins.ai:9443/dolphin/apiv1/graph/broadcast/multiple&#xD;&#xA;>) |
| Header     | <p>Authorization : Bearer \[generatedToken]</p><p>Broadcast id: \[broadcast id]</p>                                                                     |

#### Response

Response status : 200

```
{
  "status": "success",
  "data": {
    "id": "220c056b362348311f6a2c24e9841d8d",
    "spell": [
      "your-broadcast-name",
      "[{\"textMessage\":\"Live Agent PerformanceLive agent performance is feature that make it easy for Supervisors to see data regarding agents’ overall performance in terms of chat time and wait time within a specific time period. This helps you gain an overview of how your agents have performed as a whole. In the live agent performance, you can view report based on perspective time or agent.See graphs with ‘numbers of ticket and activity time’ and detailed information on table with avg wait time, max wait time............... more than 500 char\",\"type\":\"text\"}]"
    ],
    "owner": "82ab0fd5cfd1e80d1ff97c0cfc9aa9e2",
    "createdDate": 1616662753000,
    "createdBy": "82ab0fd5cfd1e80d1ff97c0cfc9aa9e2",
    "modifiedDate": 1616662753635,
    "modifiedBy": "system",
    "actionDate": 1616662740000,
    "name": "your-broadcast-name",
    "message": "[{\"textMessage\":\"Live Agent PerformanceLive agent performance is feature that make it easy for Supervisors to see data regarding agents’ overall performance in terms of chat time and wait time within a specific time period. This helps you gain an overview of how your agents have performed as a whole. In the live agent performance, you can view report based on perspective time or agent.See graphs with ‘numbers of ticket and activity time’ and detailed information on table with avg wait time, max wait time............... more than 500 char\",\"type\":\"text\"}]",
    "status": "Sent",
    "channel": "f4c05f358e4d738785003b859f6ee618",
    "channelType": "Line @Account",
    "sendingMode": "Now",
    "scheduledDate": 1616662740000,
    "scheduledTime": "15:59"
  },
  "hasMore": false,
  "nextIndex": 0,
  "prevIndex": 0,
  "totalResults": 0
}
```


---

# 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.3dolphins.ai/api/service-api/marketing-api/create-line-broadcast.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.
