Skip to main content
POST
/
users
Create user.
curl --request POST \
  --url https://lab.trustos.telefonicatech.com/id/v2/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "john@john.com",
  "company": "Company Name",
  "password": "password",
  "credits": 10000,
  "networks": [
    10004
  ]
}'
{
  "statusCode": 201,
  "message": "User created",
  "data": {
    "username": "did:user:<id>",
    "address": "0x1234"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Data needed for the creation of a user inside TrustOS.

email
string
Example:

"john@john.com"

company
string
Example:

"Company Name"

password
string
Example:

"password"

credits
number
Example:

10000

networks
number[]

Response

Successful user creation.

statusCode
number

Request status code.

Example:

201

message
string

Message returned by the request.

Example:

"User created"

data
object

Data returned by the request.

I