Create a membership

cURL

curl --request POST \
  --url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/memberships \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": 123,
  "role": "MEMBER",
  "accepted": false,
  "disableImpersonation": false
}
'

Response

201

{
  "status": "success",
  "data": {
    "id": 123,
    "userId": 123,
    "teamId": 123,
    "accepted": true,
    "role": "MEMBER",
    "user": {
      "email": "<string>",
      "avatarUrl": "<string>",
      "username": "<string>",
      "name": "<string>",
      "bio": "<string>",
      "metadata": {
        "key": "value"
      }
    },
    "disableImpersonation": true
  }
}

Headers

Authorization

string

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

x-cal-secret-key

string

For platform customers - OAuth client secret key

x-cal-client-id

string

For platform customers - OAuth client ID

Path Parameters

orgId

number required

teamId

number required

Body

application/json

userId

number required

role

enum default: MEMBER required

Available options:

MEMBER, OWNER, ADMIN

accepted

boolean default: false

disableImpersonation

boolean default: false

Response

201 - application/json

status

enum required

Available options:

success, error

Example:

"success"

data

object required

Show child attributes