Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Create deployment

POST/v1/apps/{appId}/deploymentsCreate deployment

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Deprecated: use POST /v1/services/{serviceId}/deployments instead.

Creates a new deployment under the specified app. Returns a pre-signed upload URL for the artifact unless skipCodeUpload is set (which forks the active promoted deployment's artifact). Environment variables are resolved automatically from the app's attached Branch (production-class templates for the production Branch; preview-class templates for preview Branches). Manage env vars via the /v1/environment-variables endpoints, not as part of the deploy payload.

Parameters

appIdstringpathrequired

pattern ^(cps_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Request body

application/json
object
portMappingobject
Show child attributes
httpvalue
Show child attributes
anyOf · 2 options
Option 1integer

maximum 65535 · minimum 1

Option 2nullnullable
skipCodeUploadboolean
Example request
{
  "portMapping": {
    "http": 0
  },
  "skipCodeUpload": true
}

Responses

201Deployment created.application/json
object
dataobjectrequired
Show child attributes
foundryVersionIdstringrequired
idstringrequired
typestringrequired

const "deployment"

uploadUrlnull | stringrequired
urlstring · urirequired
Example response
{
  "data": {
    "foundryVersionId": "string",
    "id": "string",
    "type": "deployment",
    "uploadUrl": "string",
    "url": "https://example.com"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Insufficient permissions to access this resource.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404App not found, or the app's attached Branch has been deleted.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Validation failed (e.g. `skipCodeUpload` without an active promoted deployment, or the app is not attached to a Branch — env-var resolution requires a Branch).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
429Rate limit exceeded.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
500Internal error while resolving the deploy-time env vars (e.g., a master-key rotation or storage corruption prevents the project's wrapped DEK or a per-value envelope from being decrypted). Not a client-fixable condition.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu