Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

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

status-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
sidSID<ZB>

Optional

Not PII

The unique string that we created to identify the Build resource.

Pattern: ^ZB[0-9a-fA-F]{32}$Min length: 34Max length: 34

accountSidSID<AC>

Optional

The SID of the Account that created the Build resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

serviceSidSID<ZS>

Optional

The SID of the Service that the Build resource is associated with.

Pattern: ^ZS[0-9a-fA-F]{32}$Min length: 34Max length: 34

statusenum<string>

Optional

The status of the Build. Can be: building, completed, or failed.

Possible values:
buildingcompletedfailed

urlstring<uri>

Optional

The absolute URL of the Build Status resource.


Fetch a BuildStatus resource

fetch-a-buildstatus-resource page anchor

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

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
serviceSidstring
required

The SID of the Service to fetch the Build resource from.


sidSID<ZB>
required

The SID of the Build resource to fetch.

Pattern: ^ZB[0-9a-fA-F]{32}$Min length: 34Max length: 34
Retrieve a specific Build resourceLink to code sample: Retrieve a specific Build resource
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID at twilio.com/console
5
// Provision API Keys at twilio.com/console/runtime/api-keys
6
// and set the environment variables. See http://twil.io/secure
7
// For local testing, you can use your Account SID and Auth token
8
const accountSid = process.env.TWILIO_ACCOUNT_SID;
9
const apiKey = process.env.TWILIO_API_KEY;
10
const apiSecret = process.env.TWILIO_API_SECRET;
11
const client = twilio(apiKey, apiSecret, { accountSid: accountSid });
12
13
async function fetchBuildStatus() {
14
const buildStatus = await client.serverless.v1
15
.services("ServiceSid")
16
.builds("ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
17
.buildStatus()
18
.fetch();
19
20
console.log(buildStatus.sid);
21
}
22
23
fetchBuildStatus();

Response

Note about this response
1
{
2
"sid": "ZBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"service_sid": "ServiceSid",
5
"status": "completed",
6
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
7
}