POST
/
users
curl --request POST \
  --url https://api.sulu.sh/v0/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "oryId": "<string>",
  "organization": "<string>",
  "roles": [
    "<string>"
  ],
  "firstName": "<string>",
  "lastName": "<string>",
  "phone": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "<string>",
    "zipCode": "<string>"
  }
}'
{
  "id": "<string>",
  "object": "user",
  "firstName": "<string>",
  "lastName": "<string>",
  "email": "jsmith@example.com",
  "oryId": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "<string>",
    "zipCode": "<string>"
  },
  "phone": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "organization": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
email
string
required

The email address of the user.

oryId
string
required

The unique identifier for the user in the ORY system.

organization
string
required

The ID of the organization the user belongs to.

roles
string[]

Optional roles to assign to the user.

firstName
string

The first name of the user.

lastName
string

The last name of the user.

phone
string

The phone number of the user.

address
object

The address of the user.

Response

201
application/json
User created successfully
id
string
required

Unique identifier for a user

object
enum<string>
default:user
required
Available options:
user
email
string
required
oryId
string
required
createdAt
string
required
updatedAt
string
required
organization
string
required

Unique identifier for an organization

firstName
string
lastName
string
address
object
phone
string