> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.heyreach.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.heyreach.io/_mcp/server.

# InviteManagers

POST https://api//api/public/management/organizations/users/invite/managers
Content-Type: application/json

Invite one or multiple users as managers in your organization. Manager users are special kind of users that exist outside your organization and are invited to specific workspaces. These users will not be part of you organization and only have access to the specified workspaces. These users are automatically added to your workspace and don't need to register.

Reference: https://docs.heyreach.io/hey-reach-api/organization/workspace-users/invite-managers

## Request

### Headers

- `X-API-KEY` (string, optional) — Workspace API Key

### Body (application/json)

This endpoint expects an object.

- `inviterEmail` (string, required)
- `emails` (list of string, required)
- `workspaceIds` (list of integer, required)

## Response

### 200

OK

- `list of object`
  - `workspaces` (list of object, required)
    - `workspaceId` (integer, required)
    - `success` (boolean, required)
    - `errorCode` (string, required)
    - `errorMessage` (string, required)
  - `invitationId` (integer, required)
  - `invitationStatus` (string, required)
  - `invitationUrl` (string, required)
  - `invitationExpirationTime` (datetime, required)
  - `emailAddress` (string, required)

## Errors

### 400 Invite Managers Workspace Users Request Bad Request Error

Bad Request

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, required)
- `instance` (string, required)

### 401 Invite Managers Workspace Users Request Unauthorized Error

Unauthorized

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, required)
- `instance` (string, required)

### 429 Invite Managers Workspace Users Request Too Many Requests Error

Too Many Requests

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, required)
- `instance` (string, required)

### 500 Invite Managers Workspace Users Request Internal Server Error

Internal Server Error

- `any`

## Examples

**Request**

```json
{
  "inviterEmail": "nzLa4CYTiLt@yXST.ltrp",
  "emails": [
    "string",
    "string"
  ],
  "workspaceIds": [
    6519,
    3651
  ]
}
```

**Response**

```json
[
  {
    "workspaces": [
      {
        "workspaceId": 5937,
        "success": true,
        "errorCode": "Success",
        "errorMessage": "string"
      },
      {
        "workspaceId": 2957,
        "success": true,
        "errorCode": "UnknownError",
        "errorMessage": "string"
      }
    ],
    "invitationId": 7510,
    "invitationStatus": "Pending",
    "invitationUrl": "string",
    "invitationExpirationTime": "2011-12-31T22:55:45Z",
    "emailAddress": "string"
  },
  {
    "workspaces": [
      {
        "workspaceId": 9214,
        "success": true,
        "errorCode": "UnknownError",
        "errorMessage": "string"
      },
      {
        "workspaceId": 1177,
        "success": false,
        "errorCode": "WorkspaceDoesNotExists",
        "errorMessage": "string"
      }
    ],
    "invitationId": 8662,
    "invitationStatus": "Revoked",
    "invitationUrl": "string",
    "invitationExpirationTime": "1947-11-19T13:31:07Z",
    "emailAddress": "string"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api//api/public/management/organizations/users/invite/managers"

payload = {
    "inviterEmail": "nzLa4CYTiLt@yXST.ltrp",
    "emails": ["string", "string"],
    "workspaceIds": [6519, 3651]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api//api/public/management/organizations/users/invite/managers';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"inviterEmail":"nzLa4CYTiLt@yXST.ltrp","emails":["string","string"],"workspaceIds":[6519,3651]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api//api/public/management/organizations/users/invite/managers"

	payload := strings.NewReader("{\n  \"inviterEmail\": \"nzLa4CYTiLt@yXST.ltrp\",\n  \"emails\": [\n    \"string\",\n    \"string\"\n  ],\n  \"workspaceIds\": [\n    6519,\n    3651\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api//api/public/management/organizations/users/invite/managers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"inviterEmail\": \"nzLa4CYTiLt@yXST.ltrp\",\n  \"emails\": [\n    \"string\",\n    \"string\"\n  ],\n  \"workspaceIds\": [\n    6519,\n    3651\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api//api/public/management/organizations/users/invite/managers")
  .header("Content-Type", "application/json")
  .body("{\n  \"inviterEmail\": \"nzLa4CYTiLt@yXST.ltrp\",\n  \"emails\": [\n    \"string\",\n    \"string\"\n  ],\n  \"workspaceIds\": [\n    6519,\n    3651\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api//api/public/management/organizations/users/invite/managers', [
  'body' => '{
  "inviterEmail": "nzLa4CYTiLt@yXST.ltrp",
  "emails": [
    "string",
    "string"
  ],
  "workspaceIds": [
    6519,
    3651
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api//api/public/management/organizations/users/invite/managers");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"inviterEmail\": \"nzLa4CYTiLt@yXST.ltrp\",\n  \"emails\": [\n    \"string\",\n    \"string\"\n  ],\n  \"workspaceIds\": [\n    6519,\n    3651\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "inviterEmail": "nzLa4CYTiLt@yXST.ltrp",
  "emails": ["string", "string"],
  "workspaceIds": [6519, 3651]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api//api/public/management/organizations/users/invite/managers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```