The Laravel Cloud API and CLI are here. Build pipelines, manage environments, and hand off to AI agents. View the docs →
cURL
curl --request POST \ --url https://cloud.laravel.com/api/applications/{application}/environments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "branch": "<string>", "name": "<string>", "cluster_id": "<string>" } '
{ "data": { "id": "<string>", "type": "environments", "links": { "self": { "href": "<string>", "rel": "<string>", "describedby": "<string>", "title": "<string>", "type": "<string>", "hreflang": "<string>", "meta": {} } }, "relationships": {} }, "included": [ { "id": "<string>", "type": "applications", "relationships": {} } ] }
Create a new environment.
The Bearer Token generated on the Cloud UI.
The application identifier
1 - 40
^[A-Za-z0-9 _-]+$
The identifier of a dedicated cluster to deploy to. Only fill it if your organization has a dedicated cluster and you want to use it for this environment.
EnvironmentResource
Show child attributes
Was this page helpful?