Update org person

PATCH /orgs/people/{personId}

Path parameters

  • personId string Required

    The organization's person unique document ID, i.e. org.people[].person.

application/json

Body Required

  • Determines the person's permissions within the organization. The member and projectManager do not have access to the organization space, they are just employees. A manager has limited access to the organization space, like managing basic organizational settings, invoice information, leave requests, etc. An admin has full control over the organization. The observer can view everything, but not change anything.

    Values are member, projectManager, manager, admin, or observer.

  • startDate string(date-time)

    The start date in ISOString format. See .toISOString().

  • endDate string(date-time)

    The end date in ISOString format. See .toISOString().

  • role string

    Reference to an org role, i.e. org.roles[]._id

  • The title of the role. E.g. Director of Sales

  • email string(email)

    The person's email in the organization.

  • departments array[string(ObjectId)]

    Departments this person belongs to. References the organization's departments, i.e. org.departments[]._id.

  • office string(ObjectId)

    The person's office location. References the organization's offices, i.e. org.offices[]._id.

  • If true, this person can create projects for this organization.

    Default value is false.

  • If true, this person can approve project roles.

    Default value is false.

  • If true, this person can approve leave requests.

    Default value is false.

  • customProperties array[object]

    Display custom properties on the organization's person information page that are not supported by missionX out of the box.

    Hide customProperties attributes Show customProperties attributes object
    • name string

      The custom property name.

    • The custom property value. It can be of any type.

    • canView string

      The minimum role that is allowed to view this property. E.g. If set to manager, both a manager and an admin can view it, but not a member.

      Values are member, projectManager, manager, or admin.

    • Optional additional information about this property.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • _id string(ObjectId)

      The unique document ID.

    • Determines the person's permissions within the organization. The member and projectManager do not have access to the organization space, they are just employees. A manager has limited access to the organization space, like managing basic organizational settings, invoice information, leave requests, etc. An admin has full control over the organization. The observer can view everything, but not change anything.

      Values are member, projectManager, manager, admin, or observer.

    • startDate string(date-time)

      The start date in ISOString format. See .toISOString().

    • endDate string(date-time)

      The end date in ISOString format. See .toISOString().

    • person string

      The person's unique document ID.

    • role string

      Reference to an org role, i.e. org.roles[]._id

    • The title of the role. E.g. Director of Sales

    • email string(email)

      The person's email in the organization.

    • departments array[string(ObjectId)]

      Departments this person belongs to. References the organization's departments, i.e. org.departments[]._id.

    • office string(ObjectId)

      The person's office location. References the organization's offices, i.e. org.offices[]._id.

    • invitePendingSince number(integer)

      The timestamp the person was invited to the organization. If this field is defined, it means that the invitation is still pending.

    • If true, this person can create projects for this organization.

      Default value is false.

    • If true, this person can approve project roles.

      Default value is false.

    • If true, this person can approve leave requests.

      Default value is false.

    • customProperties array[object]

      Display custom properties on the organization's person information page that are not supported by missionX out of the box.

      Hide customProperties attributes Show customProperties attributes object
      • name string

        The custom property name.

      • The custom property value. It can be of any type.

      • canView string

        The minimum role that is allowed to view this property. E.g. If set to manager, both a manager and an admin can view it, but not a member.

        Values are member, projectManager, manager, or admin.

      • Optional additional information about this property.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
PATCH /orgs/people/{personId}
curl \
 -X PATCH https://open.api.missionx.ai/v1/orgs/people/{personId} \
 -H "Content-Type: application/json" \
 -d '{"permission":"member","startDate":"2024-05-04T09:42:00+00:00","endDate":"2024-05-04T09:42:00+00:00","role":"string","roleTitle":"string","email":"hello@example.com","departments":["string"],"office":"string","canCreateProjects":false,"canApproveRoles":false,"canApproveLeaves":false,"customProperties":[{"name":"string","canView":"member","description":"string"}]}'
Request examples
{
  "permission": "member",
  "startDate": "2024-05-04T09:42:00+00:00",
  "endDate": "2024-05-04T09:42:00+00:00",
  "role": "string",
  "roleTitle": "string",
  "email": "hello@example.com",
  "departments": [
    "string"
  ],
  "office": "string",
  "canCreateProjects": false,
  "canApproveRoles": false,
  "canApproveLeaves": false,
  "customProperties": [
    {
      "name": "string",
      "canView": "member",
      "description": "string"
    }
  ]
}
Response examples (200)
{
  "_id": "string",
  "permission": "member",
  "startDate": "2024-05-04T09:42:00+00:00",
  "endDate": "2024-05-04T09:42:00+00:00",
  "person": "string",
  "role": "string",
  "roleTitle": "string",
  "email": "hello@example.com",
  "departments": [
    "string"
  ],
  "office": "string",
  "invitePendingSince": 42.0,
  "canCreateProjects": false,
  "canApproveRoles": false,
  "canApproveLeaves": false,
  "customProperties": [
    {
      "name": "string",
      "canView": "member",
      "description": "string"
    }
  ]
}
Response examples (400)
{
  "message": "string",
  "code": "string",
  "data": {
    "key": null
  }
}
Response examples (500)
{
  "message": "string",
  "code": "string",
  "data": {
    "key": null
  }
}