# Adding a stream name group to transcoder\`s template using cURL through terminal

**URL:** <https://community.wowza.com/t/adding-a-stream-name-group-to-transcoder-s-template-using-curl-through-terminal/38274>\
**Category:** Wowza Developer Dojo\
**Created:** [July 12, 2016, 6:46pm UTC](https://community.wowza.com/t/adding-a-stream-name-group-to-transcoder-s-template-using-curl-through-terminal/38274 "2016-07-12T18:46:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Smirnov](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Ivan\_Smirnov](https://community.wowza.com/u/Ivan_Smirnov)\
**Post date:** [July 12, 2016, 6:46pm UTC](https://community.wowza.com/t/adding-a-stream-name-group-to-transcoder-s-template-using-curl-through-terminal/38274/1 "2016-07-12T18:46:52Z")

</div>

Hello!

When I execute in terminal:

```auto
curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Accept:application/json; charset=utf-8' http://wowza-server:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/myapplication/transcoder/templates/mytemplate/streamnamegroups/test01 -d '{
  "name": "test01",
  "serverName": "_defaultServer_",
  "description": "test01",
  "streamName": "test01_all",
  "Members": [
{
      "wowzaVideoOnly": false,
      "wowzaAudioOnly": false,
      "encodeName": "720p",
      "memberName": "720p"
    }
  ]
}'

```

I receive a error:

```auto
{"message":"The server encountered an unexpected condition which prevented it from fulfilling the request","success":false,"wowzaServer":"4.4.1.02","code":"500"}

```

But If I run the same command from rest-api documentation it succeeded.

Could you help me, please? What’s wrong with my cURL code?

Thank you!

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [August 10, 2016, 8:45pm UTC](https://community.wowza.com/t/adding-a-stream-name-group-to-transcoder-s-template-using-curl-through-terminal/38274/2 "2016-08-10T20:45:42Z")

</div>

Hi,

It looks like you have two Accept headers in your command. You will need to make sure that you pass a Content-Type header with your REST API POST request, and specify that you are passing a JSON formatted data.

For example, try:

```auto
curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://wowza-server:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/myapplication/transcoder/templates/mytemplate/streamnamegroups/test01 -d '{
  "name": "test01",
  "serverName": "_defaultServer_",
  "description": "test01",
  "streamName": "test01_all",
  "Members": [
{
      "wowzaVideoOnly": false,
      "wowzaAudioOnly": false,
      "encodeName": "720p",
      "memberName": "720p"
    }
  ]
}'

```

Michelle

---

<div class="post-metadata">

**Author:** ![Ivan\_Smirnov](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Ivan\_Smirnov](https://community.wowza.com/u/Ivan_Smirnov)\
**Post date:** [September 13, 2016, 7:00pm UTC](https://community.wowza.com/t/adding-a-stream-name-group-to-transcoder-s-template-using-curl-through-terminal/38274/3 "2016-09-13T19:00:14Z")

</div>

Michelle,

Your answer helped. Thank you very much!
