service-account

Create API key

Create a new API key for a service account. The secret key value is returned only once in this response — store it securely, as it cannot be retrieved again.

post/api/v2/service-account/{id}/api-key

Request

  • Base URL
    https://central.zerotier.com
  • Auth
    HTTP bearer

Path parameters

idstring required

The service account ID

Request body

descriptionstring
expiresstring date-time required

Example request

{
  "description": "CI deploy key — expires annually",
  "expires": "2027-04-08T00:00:00Z"
}

Response

Created API key (secret is only returned in this response)

idstring required
serviceAccountIdstring required
descriptionstring required
expiresstring date-time required

Expiration time of the API key

keystring required

The API key value

creationTimestring date-time required

Time the API key was created

lastModifiedstring date-time required

Time the API key was last modified

Changes

No recorded changes to this operation across all 1 revision of this API.