> This page is for Plate-forme, version Hérité.
> For other versions, use one of these documentation indexes:
> - V4 (default): https://next.developer.frame.io/platform/v4/llms.txt
> - V4 expérimental: https://next.developer.frame.io/platform/v4-experimental/llms.txt
> - Hérité: https://next.developer.frame.io/platform/v2/llms.txt

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

# Créer par lot des utilisateurs collaborateurs et des utilisateurs collaborateurs en attente dans un projet

POST https://api.frame.io/v2/batch/projects/{project_id}/collaborators
Content-Type: application/json

Soumettre une liste d’utilisateurs collaborateurs à ajouter au projet donné en tant qu’utilisateurs collaborateurs

Reference: https://next.developer.frame.io/platform/v2/api-reference/projects/batch-create-collaborators

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `project_id` (string, required)

### Body (application/json)

This endpoint expects a BatchInviteParams.

- `batch` (list of BatchInviteParamsBatchItems, optional)
- `default_message` (string, optional) — Message d’invitation par défaut à appliquer à toutes les invitations créées
- `send_email` (boolean, optional, default: true) — Lorsque la valeur est définie sur faux, aucun e-mail n’est envoyé aux nouveaux réviseurs ni aux réviseurs en attente.

## Response

### 200

Batch create success response

- `error` (V2BatchProjectsProjectIdCollaboratorsPostResponsesContentApplicationJsonSchemaError, optional)

## Errors

### 401 Unauthorized Error

Unauthorized response

- `code` (integer, optional)
- `errors` (list of HttpErrorErrorsItems, optional)
- `message` (string, optional)

### 404 Not Found Error

Not Found response

- `code` (integer, optional)
- `errors` (list of HttpErrorErrorsItems, optional)
- `message` (string, optional)

## Types

### BatchInviteParamsBatchItems

- `email` (string, optional) — Créer une invitation pour l’adresse e-mail indiquée
- `message` (string, optional) — Message d’invitation à utiliser pour cette opération de lot
- `team_id` (string, optional) — Créer un ensemble d’invitations pour tous les membres de l’équipe approuvés au sein de l’équipe donnée
- `user_group_id` (string, optional) — Créer un ensemble d’invitations pour tous les utilisateurs du groupe d’utilisateurs indiqué
- `user_id` (string, optional) — Créer une invitation pour le user_id indiqué

### V2BatchProjectsProjectIdCollaboratorsPostResponsesContentApplicationJsonSchemaError

### HttpErrorErrorsItems

- `code` (integer, optional)
- `detail` (string, optional)
- `status` (integer, optional)
- `title` (string, optional)

## Examples

### response

**Response**

```json
{
  "error": {
    "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa": "Something went wrong!"
  }
}
```

**SDK Code**

```python response
import requests

url = "https://api.frame.io/v2/batch/projects/project_id/collaborators"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript response
const url = 'https://api.frame.io/v2/batch/projects/project_id/collaborators';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

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

```go response
package main

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

func main() {

	url := "https://api.frame.io/v2/batch/projects/project_id/collaborators"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.frame.io/v2/batch/projects/project_id/collaborators")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/batch/projects/project_id/collaborators")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/batch/projects/project_id/collaborators', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp response
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/batch/projects/project_id/collaborators");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/batch/projects/project_id/collaborators")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

### request_with_default_message

**Request**

```json
{
  "batch": [
    {
      "message": "Please review this!",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    {
      "user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
    },
    {
      "user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"
    },
    {
      "email": "testing@foobar.biz"
    }
  ],
  "default_message": "Welcome!"
}
```

**Response**

```json
{
  "error": {
    "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa": "Something went wrong!"
  }
}
```

**SDK Code**

```python request_with_default_message
import requests

url = "https://api.frame.io/v2/batch/projects/project_id/collaborators"

payload = {
    "batch": [{
            "message": "Please review this!",
            "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
        }, { "user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" }, { "user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc" }, { "email": "testing@foobar.biz" }],
    "default_message": "Welcome!"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript request_with_default_message
const url = 'https://api.frame.io/v2/batch/projects/project_id/collaborators';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"batch":[{"message":"Please review this!","user_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},{"user_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"},{"user_group_id":"cccccccc-cccc-cccc-cccc-cccccccccccc"},{"email":"testing@foobar.biz"}],"default_message":"Welcome!"}'
};

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

```go request_with_default_message
package main

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

func main() {

	url := "https://api.frame.io/v2/batch/projects/project_id/collaborators"

	payload := strings.NewReader("{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ],\n  \"default_message\": \"Welcome!\"\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 request_with_default_message
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/batch/projects/project_id/collaborators")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ],\n  \"default_message\": \"Welcome!\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/batch/projects/project_id/collaborators")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ],\n  \"default_message\": \"Welcome!\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/batch/projects/project_id/collaborators', [
  'body' => '{
  "batch": [
    {
      "message": "Please review this!",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    {
      "user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
    },
    {
      "user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"
    },
    {
      "email": "testing@foobar.biz"
    }
  ],
  "default_message": "Welcome!"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp request_with_default_message
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/batch/projects/project_id/collaborators");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ],\n  \"default_message\": \"Welcome!\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift request_with_default_message
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "batch": [[
      "message": "Please review this!",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    ], ["user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"], ["user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"], ["email": "testing@foobar.biz"]],
  "default_message": "Welcome!"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/batch/projects/project_id/collaborators")! 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()
```

### request_without_default_message

**Request**

```json
{
  "batch": [
    {
      "message": "Please review this!",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    {
      "user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
    },
    {
      "user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"
    },
    {
      "email": "testing@foobar.biz"
    }
  ]
}
```

**Response**

```json
{
  "error": {
    "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa": "Something went wrong!"
  }
}
```

**SDK Code**

```python request_without_default_message
import requests

url = "https://api.frame.io/v2/batch/projects/project_id/collaborators"

payload = { "batch": [{
            "message": "Please review this!",
            "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
        }, { "user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" }, { "user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc" }, { "email": "testing@foobar.biz" }] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript request_without_default_message
const url = 'https://api.frame.io/v2/batch/projects/project_id/collaborators';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"batch":[{"message":"Please review this!","user_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},{"user_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"},{"user_group_id":"cccccccc-cccc-cccc-cccc-cccccccccccc"},{"email":"testing@foobar.biz"}]}'
};

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

```go request_without_default_message
package main

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

func main() {

	url := "https://api.frame.io/v2/batch/projects/project_id/collaborators"

	payload := strings.NewReader("{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 request_without_default_message
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/batch/projects/project_id/collaborators")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/batch/projects/project_id/collaborators")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/batch/projects/project_id/collaborators', [
  'body' => '{
  "batch": [
    {
      "message": "Please review this!",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    {
      "user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
    },
    {
      "user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"
    },
    {
      "email": "testing@foobar.biz"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp request_without_default_message
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/batch/projects/project_id/collaborators");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"batch\": [\n    {\n      \"message\": \"Please review this!\",\n      \"user_id\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    },\n    {\n      \"user_id\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\"\n    },\n    {\n      \"user_group_id\": \"cccccccc-cccc-cccc-cccc-cccccccccccc\"\n    },\n    {\n      \"email\": \"testing@foobar.biz\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift request_without_default_message
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["batch": [[
      "message": "Please review this!",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    ], ["user_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"], ["user_group_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"], ["email": "testing@foobar.biz"]]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/batch/projects/project_id/collaborators")! 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()
```