Add members Early access
Read as MarkdownDescription #
Adds people to a Managed Organizational Unit, or updates them if they’ve
already been added with the same directory_user_id.
When the customer connects their calendars through a service account, as with Enterprise Connect, people you add become members automatically.
Otherwise each person connects their own calendars, as with
Individual Connect. Send them
their operation_urls.individual_onboarding_url, and they become a member of the Organizational Unit
once they’ve connected.
List Members returns the list of members who have completed onboarding to your Managed Organizational Unit.
Please note, when using a Sandbox Organizational Unit, it can hold at most 20 people.
Authentication is with the access token for the Managed Organizational Unit, returned when you provision it. The Organizational Unit must be managed by your application.
URL format #
{data_center_url}/v1/organizational_unit_directory_users
Example Request #
POST /v1/organizational_unit_directory_users HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json; charset=utf-8
{
"directory_users": [
{
"directory_user_id": "user-1001",
"email": "doc@example.com",
"name": "Doc Brown"
},
{
"directory_user_id": "user-1002",
"email": "marty@example.com",
"name": "Marty McFly"
}
]
}Example Response #
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"directory_users": [
{
"directory_user_id": "user-1001",
"email": "doc@example.com",
"name": "Doc Brown",
"operation_urls": {
"individual_onboarding_url": "https://..."
}
},
{
"directory_user_id": "user-1002",
"email": "marty@example.com",
"name": "Marty McFly",
"operation_urls": {
"individual_onboarding_url": "https://..."
}
}
]
}Request Parameters #
data_center_url Required
The URL for the data center you want to communicate with. Possible choices are:
api-au.cronofy.com- π¦πΊ Australiaapi-ca.cronofy.com- π¨π¦ Canadaapi-de.cronofy.com- π©πͺ Germanyapi-sg.cronofy.com- πΈπ¬ Singaporeapi-uk.cronofy.com- π¬π§ United Kingdomapi.cronofy.com- πΊπΈ United States
Find out more about Cronofy's data centers.
directory_users Required #
The people to add or update Array.
Must contain at least one person, and each directory_user_id and email can appear only once. You can pass up to 50 people in one call.
directory_users.directory_user_id Required #
Your application’s identifier for the person, such as their user ID in your
system String, up to 128 characters.
directory_users.email Required #
The person’s email address String.
It can’t already belong to a person added with a different
directory_user_id.
directory_users.name Required #
The person’s name String.
Response Parameters #
directory_users.directory_user_id #
Your application’s identifier for the person
String.
directory_users.email #
The person’s email address String.
directory_users.name #
The person’s name
String.
directory_users.operation_urls.individual_onboarding_url #
A link for the end user to connect their calendar and be onboarded as a member of the Managed Organizational Unit
String.
Each link is valid for 48 hours. Add the person again to get a new one.
Error responses #
401 Unauthorized #
The request was refused as the provided authentication credentials were not recognized.
When an OAuth refresh_token is available then it should be used to
request a replacement access token
before the request is retried.
403 Forbidden #
The request was refused as the access token doesn’t grant the
managed_organizational_unit scope.
422 Unprocessable #
The request was unable to be processed due to it containing invalid parameters, or the Organizational Unit isn’t managed by your application. Nobody in the request is added or updated.
The response contains a JSON object with one or more errors. Errors about the
request as a whole are keyed on directory_users, and errors about a person
on directory_users[n].<field>, where n is their position in the array,
starting from 0. For example, if the second person’s email already belongs to
someone else:
{
"errors": {
"directory_users[1].email": [
{
"key": "errors.already_exists_in_directory",
"description": "The email address already belongs to another directory user"
}
]
}
}