Add new project

Service version: 1
Last edit: 2022.09.01

Purpose

This endpoint creates a new project and assigns it to a customer's configuration.

Request data

HTTPS method: POST

  • 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

POST
URL request format
https://{baseURL}/geofencing/{versionNumber}/projects/project?key={Your_API_Key}&adminKey={Your_Admin_Key}

curl command request format

POST
curl command request format
1curl -v -XPOST -H "Content-type: application/json" -d
2'{
3 "name": "a_project_name"
4 }'
5'https://{baseURL}/geofencing/{versionNumber}/projects/project?key={Your_API_Key}&adminKey={Your_Admin_Key}'

POST request body format

POST
POST request body format - JSON
1{
2 "name": "a_project_name"
3}

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.

adminKey
string

An Admin Key valid for the provided API key.
Value: Your valid Admin Key.

Response data

Response body

The following JSON code block demonstrates a successful response from the API server.

Response body format - JSON
1{
2 "name": "a_project_name",
3 "id": "a_project_id"
4}

Response fields

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

Primary fields

Description

name
string

The name of the project.

id
string

The UUID of the project.

Response codes

Code

Meaning & possible causes

201

Created.

400

Bad request: Project name already used.

403

Forbidden:

  • Provided Admin Key is invalid.
  • Admin Key is missing.
  • Number of projects exceeds the limits of current configuration.

Example

Add a new project

URL request example

POST
URL request example
https://api.tomtom.com/geofencing/1/projects/project?key={Your_API_Key}&adminKey={Your_Admin_Key}

POST request body example

POST
POST request body example - JSON
1{
2 "name": "Airports in Germany"
3}

Response body example

Response body example - JSON
1{
2 "name": "Airports in Germany",
3 "id": "44de824d-c368-46cf-a234-a6792682dfd6"
4}