# Build

Builds are packages of [Functions](/docs/serverless/api/resource/function) and [Assets](/docs/serverless/api/resource/asset) that you bundle together for deployment. Builds contain [Function Version](/docs/serverless/api/resource/function-version) SIDs, [Asset Version](/docs/serverless/api/resource/asset-version) SIDs, and [Dependencies](/docs/serverless/functions-assets/functions/dependencies).

Dependencies are defined as JSON strings, for example:

```bash
'[{"name": "randomcolor","version":"0.5.4" },
 {"name": "util","version":"0.10.3" },
 {"name": "xmldom","version":"0.1.27" },
 {"name": "got","version":"6.7.1" },
 {"name": "fs","version":"0.0.1-security" },
 {"name": "lodash","version":"4.17.11" },
 {"name": "date-fns","version":"1.30.1" }]'
```

Builds take time to package, deploy, and be verified. After creating a Build, it is best to poll every second to check the Build's status. When a Build is verified, it is ready to be used in a Deployment.

## List of Build statuses

| Build status | Meaning                                                             |
| ------------ | ------------------------------------------------------------------- |
| `Building`   | Build request is being processed by the packager.                   |
| `Completed`  | We have run a health check on the uploaded package and verified it. |
| `Failed`     | Packaging has failed at any of the above steps.                     |

## Build Properties

```json
{"type":"object","refName":"serverless.v1.service.build","modelName":"serverless_v1_service_build","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^ZB[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the Build resource."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that created the Build resource."},"service_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^ZS[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the Service that the Build resource is associated with."},"status":{"type":"string","enum":["building","completed","failed"],"description":"The status of the Build. Can be: `building`, `completed`, or `failed`.","refName":"build_enum_status","modelName":"build_enum_status"},"asset_versions":{"type":"array","nullable":true,"description":"The list of Asset Version resource SIDs that are included in the Build."},"function_versions":{"type":"array","nullable":true,"description":"The list of Function Version resource SIDs that are included in the Build."},"dependencies":{"type":"array","nullable":true,"description":"A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency."},"runtime":{"type":"string","enum":["node8","node10","node12","node14","node16","node18","node20","node22"],"description":"The Runtime version that will be used to run the Build resource when it is deployed.","refName":"build_enum_runtime","modelName":"build_enum_runtime"},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the Build resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the Build resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Build resource."},"links":{"type":"object","format":"uri-map","nullable":true}}}
```

## Create a Build resource

`POST https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds`

### Path parameters

