Create an application

View as Markdown

Creates a new hosted application.

Full description

Creates a new hosted application. Because no appId exists until provisioning has assigned one, this endpoint returns 202 Accepted with an AppOperation resource carrying an operationId. Poll GET /app-operations/{operationId} until status is COMPLETED or FAILED. On COMPLETED the operation result includes the created Application with status: ACTIVE; use its id for any further calls. Currently only NODEJS and MHWP applications 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. For MHWP applications, a refused create names its reason in details[].issue. A 403 carries WORDPRESS_NOT_ENABLED when WordPress is not enabled for this account, or SUBSCRIPTION_INACTIVE when the Airo App Builder subscription is not active. A 409 carries MULTIPLE_SYSTEMS_AMBIGUOUS when the account's Airo App Builder subscription has more than one hosting system, so the target is ambiguous; CREATE_IN_PROGRESS when another create is in progress, so retry shortly; or IDEMPOTENCY_IN_PROGRESS while a request with the same Idempotency-Key is still in flight. A 422 carries SUBSCRIPTION_REQUIRED when the account has no Airo App Builder subscription; SYSTEM_INCONSISTENT when the account is not ready to add an app; APP_LIMIT_EXCEEDED when the account already has the maximum number of applications allowed for this product; or IDEMPOTENCY_KEY_MISMATCH when an Idempotency-Key is reused with a different body. A creation that fails after it is accepted ends the operation FAILED with error.details[].issue CAPACITY_UNAVAILABLE when no capacity is available to create the app, so retry later, or APP_CREATION_FAILED for any other failure.

POST
/apps

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT). Generate one from the developer dashboard. Pass as: Authorization: Bearer <token>.

In: header

Query Parameters

appType*AppType

Product type to scope the operation to.

Header Parameters

Idempotency-Key?string

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.

Formatuuid
traceparent?string

W3C 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.

Match^[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",    "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    }  ]}

Agent & Automation Notes

Scopeshosting.application:read, hosting.application:create, hosting.application:update, hosting.application:delete, hosting.source:write, hosting.deployment:execute, hosting.secret:write, hosting.log:read
Rate limit10–120 req/min per client IP depending on operation
On failureCreate app returns 202 with a job. Poll GET /app-operations/{operationId} until app is ready. Upload source and deployments return 202 with an operation ID. Poll the matching status endpoint until complete. DELETE /apps/{appId} returns 204; removal can continue in the background, after which GET returns 404. GET operations are safe to retry. Do not resubmit writes without checking current state.

Last updated on

How is this guide?