---
title: "Contact"
source: /gcxone/api/contact
locale: en
updated: 2026-09-04
---
Operations on contact resources. 4 endpoints, each relative to `https://api.nxgen.cloud/api/v1` and authenticated as described under [Authentication](/gcxone/api/authentication).

## POST /contact

Add a new contact.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| hierarchyId | query | string | yes | Hierarchy level id like Site, Customer or Service provider ID in which contact is created. |

### Request body

Contact payload

```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"
    }
  ]
}
```

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Success |  |
| 400 | Invalid input |  |
| 403 | Forbidden |  |

Example `200` response:

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

Example `400` response:

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

## PATCH /contact

Patch a contact by contact ID

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| contactId | query | string | yes | Contact ID in which patch is required. |
| hierarchyId | query | string | yes | Hierarchy ID in which the contact is associated with. Example site, customer or service provider ID. |

### Request body

Contact payload

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

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Success |  |
| 400 | Invalid input |  |
| 403 | Forbidden |  |

Example `200` response:

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

Example `400` response:

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

## DELETE /contact

Delete a contact by contact ID

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| contactId | query | string | yes | Contact ID required to be deleted. |
| hierarchyId | query | string | yes | Hierarchy ID in which the contact is associated with. Example site, customer or service provider ID. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Success |  |
| 204 | No Content |  |
| 400 | Invalid input |  |
| 401 | Unauthorized |  |
| 403 | Forbidden |  |

## GET /contact/all

Get list of contacts associated with a hierarchy level id like Site, Customer or Service provider ID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| hierarchyId | query | string | yes | Hierarchy level id like Site, Customer or Service provider ID. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Success | object |
| 400 | Invalid input |  |
| 403 | Forbidden |  |

Example `200` response:

```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
        }
      ]
    }
  ]
}
```

Example `400` response:

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