Skip to main content
POST
/
v1
/
user
Create User
curl --request POST \
  --url https://api.example.com/v1/user \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "contact": "user@example.com",
    "internalId": "internal-user-123",
    "identity": {
      "fullName": "John Doe",
      "birth": "1990-01-01",
      "docId": "1234567890",
      "countryAlpha3": "PRT"
    }
  },
  {
    "contact": "+351912345678",
    "internalId": "internal-user-456"
  }
]
'
[
  {
    "status": 200,
    "message": "Subject created",
    "user": {
      "contact": "user@example.com",
      "did": "did:via:humanos:user-abc123",
      "internalId": "internal-12345"
    }
  }
]

Body

application/json

Array of subjects to create. Each subject represents a user to be imported into Humanos

contact
string
required

Contact value (email or phone)

Example:

"user@example.com"

internalId
string

Identifier to help you identify the user in your own system. We recommend using a unique value.

Example:

"internal-12345"

identity
IdentityDto · object

Identity information to be assigned to the user

Response

Returns an array of feedback objects, one for each subject in the request. The order in the response will match the order of of the request body.

status
enum<number>
required

HTTP status code indicating the result of the operation for this specific subject:

  • 200: Success
  • 201: Success, but nothing was updated
  • 400: Invalid body payload. Information will be at the message field
  • 402: Invalid identity due to invalid countryAlpha3
  • 407: This call contained this contact more than once
  • 408: This call contained this identity more than once
  • 409: Duplicate Identity
  • 410: Duplicate Identity. This user already has an identity with this countryAlpha3
Available options:
200,
201,
400,
402,
407,
408,
409,
410
Example:

200

message
string
required

Success or error message

Example:

"Subject created"

user
SubjectEntity · object
required

User information. Will just contain the contact if the operation fails