Create a new Function resource.
A wrapper that represents a Serverless JavaScript function and groups the different and groups the different Versions of this code.
Create a new Function resource.
POST
/v1/Services/{ServiceSid}/Functions
curl \
--request POST 'https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'FriendlyName=function-friendly'
Request example
{"FriendlyName"=>"function-friendly"}
Response examples (201)
{
"sid": "ZH00000000000000000000000000000000",
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Functions/ZH00000000000000000000000000000000",
"links": {
"function_versions": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Functions/ZH00000000000000000000000000000000/Versions"
},
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ZS00000000000000000000000000000000",
"date_created": "2018-11-10T20:00:00Z",
"date_updated": "2018-11-10T20:00:00Z",
"friendly_name": "function-friendly"
}