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

# Créer un archiveur

POST https://workflow-manager/experimental/admin/api/tenants/{tenantId}/archivers
Content-Type: application/json

Crée un archiveur. Réservé aux administrateurs. API expérimentale (susceptible d'évoluer).

Administrateur de la plateforme (back-office Goodflag). Inaccessible aux utilisateurs du tenant.

Reference: https://docs.goodflag.com/wm/api-reference/documentation-api/token-administrateur/archiver/create-archiver

## Authentication

- `Authorization` header (basic auth, required) — Identifiants d'administration, requis pour les endpoints `/admin/api` et `/experimental/admin/api`.

## Request

### Path parameters

- `tenantId` (string, required) — L'identifiant du tenant.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — Le nom de la solution d'archivage.
- `description` (string, required) — La description de la solution d'archivage.
- `archivingSolution` (enum, required) — La solution d'archivage à utiliser. Valeurs possibles : cecuritySae, cecurityCfn.
  - Allowed values: `cecurityCfn`, `cecuritySae`
- `clientId` (string, required) — L'identifiant client utilisé pour l'authentification auprès de la solution d'archivage.
- `clientSecret` (string, required) — Le secret client utilisé pour l'authentification auprès de la solution d'archivage.
- `baseUrl` (string, required) — L'URL de base utilisée pour communiquer avec la solution d'archivage.
- `endpointAuthenticate` (string, required) — L'endpoint d'authentification auprès de la solution d'archivage.
- `endpointUpload` (string, required) — L'endpoint de versement de contenu vers la solution d'archivage.
- `accountName` (string, optional) — Le nom de compte associé à la solution d'archivage.

## Response

### 200

L'entité Archiver créée.

- `id` (string, required) — L'identifiant de l'archiveur.
- `tenantId` (string, required) — L'identifiant du tenant auquel appartient l'archiveur.
- `name` (string, required) — Le nom de la solution d'archivage.
- `description` (string, required) — La description de la solution d'archivage.
- `archivingSolution` (string, required) — La solution d'archivage à utiliser. Certains paramètres dépendent de la solution. Valeurs possibles : cecuritySae : [name, description, archivingSolution, clientId, clientSecret, accountName, baseUrl, endpointAuthenticate, endpointUpload] ; cecurityCfn : [name, description, archivingSolution, clientId, clientSecret, baseUrl, endpointAuthenticate, specificInfo].
- `clientId` (string, required) — L'identifiant client utilisé pour l'authentification auprès de la solution d'archivage.
- `clientSecret` (string, required) — Le secret client utilisé pour l'authentification auprès de la solution d'archivage.
- `baseUrl` (string, required) — L'URL de base utilisée pour communiquer avec la solution d'archivage.
- `endpointAuthenticate` (string, required) — L'endpoint d'authentification auprès de la solution d'archivage.
- `endpointUpload` (string, required) — L'endpoint de versement de contenu vers la solution d'archivage.
- `created` (double, required) — La date de création de l'entité.
- `updated` (double, required) — La date de dernière modification de l'entité.
- `accountName` (string, optional) — Le nom de compte associé à la solution d'archivage.
- `specificInfo` (string, optional) — Informations propres à la solution d'archivage. Valeurs possibles : cecuritySae : null ; cecurityCfn : [cfecID, safeID, realm].

## Errors

### 400 Bad Request Error

InvalidRequestField : Un champ de la requête porte une valeur incorrecte.

- `status` (integer, required) — Le code de statut HTTP.
- `error` (string, required) — Le message de statut HTTP.
- `message` (string, required) — Le message d'erreur.
- `code` (string, required) — Le code d'erreur.

### 403 Forbidden Error

ArchiverDuplicated : Un archiveur avec la même solution et le même nom existe déjà. ; InvalidAdminCredentials : Les identifiants d'administration sont incorrects.

- `status` (integer, required) — Le code de statut HTTP.
- `error` (string, required) — Le message de statut HTTP.
- `message` (string, required) — Le message d'erreur.
- `code` (string, required) — Le code d'erreur.

## Examples

**Request**

```json
{
  "name": "Cal Efornia #803",
  "description": "Incidunt nihil sit ipsa quo doloribus tempora.",
  "archivingSolution": "cecuritySae",
  "clientId": "6B7s2gy4F81xwKLgWqsSoWpB",
  "clientSecret": "ErgVN2gFMFyscvk5zg6MJaYW",
  "baseUrl": "https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH",
  "endpointAuthenticate": "/authenticate",
  "endpointUpload": "/upload",
  "accountName": "My application"
}
```

**Response**

```json
{
  "id": "arc_5mbJqpgRgCR1hBPFoxiGJG5N",
  "tenantId": "ten_Hm5gqY6oKADYdg9cjhsVbQDH",
  "name": "Cal Efornia #803",
  "description": "Incidunt nihil sit ipsa quo doloribus tempora.",
  "archivingSolution": "cecuritySae",
  "clientId": "6B7s2gy4F81xwKLgWqsSoWpB",
  "clientSecret": "****************",
  "baseUrl": "https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH",
  "endpointAuthenticate": "/authenticate",
  "endpointUpload": "/upload",
  "created": 1782821909811,
  "updated": 1782821909811,
  "accountName": "My application"
}
```

**SDK Code**

```python Requête réussie.
import requests

url = "https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers"

payload = {
    "name": "Cal Efornia #803",
    "description": "Incidunt nihil sit ipsa quo doloribus tempora.",
    "archivingSolution": "cecuritySae",
    "clientId": "6B7s2gy4F81xwKLgWqsSoWpB",
    "clientSecret": "ErgVN2gFMFyscvk5zg6MJaYW",
    "baseUrl": "https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH",
    "endpointAuthenticate": "/authenticate",
    "endpointUpload": "/upload",
    "accountName": "My application"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Requête réussie.
const url = 'https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"name":"Cal Efornia #803","description":"Incidunt nihil sit ipsa quo doloribus tempora.","archivingSolution":"cecuritySae","clientId":"6B7s2gy4F81xwKLgWqsSoWpB","clientSecret":"ErgVN2gFMFyscvk5zg6MJaYW","baseUrl":"https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH","endpointAuthenticate":"/authenticate","endpointUpload":"/upload","accountName":"My application"}'
};

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

```go Requête réussie.
package main

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

func main() {

	url := "https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers"

	payload := strings.NewReader("{\n  \"name\": \"Cal Efornia #803\",\n  \"description\": \"Incidunt nihil sit ipsa quo doloribus tempora.\",\n  \"archivingSolution\": \"cecuritySae\",\n  \"clientId\": \"6B7s2gy4F81xwKLgWqsSoWpB\",\n  \"clientSecret\": \"ErgVN2gFMFyscvk5zg6MJaYW\",\n  \"baseUrl\": \"https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH\",\n  \"endpointAuthenticate\": \"/authenticate\",\n  \"endpointUpload\": \"/upload\",\n  \"accountName\": \"My application\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	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 Requête réussie.
require 'uri'
require 'net/http'

url = URI("https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Cal Efornia #803\",\n  \"description\": \"Incidunt nihil sit ipsa quo doloribus tempora.\",\n  \"archivingSolution\": \"cecuritySae\",\n  \"clientId\": \"6B7s2gy4F81xwKLgWqsSoWpB\",\n  \"clientSecret\": \"ErgVN2gFMFyscvk5zg6MJaYW\",\n  \"baseUrl\": \"https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH\",\n  \"endpointAuthenticate\": \"/authenticate\",\n  \"endpointUpload\": \"/upload\",\n  \"accountName\": \"My application\"\n}"

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

```java Requête réussie.
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Cal Efornia #803\",\n  \"description\": \"Incidunt nihil sit ipsa quo doloribus tempora.\",\n  \"archivingSolution\": \"cecuritySae\",\n  \"clientId\": \"6B7s2gy4F81xwKLgWqsSoWpB\",\n  \"clientSecret\": \"ErgVN2gFMFyscvk5zg6MJaYW\",\n  \"baseUrl\": \"https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH\",\n  \"endpointAuthenticate\": \"/authenticate\",\n  \"endpointUpload\": \"/upload\",\n  \"accountName\": \"My application\"\n}")
  .asString();
```

```php Requête réussie.
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers', [
  'body' => '{
  "name": "Cal Efornia #803",
  "description": "Incidunt nihil sit ipsa quo doloribus tempora.",
  "archivingSolution": "cecuritySae",
  "clientId": "6B7s2gy4F81xwKLgWqsSoWpB",
  "clientSecret": "ErgVN2gFMFyscvk5zg6MJaYW",
  "baseUrl": "https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH",
  "endpointAuthenticate": "/authenticate",
  "endpointUpload": "/upload",
  "accountName": "My application"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp Requête réussie.
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Cal Efornia #803\",\n  \"description\": \"Incidunt nihil sit ipsa quo doloribus tempora.\",\n  \"archivingSolution\": \"cecuritySae\",\n  \"clientId\": \"6B7s2gy4F81xwKLgWqsSoWpB\",\n  \"clientSecret\": \"ErgVN2gFMFyscvk5zg6MJaYW\",\n  \"baseUrl\": \"https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH\",\n  \"endpointAuthenticate\": \"/authenticate\",\n  \"endpointUpload\": \"/upload\",\n  \"accountName\": \"My application\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Requête réussie.
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Cal Efornia #803",
  "description": "Incidunt nihil sit ipsa quo doloribus tempora.",
  "archivingSolution": "cecuritySae",
  "clientId": "6B7s2gy4F81xwKLgWqsSoWpB",
  "clientSecret": "ErgVN2gFMFyscvk5zg6MJaYW",
  "baseUrl": "https://my-company.com/archiver/BqyyfEeNxeJEwLT7Wv8syEcH",
  "endpointAuthenticate": "/authenticate",
  "endpointUpload": "/upload",
  "accountName": "My application"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://workflow-manager/experimental/admin/api/tenants/tenantId/archivers")! 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()
```