Deployments.ai Docs
Apps

Change an app's audience and serving settings (needs apps:publish)

PATCH /v1/apps/{appId}/publication · SDK setAppPublication · CLI deployments app set-publication

PATCH
/v1/apps/{appId}/publication

Requires apps:publish; admits human and service-account callers.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

appId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
audience?string
Value in"members""public"
serving?string
Value in"single-page""static-site"

Response Body

AppResponse

application/json
  1. response
access*
agentDefinitionId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
createdBy*
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
lifecycle*||||
name*string
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
publication*
slug*string
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
url*string
workspaceId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
curl -X PATCH "https://example.com/v1/apps/string/publication" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "access": {    "organizationMembers": "none"  },  "agentDefinitionId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "createdBy": {    "principalId": "string",    "runId": "string"  },  "environmentId": "string",  "id": "string",  "lifecycle": {    "requestedAt": "2019-08-24T14:15:22Z",    "state": "provisioning"  },  "name": "string",  "organizationId": "string",  "projectId": "string",  "publication": {    "audience": "members",    "serving": "single-page"  },  "slug": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "url": "string",  "workspaceId": "string"}