```json
[{"name":"ServiceSid","in":"path","description":"The SID of the Service to create the Build resource under.","schema":{"type":"string"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateBuildRequest","properties":{"AssetVersions":{"type":"array","description":"The list of Asset Version resource SIDs to include in the Build.","items":{"type":"string","minLength":34,"maxLength":34,"pattern":"^ZN[0-9a-fA-F]{32}$"}},"FunctionVersions":{"type":"array","description":"The list of the Function Version resource SIDs to include in the Build.","items":{"type":"string","minLength":34,"maxLength":34,"pattern":"^ZN[0-9a-fA-F]{32}$"}},"Dependencies":{"type":"string","description":"A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency."},"Runtime":{"type":"string","description":"The Runtime version that will be used to run the Build resource when it is deployed."}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"AssetVersions\": [\n    \"ZN00000000000000000000000000000000\"\n  ],\n  \"FunctionVersions\": [\n    \"ZN00000000000000000000000000000001\"\n  ],\n  \"Dependencies\": \"[{\\\"name\\\":\\\"twilio\\\", \\\"version\\\":\\\"3.29.2\\\"}, {\\\"name\\\":\\\"@twilio/runtime-handler\\\", \\\"version\\\": \\\"1.0.1\\\"}]\"\n}","meta":"","code":"{\n  \"AssetVersions\": [\n    \"ZN00000000000000000000000000000000\"\n  ],\n  \"FunctionVersions\": [\n    \"ZN00000000000000000000000000000001\"\n  ],\n  \"Dependencies\": \"[{\\\"name\\\":\\\"twilio\\\", \\\"version\\\":\\\"3.29.2\\\"}, {\\\"name\\\":\\\"@twilio/runtime-handler\\\", \\\"version\\\": \\\"1.0.1\\\"}]\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"AssetVersions\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"ZN00000000000000000000000000000000\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"FunctionVersions\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"ZN00000000000000000000000000000001\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"Dependencies\"","#7EE787"],[":","#C9D1D9"]," ",["\"[{","#A5D6FF"],["\\\"","#79C0FF"],["name","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["twilio","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"]," ",["\\\"","#79C0FF"],["version","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["3.29.2","#A5D6FF"],["\\\"","#79C0FF"],["}, {","#A5D6FF"],["\\\"","#79C0FF"],["name","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["@twilio/runtime-handler","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"]," ",["\\\"","#79C0FF"],["version","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"]," ",["\\\"","#79C0FF"],["1.0.1","#A5D6FF"],["\\\"","#79C0FF"],["}]\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

> \[!NOTE]
>
> You must specify *all* Function or Asset Versions when creating a Build. Builds only use the provided Versions, and do not reference the Versions used by previous Builds.

> \[!WARNING]
>
> In order to create a Build successfully, your request must include at least one Function Version, Asset Version, or a combination of both.
>
> If no Function or Asset Versions are indicated, you'll receive [Error 20001](/docs/api/errors/20001):
>
> `At least one Function Version or Asset Version is required for Build`

Create a Build

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createBuild() {
  const build = await client.serverless.v1
    .services("ServiceSid")
    .builds.create({
      assetVersions: ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
      functionVersions: ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    });

  console.log(build.sid);
}

createBuild();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

build = client.serverless.v1.services("ServiceSid").builds.create(
    function_versions=["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    asset_versions=["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
)

print(build.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Serverless.V1.Service;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var build = await BuildResource.CreateAsync(
            functionVersions: new List<string> { "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" },
            assetVersions: new List<string> { "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" },
            pathServiceSid: "ServiceSid");

        Console.WriteLine(build.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.Arrays;
import com.twilio.Twilio;
import com.twilio.rest.serverless.v1.service.Build;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Build build = Build.creator("ServiceSid")
                          .setFunctionVersions(Arrays.asList("ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
                          .setAssetVersions(Arrays.asList("ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
                          .create();

        System.out.println(build.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	serverless "github.com/twilio/twilio-go/rest/serverless/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &serverless.CreateBuildParams{}
	params.SetFunctionVersions([]string{
		"ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	})
	params.SetAssetVersions([]string{
		"ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	})

	resp, err := client.ServerlessV1.CreateBuild("ServiceSid",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$build = $twilio->serverless->v1->services("ServiceSid")->builds->create([
    "functionVersions" => ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    "assetVersions" => ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
]);

print $build->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

build = @client
        .serverless
        .v1
        .services('ServiceSid')
        .builds
        .create(
          function_versions: [
            'ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
          ],
          asset_versions: [
            'ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
          ]
        )

puts build.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:serverless:v1:services:builds:create \
   --service-sid ServiceSid \
   --function-versions ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --asset-versions ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X POST "https://serverless.twilio.com/v1/Services/ServiceSid/Builds" \
--data-urlencode "FunctionVersions=ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
--data-urlencode "AssetVersions=ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ZB00000000000000000000000000000000",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "service_sid": "ServiceSid",
  "asset_versions": [
    "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  ],
  "function_versions": [
    "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  ],
  "dependencies": [
    {
      "name": "twilio",
      "version": "3.29.2"
    },
    {
      "name": "@twilio/runtime-handler",
      "version": "1.0.1"
    }
  ],
  "runtime": "node22",
  "status": "building",
  "date_created": "2018-11-10T20:00:00Z",
  "date_updated": "2018-11-10T20:00:00Z",
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
  "links": {
    "build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
  }
}
```

Create a Build and specify Dependencies

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createBuild() {
  const build = await client.serverless.v1
    .services("ServiceSid")
    .builds.create({
      dependencies: JSON.stringify([
        { name: "twilio", version: "3.71.2" },
        { name: "@twilio/runtime-handler", version: "1.2.1" },
      ]),
      functionVersions: ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    });

  console.log(build.dependencies);
}

createBuild();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
import json

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

build = client.serverless.v1.services("ServiceSid").builds.create(
    function_versions=["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    dependencies=json.dumps(
        [
            {"name": "twilio", "version": "3.71.2"},
            {"name": "@twilio/runtime-handler", "version": "1.2.1"},
        ]
    ),
)

