# Predictive Outbound - edit task group

#### Interface Description

Create task group。

#### request parameters

| parameter name       | type     | Is it necessary | illustrate   |
| --- | --- | --- | --- |
| service | string | yes | App.Sip\_Queue.EditQueue |
| token | string | yes | The token obtained through the authorization interface |
| queuename | string | yes | task group name |
| remark | string | yes | task group ID |
| strategy | string | no | Ringing strategy: 1. The longest idle time ringing; 2. The shortest call time ringing; 3. Simultaneous ringing; 4. Round-robin ringing; 5. Sequential ringing; 6. Random ringing; Ringing; 8. Priority ringing. Default is 1 |
| announcefreq | string | no | Notification frequency (unit: second), the default is 30 |
| ringdelay | string | no | Ring delay (unit: second), the default is 30 |
| maxwaittime | string | no | Maximum wait time, default is 0 |
| withnoagenttime | string | no | No agent waiting timeout, the default is 0|
| noagentrejoiningtime | string | no | The call re-enters the task group time when there is no agent, the default is 5 |
| discardtime | string | no | The maximum discard time, the default is 90 |

#### Interface request example（PHP）

    <?php
        $apiUrl = 'http://127.0.0.1:8080';
        $postFields = [
            'service'   => 'App.Sip_Queue.EditQueue',
            'token'     => 'ABCDEFG',
            'queuename'     => 'queue-1',
            'remark'     => 'remark',
            'strategy'     => '1',
            'announcefreq'     => '30',
            'ringdelay'     => '30',
            'maxwaittime'     => '0',
            'withnoagenttime'     => '0',
            'noagentrejoiningtime'     => '5',
            'discardtime'     => '90',
        ];
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $apiUrl);
        curl_setopt($curl, CURLOPT_POST, 1);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        $response = curl_exec($curl);
        $curlError = curl_error($curl);
        curl_close($curl);
        var_dump($response);
    ?>
    

#### return data structure example

    {
        "ret": 200,
        "data": {
            "status": 0,
            "desc": "Successfully modified",
            "reqtime": 1587891639,
            "rsptime": 1587891639
        },
        "msg": ""
    }
    

#### Return parameter description

| parameter name | type | illustrate |
| --- | --- | --- |
| desc | string | result description |