v1

latestOpenAPI 3.0.12026-07-243686491.1 MB
Team Members

Bulk invite team members

Invite multiple users to the same team in a single request. Each member is processed independently — a failure on one item does not abort siblings. The response is a list with one entry per input member, in order, indicating individual outcomes.</br></br>Required scope: team-members:write </br>Organization authorization: supported

post/api/v1/team-members/bulk

Request body

teamIdinteger

Id of the team that the members will be invited to. All members in the request are added to this team.

Example request

{
  "teamId": 1,
  "members": [
    {
      "userId": 1,
      "email": "partner-api@monta.com",
      "phone": "+45123456789",
      "priceGroupId": 1,
      "costGroupId": 1,
      "teamMemberProfileId": 1,
      "teamWalletChargePaymentType": "none",
      "canPayForChargesCountryIds": [
        1,
        2,
        3
      ],
      "note": "Welcome to the Monta team",
      "chargePointIds": [
        1,
        2,
        3,
        4
      ],
      "partnerExternalId": "ACME-12345",
      "kwhPriceCapAc": 2.5,
      "kwhPriceCapDc": 5
    }
  ]
}

Response

Per-member invite results

indexinteger

Zero-based index of the member in the request members array this result corresponds to

status'created' | 'failed' required
errorstring nullable

Failure reason, present only when status is failed

Example response

[
  {
    "teamMember": {
      "id": 1,
      "teamId": 42,
      "displayName": "Casper Rasmussen",
      "operator": {
        "id": 14,
        "name": "Monta",
        "identifier": "monta",
        "partnerId": 1,
        "vatNumber": "FOO-123-ABC"
      },
      "partnerExternalTeamId": "A1B2C3BE3121",
      "userId": 1,
      "email": "example@monta.com",
      "phone": "+4512345678",
      "note": "A Note",
      "invitedAt": "2022-05-12T15:56:45.99Z",
      "invitedBy": "example@monta.com",
      "acceptedAt": "2022-05-12T15:56:45.99Z",
      "acceptedBy": "example@monta.com",
      "rejectedAt": "2022-05-12T15:56:45.99Z",
      "createdAt": "2022-05-12T15:56:45.99Z",
      "updatedAt": "2022-05-12T16:56:45.99Z",
      "deletedAt": "2022-05-12T16:56:45.99Z",
      "priceGroupId": 1,
      "costGroupId": 1,
      "teamMemberProfileId": 1,
      "canPayForChargesCountryIds": [
        1,
        2,
        3
      ],
      "teamWalletChargePaymentType": "none",
      "partnerExternalId": "ACME-12345",
      "kwhPriceCapAc": 2.5,
      "kwhPriceCapDc": 5,
      "sponsoredPriceGroupId": 1
    }
  }
]