Skip to main content
POST
/
api
/
v1
/
users
Create an user
curl --request POST \
  --url https://api.scholarlysoftware.com/api/v1/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '
{
  "data": {
    "type": "user",
    "attributes": {
      "display_name": "<string>",
      "custom_fields": {},
      "primary_employee_id": "<string>",
      "employee_ids": {},
      "emails": [
        "primary@example.com",
        "secondary@example.com"
      ]
    },
    "relationships": {}
  }
}
'
import requests

url = "https://api.scholarlysoftware.com/api/v1/users"

payload = { "data": {
"type": "user",
"attributes": {
"display_name": "<string>",
"custom_fields": {},
"primary_employee_id": "<string>",
"employee_ids": {},
"emails": ["primary@example.com", "secondary@example.com"]
},
"relationships": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'user',
attributes: {
display_name: '<string>',
custom_fields: {},
primary_employee_id: '<string>',
employee_ids: {},
emails: ['primary@example.com', 'secondary@example.com']
},
relationships: {}
}
})
};

fetch('https://api.scholarlysoftware.com/api/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "user",
    "attributes": {
      "created_at": "<string>",
      "updated_at": "<string>",
      "custom_fields": {},
      "display_name": "<string>",
      "primary_employee_id": "<string>",
      "employee_ids": {},
      "emails": [
        "primary@example.com",
        "secondary@example.com"
      ]
    },
    "relationships": {
      "profile": {
        "links": {
          "related": "<string>"
        },
        "meta": {},
        "data": {
          "type": "profile",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      },
      "employments": {
        "links": {
          "related": "<string>"
        },
        "meta": {},
        "data": [
          {
            "type": "employment",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ]
      },
      "current_employment": {
        "links": {
          "related": "<string>"
        },
        "meta": {},
        "data": {
          "type": "employment",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      },
      "admin_assistant_roles": {
        "links": {
          "related": "<string>"
        },
        "meta": {}
      },
      "addresses": {
        "links": {
          "related": "<string>"
        },
        "meta": {}
      },
      "phone_numbers": {
        "links": {
          "related": "<string>"
        },
        "meta": {}
      }
    }
  }
}
{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}
{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}
{
"errors": [
{
"status": "422",
"title": "Validation Error",
"detail": "Label can't be blank"
}
]
}

Authorizations

Authorization
string
header
required

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

Headers

Authorization
string
required

Bearer token

Body

application/vnd.api+json
data
object
required

Response

user created

data
object
required