Skip to main content

Create User

Endpoint: https://api.adcyma.com/v1/api/user
Method: POST
Description: Queues a new user for creation in your Entra ID tenant. The user is provisioned asynchronously. You'll get a 200 OK once the request is queued, and the actual Entra ID account is created shortly after.

Request Headers:

  • X-Company-ID: Your tenant identifier.
  • X-Api-User: API username.
  • X-Api-Key: API secret key.
  • Content-Type: application/json.

Request Body:

  • firstname (required): Given name of the new user.
  • surname (required): Family name of the new user.
  • middleName: Middle name.
  • jobTitle: Job title.
  • department: Department name.
  • company: Company name.
  • office: Office location.
  • city: City.
  • country: Country (ISO 3166-1 alpha-2 code recommended, e.g. SE).
  • streetAddress: Street address.
  • postalCode: Postal/ZIP code.
  • preferredLanguage: BCP-47 language tag, e.g. en-US, sv-SE.
  • accountEnabled: true to enable the account on creation, false to create it disabled. Defaults to true.
  • manager: UPN of the user's manager. The manager must already exist in your tenant.
  • date: Provisioning date in YYYY-MM-DD (Stockholm time). Combined with time to schedule when the user is created. Defaults to "now" if omitted.
  • time: Provisioning time in HH:mm (Stockholm time). Defaults to 00:00 if date is provided without time.

The userPrincipalName and mail for the new user are generated automatically using your tenant's configured username and email format. Domain comes from your tenant preferences.

Example Request:

POST /v1/api/user HTTP/1.1
Host: api.adcyma.com
X-Company-ID: AcmeAB-1f2c8a90
X-Api-User: integrations-bot
X-Api-Key: your-secret-key
Content-Type: application/json

{
"firstname": "John",
"surname": "Doe",
"jobTitle": "Software Engineer",
"department": "Engineering",
"office": "Stockholm",
"country": "SE",
"manager": "jane.smith@example.com",
"date": "2026-05-01",
"time": "08:00"
}

Response:

On success, the request is queued. The user will appear in Entra ID and the People Hub at the scheduled time.

Success Response (200 OK):

{
"data": {
"message": "User creation queued successfully"
}
}

Error Response (400 Bad Request):

{
"error": {
"code": "BAD_REQUEST",
"message": "Missing required fields: firstname, surname"
}
}

Error Response (401 Unauthorized):

{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API credentials"
}
}

Error Response (403 Forbidden):

{
"error": {
"code": "FORBIDDEN",
"message": "User seat limit reached. Please increase your seat limit in billing settings."
}
}

Error Response (429 Too Many Requests):

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests"
}
}