Skip to main content
POST
/
Agent
/
Account
/
Create
Create account
curl --request POST \
  --url https://{host}/Agent/Account/Create \
  --header 'Content-Type: application/json' \
  --data '
{
  "userName": "alice",
  "eMail": "alice@example.com",
  "phoneNr": "+46700000000",
  "password": "correct-horse-battery-staple",
  "apiKey": "your-api-key",
  "nonce": "random-unique-string-at-least-32-chars",
  "signature": "base64-hmac",
  "seconds": 3600,
  "language": "en"
}
'
{
  "created": "2024-08-02T10:22:11Z",
  "updated": "2024-08-02T10:22:11Z",
  "enabled": false,
  "canRelay": true,
  "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires": "2024-08-02T11:22:11Z",
  "eMailCodeSent": true,
  "phoneNrCodeSent": false
}

Overview

Creates a new agent account and logs the user in. The account behaves like a regular XMPP account. New accounts are disabled until their email address is verified. Phone verification is optional if a phone number is provided.

Authentication

This endpoint requires an API key and secret. Sign the request with HMAC-SHA256 using the API secret as the key. Signature message:
userName:host:eMail:password:apiKey:nonce

Notes

  • Protect your API key and secret. They should only be used from secure back-end services.
  • Each API key has a limit on how many accounts it can create.
  • If you cannot protect secrets (for example, in a browser), use CreateWebForm.

Body

application/json
userName
string
required
eMail
string
required
phoneNr
string
required
password
string
required
apiKey
string
required
nonce
string
required
signature
string
required
seconds
integer
required
language
string
required

Response

200 - application/json

Success

created
string
required
updated
string
required
enabled
boolean
required
canRelay
boolean
required
jwt
string
required
expires
string
required
eMailCodeSent
boolean
required
phoneNrCodeSent
boolean
required