# POST /php/domains/notify

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the php group.

Email domain owners about PHP security support end dates

- Who may call it: administrator
- Token scope, any of: settings, all
- Answers: 200 OK

This operation requires an administrator and a token with the settings scope.

Use domains to select domains by name, php_version to select domains running a version such as 8.2, follows_default to select domains that follow the server's default PHP version, or all to select every domain. The q filter matches part of a domain name or alias, or the owner's full username. The owner filter selects domains owned by the specified account.

The operation returns 400 if no selection is provided, domains contains more than 5000 names, or q exceeds 200 characters or contains a character from U+0000 through U+001F.

UrbeStack notifies owners of selected domains running PHP versions whose security support has ended or ends in fewer than 120 days. The result counts domains skipped because their PHP version falls outside this window. Each owner receives one message at the email address on their account. It lists their affected domains and the date security support ends or ended for each version. It also explains how to switch to the server's default PHP version in the Domains section of the web interface.

If preview is true, the operation returns 200 with the messages that would be sent and sends no email. Otherwise, it queues a php-notify job and returns 202 with the job ID in the job field. The job records each owner's delivery result and updates its progress in the Jobs section.

When the job has owners to notify, UrbeStack sends one summary to administrators subscribed to php.version_ending. The summary shows each owner's delivery status, including missing email addresses and sending failures.

## As commands

- [urbestack-php-notify](https://urbestack.com/docs/commands/urbestack-php-notify.md): Emails owners of selected domains running PHP versions whose security support has ended or ends in fewer than 120 days.
- [urbestack-php-notify](https://urbestack.com/docs/commands/urbestack-php-notify.md): Emails owners of selected domains running PHP versions whose security support has ended or ends in fewer than 120 days.

## Request body

JSON, the type [PhpDomainsNotify](https://urbestack.com/docs/api/types/PhpDomainsNotify.md).

- `all` (boolean): Whether to select every domain from the unfiltered list.
- `domains` (array of string, up to 253 characters): Domain names to select explicitly.
- `follows_default` (boolean): Whether to select every domain that follows the server's default PHP version.
- `owner` (Username): Owner username used to restrict the selection to that owner's domains.
- `php_version` (string, matching ^[5-9]\.[0-9]$): PHP version in major.minor format used to select every domain running that version.
- `preview` (boolean): Whether to return a preview of the emails as they would be sent, without sending them.
- `q` (string, up to 200 characters): Text to match within the domain name or the owner's username.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/php/domains/notify" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "all": true,
    "domains": [
      "text"
    ],
    "follows_default": true,
    "owner": "alice",
    "php_version": "8.4",
    "preview": true,
    "q": "text"
  }'
```

Response, 200 OK:

```
{}
```

## Errors

- 400: A new job is queued or running
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid <what>: 
- 400: Invalid <what>: expected a non-negative integer
- 400: Invalid PHP version, expected e.g. 8.2
- 400: Invalid domain name
- 400: Invalid setting key
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Job parameters must be an object
- 400: Name the domains (--domain), give the filter that picks them (--version, --follows-default, --q, --owner), or --all
- 400: Name the domains, give the filter that picks them (php_version, follows_default, q, owner), or all
- 400: Unknown PHP version '<version>'
- 400: Unknown job type
- 400: Username '<value>' is reserved
- 400: domains is a list of up to 5000 names
- 400: per_page is a number from 1 to 1000
- 400: q is a text of up to 200 characters
- 401: Authentication required
- 404: Setting '<key>' not found
- 404: User '<user>' not found
