> 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/publish.md).

# Publish

Publish built campaigns and pages to make them live on your storefront. Requires a prior successful build.

## Get Published Catalog Item

> Returns the currently published version of an offer, add-on, or discount. Responds with \`404\` if the item is not currently published. Use this to check whether an item is live and which version is published before publishing again.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Publish","description":"Publish built campaigns and pages to make them live on your storefront. Requires a prior successful build."}],"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>`"}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/objects/limio/{path_type}/{id}/published":{"get":{"operationId":"getPublishedCatalogItem","summary":"Get Published Catalog Item","description":"Returns the currently published version of an offer, add-on, or discount. Responds with `404` if the item is not currently published. Use this to check whether an item is live and which version is published before publishing again.","tags":["Publish"],"responses":{"200":{"description":"The published version record for the item."},"401":{"$ref":"#/components/responses/401Response"},"404":{"description":"The item is not currently published."}}}}}}
```

## Publish Catalog Item

> Publishes an offer, add-on, or discount directly, making the new version immediately live in Limio for Salesforce, upgrade and downgrade options, cross-sells and upsells, and purchase links. (Shop pages still require a page rebuild and republish for changes to appear.)\
> \
> There are two ways to publish:\
> \
> \- \*\*Recommended — publish from the catalog.\*\* Send \`path\` (the item's catalog path) together with \`expectedVersion\` (the version you last saved). Limio reads the item from the catalog at \`path\`, checks it still matches \`expectedVersion\`, and publishes exactly that content. If the item changed since you saved it (someone else saved in between), the request fails with \`409\` so you never publish content you have not reviewed.\
> \
> \- \*\*Publish a known version directly.\*\* Send \`version\` alone to publish an existing version record whose content you already vouch for.\
> \
> Provide either \`path\` + \`expectedVersion\`, or \`version\` — not both.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Publish","description":"Publish built campaigns and pages to make them live on your storefront. Requires a prior successful build."}],"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":{"PublishCatalogItemResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates whether the publish or unpublish operation succeeded."}}}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key 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":{"/objects/limio/{path_type}/{id}/published":{"put":{"operationId":"publishCatalogItem","summary":"Publish Catalog Item","description":"Publishes an offer, add-on, or discount directly, making the new version immediately live in Limio for Salesforce, upgrade and downgrade options, cross-sells and upsells, and purchase links. (Shop pages still require a page rebuild and republish for changes to appear.)\n\nThere are two ways to publish:\n\n- **Recommended — publish from the catalog.** Send `path` (the item's catalog path) together with `expectedVersion` (the version you last saved). Limio reads the item from the catalog at `path`, checks it still matches `expectedVersion`, and publishes exactly that content. If the item changed since you saved it (someone else saved in between), the request fails with `409` so you never publish content you have not reviewed.\n\n- **Publish a known version directly.** Send `version` alone to publish an existing version record whose content you already vouch for.\n\nProvide either `path` + `expectedVersion`, or `version` — not both.","tags":["Publish"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"The catalog path of the item to publish. Offers use the `/offers2/` prefix, add-ons `/add_ons/`, and discounts `/discounts/`. Must be sent together with `expectedVersion`."},"expectedVersion":{"type":"string","description":"The version (content hash) you last saved. The publish fails with `409` if the item's current version no longer matches. Required when `path` is provided."},"version":{"type":"string","description":"Publish an existing version record directly, by its version hash. Use this instead of `path` + `expectedVersion`."}}}}}},"responses":{"200":{"description":"The item was published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCatalogItemResponse"}}}},"400":{"description":"Bad request — for example the item at `path` does not have the given `id`, is not the expected type, or a publish rule failed (for instance a discount whose linked Stripe coupon is out of sync)."},"401":{"$ref":"#/components/responses/401Response"},"409":{"description":"The item changed since it was last saved. Reload it, review the changes, and save before publishing."},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```

## Unpublish Catalog Item

> Unpublishes an offer, add-on, or discount, removing its published version so it is no longer live.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Publish","description":"Publish built campaigns and pages to make them live on your storefront. Requires a prior successful build."}],"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":{"PublishCatalogItemResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates whether the publish or unpublish operation succeeded."}}}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key 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":{"/objects/limio/{path_type}/{id}/published":{"delete":{"operationId":"unpublishCatalogItem","summary":"Unpublish Catalog Item","description":"Unpublishes an offer, add-on, or discount, removing its published version so it is no longer live.","tags":["Publish"],"responses":{"200":{"description":"The item was unpublished.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCatalogItemResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```

## Publish Campaigns and Pages

> This API allows you to publish campaigns and pages in Limio. You can use this API to publish campaigns and pages to make them live on your website. This can be useful for activities such as launching new products, promoting sales, or creating seasonal campaigns.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Publish","description":"Publish built campaigns and pages to make them live on your storefront. Requires a prior successful build."}],"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":{"PublishCampaignResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates whether the operation was successful"},"publishedData":{"type":"object","description":"Contains the published data","properties":{"pages":{"type":"object","description":"Contains the published pages","additionalProperties":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The path of the published page"},"isDefault":{"type":"boolean","description":"Indicates whether the page is the default page"},"pathPrefix":{"type":"string","description":"The path prefix of the published page"},"type":{"type":"string","description":"The type of the published item"},"codebuildId":{"type":"string","description":"The codebuild ID associated with the published page"},"buildDate":{"type":"string","format":"date-time","description":"The build date of the published page"},"name":{"type":"string","description":"The name of the published page"},"publishedDate":{"type":"string","format":"date-time","description":"The date and time when the page was published"},"userName":{"type":"string","description":"The username of the user who published the page"}}}}}}},"ommitedWithError":{"type":"object","description":"Contains information about omitted items with errors","properties":{"pages":{"type":"object","description":"Contains information about omitted pages with errors"}}}}}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key 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":{"/publish":{"post":{"description":"This API allows you to publish campaigns and pages in Limio. You can use this API to publish campaigns and pages to make them live on your website. This can be useful for activities such as launching new products, promoting sales, or creating seasonal campaigns.","operationId":"publishCampaign","summary":"Publish Campaigns and Pages","tags":["Publish"],"requestBody":{"description":"The tags of the campaigns / pages that you want to publish","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","description":"The list of campaigns and pages to publish"},"buildId":{"type":"string","description":"The build ID of the campaigns and pages to publish"},"name":{"type":"string","description":"The name of one of the campaigns / pages to be published"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCampaignResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
