API Key

Create Api Key

POST

Creates a new API key for the current user with the specified options.

An API key is a credential that you can use to make REST v4 API calls for ProjectManager.com. When you create a new API key, that API key is only visible in the response JSON for the CreateApiKey method. If you do not preserve this information, it cannot be recreated.

Some best practices for working with API keys:

  • An API key is valid for a two year period after it is created. We encourage you to rotate your API keys regularly according to your company’s security policies.
  • You should create separate API keys for each system that works with your API. If that API key is exposed or if that program needs to be shut down, you can revoke that one key and reissue it.
  • An API key is tied to the workspace that created it. A single API key can only interact with one workspace.

Request

This endpoint expects an object.
tokenName
stringOptional
Name of token

Response

This endpoint returns an object
error
objectOptional
If the API call failed, this will contain information about the error that occurred.
success
booleanOptional
True if the API call succeeded; false otherwise.
hasError
booleanOptional
True if the API call failed.
statusCode
enumOptional
The HTTP code of the response.
data
objectOptional
Represents api access key entity
POST
$curl -X POST /api/data/api-keys \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
Response
1{
2 "error": {
3 "technicalError": "technicalError",
4 "additionalErrors": [
5 "additionalErrors"
6 ],
7 "message": "message"
8 },
9 "success": true,
10 "hasError": true,
11 "statusCode": "Continue",
12 "data": {
13 "id": "id",
14 "createdBy": "createdBy",
15 "expires": "2024-01-15T09:30:00Z",
16 "apiKey": "apiKey",
17 "name": "name"
18 }
19}