Get your free beta license ↗
API operation · php group
POST

/php/domains/move

First published 14 Oct 20260.2.0Unchanged since publication

Queue a job to move domains to a PHP version or the server default

Who may call it
AdministratorResellerCustomer
Token scope, any of
settingsall
Answers202 Accepted

Select domains by name in domains, by the php_version, follows_default, q, or owner filters, or by setting all to true. The domains field accepts up to 5000 names. A nonempty q can contain up to 200 characters and excludes U+0000 through U+001F.

The to field must name an installed, visible PHP version or use the value default. The value default makes the selected domains follow the server's default PHP version. Returns 400 for a missing or invalid selection or destination.

Returns 202 with the php-move job. The job moves domains one at a time and reports a result for each domain.

As a command

Run as root on the server

Request body

JSON ·PhpDomainsMove· 7 fields
tostring, matching ^(?:[5-9]\.[0-9]|default)$Required
Installed PHP version available for customers to select, in major.minor format, or default to make the domains follow the server's default PHP version.
allboolean
Whether to select every domain from the unfiltered list.
domainsarray of string, up to 253 characters
Domain names to select explicitly.
follows_defaultboolean
Whether to select every domain that follows the server's default PHP version.
Owner username used to restrict the selection to that owner's domains.
php_versionstring, matching ^[5-9]\.[0-9]$
PHP version in major.minor format used to select every domain running that version.
qstring, up to 200 characters
Text to match within the domain name or the owner's username.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/php/domains/move" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "all": true,
    "domains": [
      "text"
    ],
    "follows_default": true,
    "owner": "alice",
    "php_version": "8.4",
    "q": "text",
    "to": "text"
  }'
Response · 202 Accepted
{
  "job": {
    "created_at": "2026-09-09T10:15:00Z",
    "created_by": 1,
    "created_by_name": "text",
    "dismissed_at": "text",
    "finished_at": "2026-09-09T10:15:04Z",
    "id": 1,
    "lane": "short",
    "log": "",
    "params": {},
    "progress": 100,
    "result": {},
    "started_at": "2026-09-09T10:15:01Z",
    "status": "queued",
    "type": "rebuild",
    "usual_seconds": 1
  }
}

Errors

21 errors, each a status and a sentence
400A new job is queued or running
400Domain name required
400Domain name too long
400Invalid <what>:
400Invalid PHP version, expected e.g. 8.2
400Invalid domain name
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Job parameters must be an object
400Name the domains, give the filter that picks them (php_version, follows_default, q, owner), or all
400PHP <to> is hidden from new choices on this server
400PHP <to> is not installed on this server
400Unknown PHP version '
400Unknown PHP version '<v>'
400Unknown PHP version '<version>'
400Unknown job type
400Username '<value>' is reserved
400domains is a list of up to 5000 names
400q is a text of up to 200 characters
400to is a PHP version, or default
401Authentication required
404User '<user>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/post-php-domains-move/