---
title: "Contact"
source: /fr/gcxone/api/contact
locale: fr
updated: 2026-09-04
---
Opérations sur les ressources de contact. 4 points de terminaison, chacun relatif à `https://api.nxgen.cloud/api/v1` et authentifié comme décrit sous [Authentication](/gcxone/api/authentication).

## POST /contact

Ajouter un nouveau contact.

### Paramètres

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| hierarchyId | query | string | yes | Identifiant du niveau de hiérarchie tel que Site, Client ou Fournisseur de services dans lequel le contact est créé. |

### Corps de la Demande

Charge utile du Contact

```json
{
  "name": "string (required)",
  "description": "string",
  "email": "string",
  "codeword": "string",
  "available": "boolean",
  "type": "STANDARD",
  "phones": [
    {
      "number": "string",
      "phoneType": "MAIN | MOBILE | HOME | WORK | CUSTOM",
      "customType": "string"
    }
  ]
}
```

### Réponses

| Statut | Description | Corps |
| --- | --- | --- |
| 200 | Succès |  |
| 400 | Entrée invalide |  |
| 403 | Interdit |  |

Exemple `200` réponse :

```json
{
  "errorCode": 0,
  "errorMessage": "Success",
  "id": "8a81fc4581c99094018224c3d431"
}
```

Exemple `400` réponse :

```json
{
  "errorCode": "ERR001",
  "errorDesc": "Invalid Request"
}
```

## PATCH /contact

Mettre à jour partiellement un contact par ID de contact

### Paramètres

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| contactId | query | string | Oui | ID de contact dans lequel le patch est requis. |
| hierarchyId | query | string | yes | ID de hiérarchie auquel le contact est associé. Exemple : ID de location, de client ou de fournisseur de services. |

### Corps de la Demande

Charge utile du contact

```json
{
  "name": "string",
  "description": "string",
  "email": "string",
  "codeword": "string",
  "available": "boolean",
  "phones": [
    {
      "id": "string",
      "number": "string",
      "phoneType": "MAIN | MOBILE | HOME | WORK | CUSTOM",
      "customType": "string"
    }
  ]
}
```

### Réponses

| Statut | Description | Corps |
| --- | --- | --- |
| 200 | Succès |  |
| 400 | Entrée invalide |  |
| 403 | Interdit |  |

Exemple `200` réponse:

```json
{
  "errorCode": 0,
  "errorMessage": "Success"
}
```

Exemple `400` réponse:

```json
{
  "errorCode": "ERR001",
  "errorDesc": "Invalid Request"
}
```

## DELETE /contact

Supprimer un contact par ID de contact

### Paramètres

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| contactId | query | string | yes | Identifiant du contact requis pour la suppression. |
| hierarchyId | query | string | yes | Identifiant de la hiérarchie auquel le contact est associé. Exemple : identifiant du site, du client ou du prestataire de services. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Success |  |
| 204 | No Content |  |
| 400 | Entrée invalide |  |
| 401 | Non autorisé |  |
| 403 | Interdit |  |

## GET /contact/all

Obtenir la liste des contacts associés à un identifiant de niveau hiérarchique tel que l’identifiant du site, du client ou du prestataire de services.

### Paramètres

| Nom | Entrée | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| hierarchyId | query | string | yes | Identifiant du niveau hiérarchique, tel que Site, Client ou Fournisseur de services |

### Réponses

| Statut | Description | Corps |
| --- | --- | --- |
| 200 | Succès | objet |
| 400 | Entrée invalide |  |
| 403 | Interdit |  |

Exemple `200` réponse:

```json
{
  "errorCode": 0,
  "message": [
    {
      "id": "8a81b56781c990bb0181d22466bb007e",
      "name": "Axxon test",
      "description": "Site Contact - Automatically created",
      "email": null,
      "codeword": null,
      "available": true,
      "type": "MANAGED",
      "phones": []
    },
    {
      "id": "8a81fc4581c9909401822538dbc70653",
      "name": "John",
      "description": "nxgen user contact",
      "email": "test@nx.com",
      "codeword": "NXG",
      "available": true,
      "type": "STANDARD",
      "phones": [
        {
          "id": "8a81fc4581c9909401822538dbc70654",
          "number": "+919842999112",
          "phoneType": "MAIN",
          "customType": null
        }
      ]
    }
  ]
}
```

Exemple `400` réponse:

```json
{
  "errorCode": "ERR001",
  "errorDesc": "Invalid Request"
}
```