Create an application
View as MarkdownCreates a new hosted application.
Full description
Creates a new hosted application. Because no
appIdexists until provisioning has assigned one, this endpoint returns202 Acceptedwith anAppOperationresource carrying anoperationId. PollGET /app-operations/{operationId}untilstatusisCOMPLETEDorFAILED. OnCOMPLETEDthe operation result includes the createdApplicationwithstatus: ACTIVE; use itsidfor any further calls. Currently onlyNODEJSandMHWPapplications can be created through this endpoint. The request body is product-specific; the fields below apply to Node.js and MHWP. Support for additional product types will be documented when those paths are available. ANODEJScreate takes an optionalhostingProductquery parameter.WEB_HOSTINGasks for an application on a Web Hosting plan.AIROasks for an Airo App Builder application, which publishes against an Airo plan. A plan is bought outside this API. WhenhostingProductis omitted, the service chooses. Customers with an existing Web Hosting plan keep gettingWEB_HOSTING. Everyone else getsAIROwhere it is offered. SethostingProductexplicitly to get a particular product. A request for either value that cannot be served returns422with adetails[].issue, and nothing is created.AIRO_NOT_AVAILABLEis the code forAIRO.WEB_HOSTINGis not guaranteed to stay available to customers without a Web Hosting plan, so clients should handle the422for it. ForMHWPapplications, a refused create names its reason indetails[].issue. A403carriesWORDPRESS_NOT_ENABLEDwhen WordPress is not enabled for this account, orSUBSCRIPTION_INACTIVEwhen the Airo App Builder subscription is not active. A409carriesMULTIPLE_SYSTEMS_AMBIGUOUSwhen the account's Airo App Builder subscription has more than one hosting system, so the target is ambiguous;CREATE_IN_PROGRESSwhen another create is in progress, so retry shortly; orIDEMPOTENCY_IN_PROGRESSwhile a request with the sameIdempotency-Keyis still in flight. A422carriesSUBSCRIPTION_REQUIREDwhen the account has no Airo App Builder subscription;SYSTEM_INCONSISTENTwhen the account is not ready to add an app;APP_LIMIT_EXCEEDEDwhen the account already has the maximum number of applications allowed for this product; orIDEMPOTENCY_KEY_MISMATCHwhen anIdempotency-Keyis reused with a different body. A creation that fails after it is accepted ends the operationFAILEDwitherror.details[].issueCAPACITY_UNAVAILABLEwhen no capacity is available to create the app, so retry later, orAPP_CREATION_FAILEDfor any other failure.
Authorization
bearerAuth Personal Access Token (PAT). Generate one from the developer dashboard. Pass as: Authorization: Bearer <token>.
In: header
Query Parameters
Product type to scope the operation to.
The product that hosts the new application. appType=NODEJS only, and appType=MHWP rejects it with 400. A value the customer can't use is refused with 422 and a details[].issue, and nothing is created. Not the same as the hostingProduct filter on GET /subscriptions, which takes WEB_HOSTING and MANAGED_WORDPRESS.
Header Parameters
Client-generated UUID that makes a request safe to retry. Supplying the same key on a retry with an identical request body returns the original response without triggering a second operation. Retrying with the same key while the first request is still in flight returns 409 Conflict with details[].issue IDEMPOTENCY_IN_PROGRESS. Reusing a key with a different request body returns 422 Unprocessable Entity with details[].issue IDEMPOTENCY_KEY_MISMATCH. Keys are retained for 24 hours after the operation completes, after which the key may be reused.
uuidW3C Trace Context identifier for this request. Clients should send a traceparent on every request so the trace can be correlated across services. See https://www.w3.org/TR/trace-context/ for the format.
^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$Request Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/apps?appType=NODEJS" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "operationId": "string", "type": "CREATE_APP", "status": "PENDING", "app": { "id": "NODEJS-aBcDeFgHiJ", "hostingProduct": "WEB_HOSTING", "status": "CREATING", "region": "na", "createdAt": "stringstringstringst", "links": [ { "href": "http://example.com", "rel": "string", "title": "string", "targetMediaType": "string", "targetSchema": null, "method": "string", "submissionMediaType": "application/json", "submissionSchema": null } ] }, "error": { "name": "string", "correlationId": "string", "message": "string", "informationLink": "string", "details": [ { "field": "string", "value": "string", "location": "body", "issue": "string", "description": "string" } ], "links": [ { "href": "http://example.com", "rel": "string", "title": "string", "targetMediaType": "string", "targetSchema": null, "method": "string", "submissionMediaType": "application/json", "submissionSchema": null } ] }, "createdAt": "stringstringstringst", "links": [ { "href": "http://example.com", "rel": "string", "title": "string", "targetMediaType": "string", "targetSchema": null, "method": "string", "submissionMediaType": "application/json", "submissionSchema": null } ]}Last updated on
How is this guide?