---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/serverless/api/resource/build/build-status#article
headline: Build Status
description: API reference for the Build Status Resource. This allows you to track the status of a Build and understand when it is complete.
url: https://www.twilio.com/docs/serverless/api/resource/build/build-status
inLanguage: en
dateModified: 2026-03-09T18:47:22.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Build Status

The `/Status` endpoint for each Build lets you retrieve the status of that Build. We recommend using this endpoint to poll for the status, rather than the `/Builds` endpoint.

## Status Properties

<OperationTable type="properties" data={{"type":"object","refName":"serverless.v1.service.build.build_status","modelName":"serverless_v1_service_build_build_status","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](https://www.twilio.com/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_status_enum_status","modelName":"build_status_enum_status"},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Build Status resource."}}}} />

## Fetch a BuildStatus resource

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

### 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}]
```

Retrieve a specific Build resource

```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 at twilio.com/console
// Provision API Keys at twilio.com/console/runtime/api-keys
// and set the environment variables. See http://twil.io/secure
// For local testing, you can use your Account SID and Auth token
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const apiKey = process.env.TWILIO_API_KEY;
const apiSecret = process.env.TWILIO_API_SECRET;
const client = twilio(apiKey, apiSecret, { accountSid: accountSid });

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

  console.log(buildStatus.sid);
}

fetchBuildStatus();
```

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

# Find your Account SID at twilio.com/console
# Provision API Keys at twilio.com/console/runtime/api-keys
# and set the environment variables. See http://twil.io/secure
# For local testing, you can use your Account SID and Auth token
api_key = os.environ["TWILIO_API_KEY"]
api_secret = os.environ["TWILIO_API_SECRET"]
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
client = Client(api_key, api_secret, account_sid)

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

print(build_status.sid)
```

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

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

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID at twilio.com/console
        // Provision API Keys at twilio.com/console/runtime/api-keys
        // and set the environment variables. See http://twil.io/secure
        // For local testing, you can use your Account SID and Auth token
        string apiKey = Environment.GetEnvironmentVariable("TWILIO_API_KEY");
        string apiSecret = Environment.GetEnvironmentVariable("TWILIO_API_SECRET");
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");

        TwilioClient.Init(apiKey, apiSecret, accountSid);

        var buildStatus = await BuildStatusResource.FetchAsync(
            pathServiceSid: "ServiceSid", pathSid: "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(buildStatus.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.BuildStatus;

public class Example {
    // Find your Account SID at twilio.com/console
    // Provision API Keys at twilio.com/console/runtime/api-keys
    // and set the environment variables. See http://twil.io/secure
    // For local testing, you can use your Account SID and Auth token
    public static final String API_KEY = System.getenv("TWILIO_API_KEY");
    public static final String API_SECRET = System.getenv("TWILIO_API_SECRET");
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");

    public static void main(String[] args) {
        Twilio.init(API_KEY, API_SECRET, ACCOUNT_SID);
        BuildStatus buildStatus = BuildStatus.fetcher("ServiceSid", "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(buildStatus.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 at twilio.com/console
	// Provision API Keys at twilio.com/console/runtime/api-keys
	// and set the environment variables. See http://twil.io/secure
	// For local testing, you can use your Account SID and Auth token
	accountSid := os.Getenv("TWILIO_ACCOUNT_SID")
	apiKey := os.Getenv("TWILIO_API_KEY")
	apiSecret := os.Getenv("TWILIO_API_SECRET")
	client := twilio.NewRestClientWithParams(twilio.ClientParams{
		Username:   apiKey,
		Password:   apiSecret,
		AccountSid: accountSid,
	})

	resp, err := client.ServerlessV1.FetchBuildStatus("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 at twilio.com/console
// Provision API Keys at twilio.com/console/runtime/api-keys
// and set the environment variables. See http://twil.io/secure
// For local testing, you can use your Account SID and Auth token
$apiKey = $_ENV["TWILIO_API_KEY"];
$apiSecret = $_ENV["TWILIO_API_SECRET"];
$sid = $_ENV["TWILIO_ACCOUNT_SID"];
$twilio = new Client($apiKey, $apiSecret, $sid);

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

print $build_status->sid;
```

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

# Find your Account SID at twilio.com/console
# Provision API Keys at twilio.com/console/runtime/api-keys
# and set the environment variables. See http://twil.io/secure
# For local testing, you can use your Account SID and Auth token
api_key = ENV['TWILIO_API_KEY']
api_secret = ENV['TWILIO_API_SECRET']
account_sid = ENV['TWILIO_ACCOUNT_SID']
@client = Twilio::REST::Client.new(api_key, api_secret, account_sid)

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

puts build_status.sid
```

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

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

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

```json
{
  "sid": "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "service_sid": "ServiceSid",
  "status": "completed",
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
}
```
