Orgs / Users

Create a user

post/v2/organizations/{orgId}/users

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

orgIdnumber required

Headers

Authorizationstring

For non-platform customers - value must be Bearer <token> where <token> is api key prefixed with cal_

x-cal-secret-keystring

For platform customers - OAuth client secret key

x-cal-client-idstring

For platform customers - OAuth client ID

Request body

emailstring required

User email address

usernamestring

Username

weekdaystring

Preferred weekday

brandColorstring

Brand color in HEX format

biostring

Bio

metadataobject

You can store any additional data you want here. Metadata must have at most 50 keys, each key up to 40 characters, and values up to 500 characters.

darkBrandColorstring

Dark brand color in HEX format

hideBrandingboolean

Hide branding

timeZonestring

Time zone

themestring nullable

Theme

appThemestring nullable

Application theme

timeFormatnumber

Time format

defaultScheduleIdnumber

Default schedule ID

localestring nullable

Locale

avatarUrlstring

Avatar URL

organizationRole'MEMBER' | 'ADMIN' | 'OWNER'
autoAcceptboolean

Example request

{
  "email": "user@example.com",
  "username": "user123",
  "weekday": "Monday",
  "brandColor": "#FFFFFF",
  "bio": "I am a bio",
  "metadata": {
    "key": "value"
  },
  "darkBrandColor": "#000000",
  "timeZone": "America/New_York",
  "theme": "dark",
  "appTheme": "light",
  "timeFormat": 24,
  "defaultScheduleId": 1,
  "locale": "en",
  "avatarUrl": "https://example.com/avatar.jpg"
}

Response

status'success' | 'error' required

Example response

{
  "status": "success",
  "data": {
    "id": 1,
    "username": "john_doe",
    "name": "John Doe",
    "email": "john@example.com",
    "emailVerified": "2022-01-01T00:00:00Z",
    "bio": "I am a software developer",
    "avatarUrl": "https://example.com/avatar.jpg",
    "timeZone": "America/New_York",
    "weekStart": "Monday",
    "appTheme": "light",
    "theme": "default",
    "defaultScheduleId": 1,
    "locale": "en-US",
    "timeFormat": 12,
    "brandColor": "#ffffff",
    "darkBrandColor": "#000000",
    "allowDynamicBooking": true,
    "createdDate": "2022-01-01T00:00:00Z",
    "verified": true,
    "invitedTo": 1,
    "metadata": {
      "key": "value"
    },
    "profile": {
      "id": 1,
      "organizationId": 1,
      "userId": 1,
      "username": "john_doe"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.