---
title: "Register a new user"
type: reference
method: POST
path: /rest-api/register-user/{key}/{hash}/{timestamp}.do
tag: "Users"
---

# Register a new user

`POST https://YOUR-NETWORK-DOMAIN/rest-api/register-user/{key}/{hash}/{timestamp}.do`

Creates a new user account via the public REST API. Authentication uses the public/private key pair set in the network's white-label settings: the 'key' path variable must match the public key, and 'hash' must equal MD5(username + password + email + privateKey + timestamp). The timestamp must be within 5 minutes of the server's current time to prevent replay attacks. If the network does not require a password on sign-up and none is provided, a random password is generated. On success, the user is created, sign-up notifications are sent, and the response includes the tracking user ID if tracking info is provided. For demo accounts, the new user is automatically granted CAN_VIEW shares to configured demo advertisers and sites.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `key` | string | yes | `abc123publickey` | The network's public key, as set in its white-label settings. |
| `hash` | string | yes | `d41d8cd98f00b204e9800998ecf8427e` | Data integrity hash, computed as MD5(username + password + email + privateKey + timestamp), where privateKey is the network's private key. Used to verify the request was signed with the correct private key and data has not been tampered with. |
| `timestamp` | integer | yes | `1700000000000` | UNIX timestamp in milliseconds when the request was created. Must be within 5 minutes of the server's current time to prevent replay attacks. |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `role` | string | no | `ADVERTISER` | User role type (ADMIN, ADVERTISER, PUBLISHER, NETWORK) |
| `aclRole` | integer | no | `3` | ACL role defining user permissions — ID of the acl role |
| `accountUIStyle` | string | no | `TREES` | UI layout style preference (TREES, GRIDS) |
| `active` | boolean | no | `true` | Whether the user account is active |
| `additionalRecipients` | string | no | `alerts@example.com,manager@example.com` | Comma-separated list of additional notification email recipients |
| `additionalRecipientsPresent` | boolean | no | `true` | Whether additional email recipients are configured for notifications |
| `adsHost` | string | no | `ads.example.com` | Custom ad serving domain for this user |
| `advancedAnalyticsView` | string | no | `SIMPLE` | Advanced analytics view mode (SIMPLE, EXTENDED, UNIQUE) |
| `campaignSetupMasked` | boolean | no | `true` | Mask campaign setup details in the UI |
| `comments` | string | no | `VIP client, priority support` | Internal notes and comments about the user |
| `compactMode` | boolean | no | `false` | Compact UI density preference; null means the client keeps its own default |
| `company` | string | no | `Acme Corp` | Company name |
| `country` | string | no | `US` | Two-letter country code (ISO 3166-1 alpha-2) |
| `darkTheme` | boolean | no | `false` | Dark color theme preference; null means the client keeps its own default |
| `email` | string | no | `user@example.com` | User email address (must be unique) |
| `firstName` | string | no | `John` | First name |
| `hideReferralDetails` | boolean | no | `true` | Hide referral details from the user's dashboard |
| `lastName` | string | no | `Smith` | User's last (family) name |
| `locale` | string | no | `en` | User preferred UI locale/language (BCP-47 tag); when empty, the network's default language applies, then English |
| `owner` | integer | no | `500` | Parent/owner user (for sub-accounts) — ID of the user |
| `password` | string | no | `s3cur3P@ss` | User password (8-64 characters) |
| `paymentsAccountData` | string | no | `{"paypal":"payments@example.com"}` | Payment account data (bank/PayPal details as JSON) |
| `permissions` | array<string> | no | `MANAGE_BANNERS,MANAGE_CAMPAIGNS` | User-level permission overrides |
| `phone` | string | no | `+1234567890` | Phone number |
| `publisherCategories` | string | no | `10,20,35` | Publisher category IDs (transient, comma-separated) |
| `receiveNewsletter` | boolean | no | `true` | Opt in to receive newsletter emails |
| `receiveNotificationsByEmail` | boolean | no | `true` | Receive system notifications by email |
| `referer` | string | no | `https://partner-site.com/signup` | Referrer URL that brought the user to sign up |
| `referralId` | integer | no | `42` | Referral user ID if this user was referred by another user |
| `referralShareEnabled` | boolean | no | `true` | Whether referral revenue sharing is enabled for this user |
| `referredClientStatus` | string | no | `UNDER_REVIEW` | Referred client status tracking the referral lifecycle |
| `state` | string | no | `California` | State or province |
| `tracking.campaign` | string | no | `spring_sale` | Campaign tracking parameter (UTM campaign name) |
| `tracking.page` | string | no | `/pricing` | Landing page tracking parameter |
| `tracking.term` | string | no | `ad+server` | Search term tracking parameter (UTM term) |
| `userTemplates` | array<integer> | no | `1,2,5` | Notification email templates assigned to this user — IDs of the notification template entities, comma-separated or as repeated parameters |
| `username` | string | no | `john_doe` | Login username (must be unique) |
| `websiteUrl` | string | no | `https://www.example.com` | Website URL |
| `confirmPassword` | string | no | `s3cur3P@ss` | Password confirmation. Must match the 'password' field exactly; otherwise a validation error is returned. |

## Responses

- `200` — User registered successfully (includes 'result' message) or validation errors returned in 'errors' map
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error — the key does not match the network's public key, or the hash does not match
- `404` — Not found — resource does not exist

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/register-user/abc123publickey/d41d8cd98f00b204e9800998ecf8427e/1700000000000.do' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'email=user@example.com' \
  --data-urlencode 'password=s3cur3P@ss' \
  --data-urlencode 'username=john_doe' \
  --data-urlencode 'role=ADVERTISER' \
  --data-urlencode 'aclRole=3' \
  --data-urlencode 'accountUIStyle=TREES'
```

Source: https://epom.com/ad-server/docs/api/users/post-register-user