Add employee with catalog information

POST https://api.zenoti.com/v1/employees

This API helps you to create an employee profile, along with catalog information in a center. Note: For information on how to update the details of a previously-created employee profile, click here.

You must specify necessary details for the mandatory and optional object parameters in the API request body. If you assign a particular role to the specified employee, this API creates an employee profile with the provided role ID. Otherwise, this API assigns a default role to the newly-created employee. For more information on security roles, refer to the Retrieve the list of security roles in a center API.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

POST /v1/employees

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
raw_body string (json) No

Response

Success (201 Created)

{}

Example

curl --request POST \
  --url 'https://api.zenoti.com/v1/employees' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "raw_body": "string"
}'
const response = await fetch('https://api.zenoti.com/v1/employees', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ raw_body: 'string' })
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/v1/employees',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'raw_body': 'string'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new { raw_body = "string" }),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/employees", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/employees')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { raw_body: 'string' }.to_json
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded