# Publish

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

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