Manage API keys

Create API key

<div id="admonition-warning">⚠️ <b>Before you can use the Manage API Keys endpoints, you need to <a href="/docs/reference/api/manage-api-keys/">create a Nylas Service Account</a></b>.</div>

Creates an API key for the specified Nylas application.

post/v3/admin/applications/{application_id}/api-keys

Request body

namestring

A short, descriptive name for the API key.

expires_innumber

How long the API key will be valid, in days.

Example request

{
  "name": "example-key",
  "expires_in": 3600
}

Response

OK

request_idstring

ID of the request.

Example response

{
  "request_id": "5fa64c92-e840-4357-86b9-2aa364d35b88",
  "data": {
    "api_key": "<NYLAS_API_KEY>",
    "application_id": "ad410018-d306-43f9-8361-fa5d7b2172e0",
    "created_at": 1742932766,
    "expires_at": 1753300766,
    "id": "<NYLAS_API_KEY_ID>",
    "name": "example-key",
    "permissions": [
      "apikey.create",
      "apikey.get",
      "apikey.delete"
    ],
    "status": "active",
    "updated_at": 1742932766
  }
}

Changes