It looks like you need to change the method, data, and request variables. If you don't care what the response is (to display an error code or something), then you don't even need to define a signal for this command. The length is optional, I'm not sure if a Content-Length=0 is required in this instance. My guess is probably not, so I don't think changes to the sockets are necessary.
on @*:text:!commercial*:#:{
if ($nick isop #) twitch.commercial # $iif($2 isnum,$2)
}
alias twitch.commercial {
var %chan = $1, %length = $2
...
hadd %sockname request /kraken/channels/ $+ $mid(%chan,2-) $+ /commercial
hadd %sockname method POST
if (%length) hadd %sockname data length= $+ %length
...
}
You will need to request a new auth code with scope channel_commercial in addition to the other scopes.
Edit: Going to add the new scope myself for testing, I noticed that in my first post I said to use
http://localhost as the redirect url, but then in the link to get the token the url contains
http://localhost/ - this trailing slash matters and must match in both places.