Edit contact group partially

Service version: 1
Last edit: 2022.08.30

Purpose

This endpoint partially updates the group.

Request data

HTTPS method: PATCH

  • Constants and parameters enclosed in curly brackets { } must be replaced with their values.
  • Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.

URL request format

patch
URL request format
https://{baseURL}/notifications/{versionNumber}/groups/{groupId}?key={Your_API_Key}

curl command request format

patch
curl command request format
1curl -XPATCH -d '{
2 "name": "group_name",
3 "webhookUrls": [],
4 "emails": []
5}'
6'https://{baseURL}/notifications/{versionNumber}/groups/{groupId}?key={Your_API_Key}'

PATCH request body format

patch
PATCH request body format - JSON
1{
2 "name": "group_name",
3 "webhookUrls": [],
4 "emails": []
5}

Request parameters

The following table describes the parameters that can be used in a request.

  • Required parameters must be used or the call will fail.
  • Optional parameters may be used.
  • The order of request parameters is not important.

Note: There are no optional parameters in this endpoint.

Required parameters

Description

baseURL


string

The base URL for calling the API.


Value: api.tomtom.com

versionNumber


string

Service version number.


Value: 1

key


string

An API Key valid for the requested service.


Value: Your valid API Key.

groupId


string

The contact group id to gather details for.


Value: A UUID.

PATCH body request fields

The following table describes all of the fields that can appear in a request.

Primary fields

Description

id


string

The UUID of the contact group.

name


string

(Optional) The name of the contact group.


String with a length of up to 255 characters.

webhookUrls


array (string)

The list of URLs to receive a message.


Max: Maximum amount of URLs is 20.

emails


array (string)

The list of email addresses to receive a message.


Max: Maximum amount of email addresses is 20.

Response data

Response body

Response body - JSON
1{
2 "id": "group_id",
3 "name": "group_name",
4 "webhookUrls": [],
5 "emails": []
6}

Response fields

The following table describes all of the fields that can appear in a response.

Primary fields

Description

id


string

The UUID of the contact group.

name


string

(Optional) The name of the contact group.

webhookUrls


array (string)

The list of URLs to receive a message.

emails


array (string)

The list of email addresses to receive a message.

Response codes

Code

Meaning & possible causes

201

Created

400

Bad request :

  • Group name is too long.
  • Emails amount has been exceeded.
  • WebhookUrls amount has been exceeded.
  • All ways of sending notifications are empty.

Example

Request URL

patch
Request example
https://api.tomtom.com/notifications/1/groups/4cf7fd87-3d51-463e-a4e8-733cf033492b?key={Your_API_Key}

PATCH request body

patch
PATCH request body - JSON
1{
2 "webhookUrls": [
3 "http://my.page.co/jenkins/0fd2efd6-349c-4990-a340-f0e789bf5a0c",
4 "http://my.page.com/graphana/82402a7a-9f14-4390-9721-c49e3ecb4bcb",
5 "http://my.page.com/alertforwarder/8bfbcf59-7b51-49be-8d87-acea4adfb464"
6 ]
7}

Response body

Response body - JSON
1{
2 "id": "cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d",
3 "name": "Alert webhooks",
4 "webhookUrls": [
5 "http://my.page.co/jenkins/0fd2efd6-349c-4990-a340-f0e789bf5a0c",
6 "http://my.page.com/graphana/82402a7a-9f14-4390-9721-c49e3ecb4bcb",
7 "http://my.page.com/alertforwarder/8bfbcf59-7b51-49be-8d87-acea4adfb464"
8 ],
9 "emails": ["john.smith@example.com"]
10}