> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/api/build-and-publish-api/build.md).

# Build

Trigger builds for campaigns, pages, and custom components. Builds compile shop assets ready for publishing.

## Build Campaigns and Pages

> This API allows you to build Limio Campaigns and Pages in bulk, without needing to build them one by one. You can build multiple campaigns and pages at once by providing an array of items to build. This can be useful for building multiple campaigns and pages at once, for example, when you want to build a set of campaigns and pages for a new product launch.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Build","description":"Trigger builds for campaigns, pages, and custom components. Builds compile shop assets ready for publishing."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.\n\nObtain a token via the OAuth flow described in [OAuth Bearer Token](https://docs.limio.com/developers/api-documentation/authentication-overview/oauth-bearer-token).\n\nPass the token in the `Authorization` header: `Bearer <token>`"}},"schemas":{"BuildShopResponse":{"type":"object","properties":{"buildPaths":{"type":"array","description":"The list of campaigns and pages built"},"id":{"type":"string","description":"The unique identifier of the build"},"success":{"type":"boolean","description":"Indicates if the build has been completed"}}}},"responses":{"401Response":{"description":"Unauthorized: the request lacks valid authentication credentials. This response is returned by the API gateway before the request reaches the application. Verify your Bearer token is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"502Response":{"description":"Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error description."}}}}}}}},"paths":{"/shop/builds":{"post":{"description":"This API allows you to build Limio Campaigns and Pages in bulk, without needing to build them one by one. You can build multiple campaigns and pages at once by providing an array of items to build. This can be useful for building multiple campaigns and pages at once, for example, when you want to build a set of campaigns and pages for a new product launch.","operationId":"buildShop","summary":"Build Campaigns and Pages","tags":["Build"],"requestBody":{"description":"The paths of the items you want to build - for example, campaigns (starting with /offers) and pages (starting with /pages).","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The list of campaigns and pages to build"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildShopResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```

## Get Custom Component Builds

> Retrieve build information for custom components deployed to your Limio environment. Optionally filter by a specific commit hash to see the build status of a particular code revision. When the build has a test report, the response includes the result of each component, with the failure message for each component that did not build.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Build","description":"Trigger builds for campaigns, pages, and custom components. Builds compile shop assets ready for publishing."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.\n\nObtain a token via the OAuth flow described in [OAuth Bearer Token](https://docs.limio.com/developers/api-documentation/authentication-overview/oauth-bearer-token).\n\nPass the token in the `Authorization` header: `Bearer <token>`"}},"parameters":{"commitHash":{"in":"query","name":"commitHash","description":"Will retrieve the build information for the specified commit hash.","schema":{"type":"string"}}},"schemas":{"RepositoryComponentBuildsResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the build","items":{"type":"string"}},"buildNumber":{"type":"string","description":"The build number of the build"},"commitId":{"type":"string","description":"The commit id which triggered the build"},"startTime":{"type":"string","description":"Indicates the time the build started"},"endTime":{"type":"string","description":"Indicates the time the build ended"},"buildStatus":{"type":"string","description":"Indicates the status of the build","enum":["SUCCEEDED","FAILED","FAULT","TIMED_OUT","IN_PROGRESS","STOPPED"]},"buildComplete":{"type":"boolean","description":"Indicates if the build has been completed"},"logErrors":{"type":"array","description":"Any error messages that occurred during the build, which may prevent the shop from building successfully"},"components":{"type":"array","description":"The result of each component in the build, from the build's test report. The error field carries the component's build or install failure message. Reports expire 30 days after the build, so older builds do not include this field.","items":{"type":"object","properties":{"name":{"type":"string","description":"The component's directory name in the component repository"},"status":{"type":"string","description":"The result of this component's build","enum":["SUCCEEDED","FAILED"]},"durationMs":{"type":"number","description":"The component's build time in milliseconds"},"error":{"type":"string","description":"The build or install failure message. Only present when the component failed."}}}}}}},"responses":{"401Response":{"description":"Unauthorized: the request lacks valid authentication credentials. This response is returned by the API gateway before the request reaches the application. Verify your Bearer token is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404RepositoryResponse":{"description":"Builds not found","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","description":"The unique identifier of the request"},"code":{"type":"string","description":"The error code"},"message":{"type":"string","description":"The error message"}}}}}}}},"paths":{"/component/builds":{"get":{"operationId":"getRepositoryComponentBuilds","summary":"Get Custom Component Builds","tags":["Build"],"description":"Retrieve build information for custom components deployed to your Limio environment. Optionally filter by a specific commit hash to see the build status of a particular code revision. When the build has a test report, the response includes the result of each component, with the failure message for each component that did not build.","parameters":[{"$ref":"#/components/parameters/commitHash","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryComponentBuildsResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"404":{"$ref":"#/components/responses/404RepositoryResponse"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.limio.com/api/build-and-publish-api/build.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