print(build.dependencies)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Serverless.V1.Service;
using System.Threading.Tasks;
using System.Collections.Generic;
using Newtonsoft.Json;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var build = await BuildResource.CreateAsync(
            functionVersions: new List<string> { "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" },
            dependencies: JsonConvert.SerializeObject(
                new List<Object> {
                    new Dictionary<string, Object>() {
                        { "name", "twilio" }, { "version", "3.71.2" }
                    },
                    new Dictionary<string, Object>() {
                        { "name", "@twilio/runtime-handler" }, { "version", "1.2.1" }
                    }
                },
                Formatting.Indented),
            pathServiceSid: "ServiceSid");

        Console.WriteLine(build.Dependencies);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.Arrays;
import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.serverless.v1.service.Build;
import org.json.JSONObject;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Build build = Build.creator("ServiceSid")
                          .setFunctionVersions(Arrays.asList("ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
                          .setDependencies(new JSONObject(Arrays.asList(
                                                              new HashMap<String, Object>() {
                                                                  {
                                                                      put("name", "twilio");
                                                                      put("version", "3.71.2");
                                                                  }
                                                              },
                                                              new HashMap<String, Object>() {
                                                                  {
                                                                      put("name", "@twilio/runtime-handler");
                                                                      put("version", "1.2.1");
                                                                  }
                                                              }))
                                  .toString())
                          .create();

        System.out.println(build.getDependencies());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"encoding/json"
	"fmt"
	"github.com/twilio/twilio-go"
	serverless "github.com/twilio/twilio-go/rest/serverless/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	Dependencies, DependenciesError := json.Marshal([]interface{}{
		map[string]interface{}{
			"name":    "twilio",
			"version": "3.71.2",
		},
		map[string]interface{}{
			"name":    "@twilio/runtime-handler",
			"version": "1.2.1",
		},
	})

	if DependenciesError != nil {
		fmt.Println(DependenciesError)
		os.Exit(1)
	}

	params := &serverless.CreateBuildParams{}
	params.SetFunctionVersions([]string{
		"ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	})
	params.SetDependencies(string(Dependencies))

	resp, err := client.ServerlessV1.CreateBuild("ServiceSid",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Dependencies != nil {
			for _, item := range *resp.Dependencies {
				fmt.Println(item)
			}
		} else {
			fmt.Println(resp.Dependencies)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$build = $twilio->serverless->v1->services("ServiceSid")->builds->create([
    "functionVersions" => ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    "dependencies" => json_encode([
        [
            "name" => "twilio",
            "version" => "3.71.2",
        ],
        [
            "name" => "@twilio/runtime-handler",
            "version" => "1.2.1",
        ],
    ]),
]);

print $build->dependencies;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

build = @client
        .serverless
        .v1
        .services('ServiceSid')
        .builds
        .create(
          function_versions: [
            'ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
          ],
          dependencies: [
              {
                'name' => 'twilio',
                'version' => '3.71.2'
              },
              {
                'name' => '@twilio/runtime-handler',
                'version' => '1.2.1'
              }
            ].to_json
        )

puts build.dependencies
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:serverless:v1:services:builds:create \
   --service-sid ServiceSid \
   --function-versions ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --dependencies [{\"name\":\"twilio\",\"version\":\"3.71.2\"},{\"name\":\"@twilio/runtime-handler\",\"version\":\"1.2.1\"}]
```

```bash
DEPENDENCIES_OBJ=$(cat << EOF
{
  "0": {
    "name": "twilio",
    "version": "3.71.2"
  },
  "1": {
    "name": "@twilio/runtime-handler",
    "version": "1.2.1"
  }
}
EOF
)
curl -X POST "https://serverless.twilio.com/v1/Services/ServiceSid/Builds" \
--data-urlencode "FunctionVersions=ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
--data-urlencode "Dependencies=$DEPENDENCIES_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ZB00000000000000000000000000000000",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "service_sid": "ServiceSid",
  "asset_versions": [
    {
      "sid": "ZN00000000000000000000000000000000",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "service_sid": "ZS00000000000000000000000000000000",
      "asset_sid": "ZH00000000000000000000000000000000",
      "date_created": "2018-11-10T20:00:00Z",
      "path": "/asset-path",
      "visibility": "PUBLIC"
    }
  ],
  "function_versions": [
    "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  ],
  "dependencies": "[{\"name\":\"twilio\",\"version\":\"3.71.2\"},{\"name\":\"@twilio/runtime-handler\",\"version\":\"1.2.1\"}]",
  "runtime": "node22",
  "status": "building",
  "date_created": "2018-11-10T20:00:00Z",
  "date_updated": "2018-11-10T20:00:00Z",
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
  "links": {
    "build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
  }
}
```

Create a build with a specific Node.js runtime

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createBuild() {
  const build = await client.serverless.v1
    .services("ServiceSid")
    .builds.create({
      functionVersions: ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
      runtime: "node14",
    });

  console.log(build.sid);
}

createBuild();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

build = client.serverless.v1.services("ServiceSid").builds.create(
    function_versions=["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"], runtime="node14"
)

print(build.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Serverless.V1.Service;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var build = await BuildResource.CreateAsync(
            functionVersions: new List<string> { "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" },
            runtime: "node14",
            pathServiceSid: "ServiceSid");

        Console.WriteLine(build.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.Arrays;
import com.twilio.Twilio;
import com.twilio.rest.serverless.v1.service.Build;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Build build = Build.creator("ServiceSid")
                          .setFunctionVersions(Arrays.asList("ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
                          .setRuntime("node14")
                          .create();

        System.out.println(build.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	serverless "github.com/twilio/twilio-go/rest/serverless/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &serverless.CreateBuildParams{}
	params.SetFunctionVersions([]string{
		"ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	})
	params.SetRuntime("node14")

	resp, err := client.ServerlessV1.CreateBuild("ServiceSid",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$build = $twilio->serverless->v1->services("ServiceSid")->builds->create([
    "functionVersions" => ["ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    "runtime" => "node14",
]);

print $build->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

build = @client
        .serverless
        .v1
        .services('ServiceSid')
        .builds
        .create(
          function_versions: [
            'ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
          ],
          runtime: 'node14'
        )

puts build.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:serverless:v1:services:builds:create \
   --service-sid ServiceSid \
   --function-versions ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --runtime node14
```

```bash
curl -X POST "https://serverless.twilio.com/v1/Services/ServiceSid/Builds" \
--data-urlencode "FunctionVersions=ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
--data-urlencode "Runtime=node14" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ZB00000000000000000000000000000000",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "service_sid": "ServiceSid",
  "asset_versions": [
    {
      "sid": "ZN00000000000000000000000000000000",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "service_sid": "ZS00000000000000000000000000000000",
      "asset_sid": "ZH00000000000000000000000000000000",
      "date_created": "2018-11-10T20:00:00Z",
      "path": "/asset-path",
      "visibility": "PUBLIC"
    }
  ],
  "function_versions": [
    "ZNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  ],
  "dependencies": [
    {
      "name": "twilio",
      "version": "3.29.2"
    },
    {
      "name": "@twilio/runtime-handler",
      "version": "1.0.1"
    }
  ],
  "runtime": "node14",
  "status": "building",
  "date_created": "2018-11-10T20:00:00Z",
  "date_updated": "2018-11-10T20:00:00Z",
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
  "links": {
    "build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
  }
}
```

## Fetch a Build resource

`GET https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds/{Sid}`

### Path parameters

```json
[{"name":"ServiceSid","in":"path","description":"The SID of the Service to fetch the Build resource from.","schema":{"type":"string"},"required":true},{"name":"Sid","in":"path","description":"The SID of the Build resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^ZB[0-9a-fA-F]{32}$"},"required":true}]
```

Fetch a Build

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchBuild() {
  const build = await client.serverless.v1
    .services("ServiceSid")
    .builds("ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(build.sid);
}

fetchBuild();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

build = (
    client.serverless.v1.services("ServiceSid")
    .builds("ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch()
)

print(build.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Serverless.V1.Service;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var build = await BuildResource.FetchAsync(
            pathServiceSid: "ServiceSid", pathSid: "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(build.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.serverless.v1.service.Build;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Build build = Build.fetcher("ServiceSid", "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(build.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.ServerlessV1.FetchBuild("ServiceSid",
		"ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$build = $twilio->serverless->v1
    ->services("ServiceSid")
    ->builds("ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $build->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

build = @client
        .serverless
        .v1
        .services('ServiceSid')
        .builds('ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
        .fetch

puts build.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:serverless:v1:services:builds:fetch \
   --service-sid ServiceSid \
   --sid ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://serverless.twilio.com/v1/Services/ServiceSid/Builds/ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "service_sid": "ServiceSid",
  "asset_versions": [
    {
      "sid": "ZN00000000000000000000000000000000",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "service_sid": "ZS00000000000000000000000000000000",
      "asset_sid": "ZH00000000000000000000000000000000",
      "date_created": "2018-11-10T20:00:00Z",
      "path": "/asset-path",
      "visibility": "PUBLIC"
    }
  ],
  "function_versions": [
    {
      "sid": "ZN00000000000000000000000000000001",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "service_sid": "ZS00000000000000000000000000000000",
      "function_sid": "ZH00000000000000000000000000000001",
      "date_created": "2018-11-10T20:00:00Z",
      "path": "/function-path",
      "visibility": "PUBLIC"
    }
  ],
  "dependencies": [
    {
      "name": "twilio",
      "version": "3.29.2"
    },
    {
      "name": "@twilio/runtime-handler",
      "version": "1.0.1"
    }
  ],
  "runtime": "node22",
  "status": "building",
  "date_created": "2018-11-10T20:00:00Z",
  "date_updated": "2018-11-10T20:00:00Z",
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
  "links": {
    "build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
  }
}
```

## Read multiple Build resources

`GET https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds`

### Path parameters

```json
[{"name":"ServiceSid","in":"path","description":"The SID of the Service to read the Build resources from.","schema":{"type":"string"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

List multiple Builds

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listBuild() {
  const builds = await client.serverless.v1
    .services("ServiceSid")
    .builds.list({ limit: 20 });

  builds.forEach((b) => console.log(b.sid));
}

listBuild();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

builds = client.serverless.v1.services("ServiceSid").builds.list(limit=20)

for record in builds:
    print(record.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Serverless.V1.Service;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var builds = await BuildResource.ReadAsync(pathServiceSid: "ServiceSid", limit: 20);

        foreach (var record in builds) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.serverless.v1.service.Build;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Build> builds = Build.reader("ServiceSid").limit(20).read();

        for (Build record : builds) {
            System.out.println(record.getSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	serverless "github.com/twilio/twilio-go/rest/serverless/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &serverless.ListBuildParams{}
	params.SetLimit(20)

	resp, err := client.ServerlessV1.ListBuild("ServiceSid",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$builds = $twilio->serverless->v1->services("ServiceSid")->builds->read(20);

foreach ($builds as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

builds = @client
         .serverless
         .v1
         .services('ServiceSid')
         .builds
         .list(limit: 20)

builds.each do |record|
   puts record.sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:serverless:v1:services:builds:list \
   --service-sid ServiceSid
```

```bash
curl -X GET "https://serverless.twilio.com/v1/Services/ServiceSid/Builds?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "builds": [],
  "meta": {
    "first_page_url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds?PageSize=50&Page=0",
    "key": "builds",
    "next_page_url": null,
    "page": 0,
    "page_size": 50,
    "previous_page_url": null,
    "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds?PageSize=50&Page=0"
  }
}
```

## Delete a Build resource

`DELETE https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds/{Sid}`

### Path parameters

```json
[{"name":"ServiceSid","in":"path","description":"The SID of the Service to delete the Build resource from.","schema":{"type":"string"},"required":true},{"name":"Sid","in":"path","description":"The SID of the Build resource to delete.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^ZB[0-9a-fA-F]{32}$"},"required":true}]
```

Delete a Build

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function deleteBuild() {
  await client.serverless.v1
    .services("ServiceSid")
    .builds("ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .remove();
}

deleteBuild();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

client.serverless.v1.services("ServiceSid").builds(
    "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).delete()
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Serverless.V1.Service;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        await BuildResource.DeleteAsync(
            pathServiceSid: "ServiceSid", pathSid: "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.serverless.v1.service.Build;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Build.deleter("ServiceSid", "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete();
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	err := client.ServerlessV1.DeleteBuild("ServiceSid",
		"ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$twilio->serverless->v1
    ->services("ServiceSid")
    ->builds("ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->delete();
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client
  .serverless
  .v1
  .services('ServiceSid')
  .builds('ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  .delete
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:serverless:v1:services:builds:remove \
   --service-sid ServiceSid \
   --sid ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X DELETE "https://serverless.twilio.com/v1/Services/ServiceSid/Builds/ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
