Skip to main content
A translation key represents a single translatable string in your application. Each key has a unique identifier (the key name), an optional description that provides context for translators, and optional tags for organization. The actual translation values for each language are stored separately on the Translations resource. Keys are always scoped to a project. All key endpoints require a :projectId path parameter.

Endpoints

POST   /api/projects/:projectId/keys              Create a key
GET    /api/projects/:projectId/keys              List keys (paginated)
GET    /api/projects/:projectId/keys/:keyId       Get a key
PATCH  /api/projects/:projectId/keys/:keyId       Update a key
DELETE /api/projects/:projectId/keys/:keyId       Delete a key
POST   /api/projects/:projectId/keys/bulk         Bulk create keys
PATCH  /api/projects/:projectId/keys/bulk         Bulk update keys
DELETE /api/projects/:projectId/keys/bulk         Bulk delete keys

Create a Key

curl -X POST https://api.nt3.io/api/projects/proj_6abc123def456/keys \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "nav.home",
    "description": "Navigation bar home link label",
    "tags": ["navigation", "ui"],
    "namespace": "common"
  }'
Response:
{
  "_id": "key_abc123",
  "key": "nav.home",
  "description": "Navigation bar home link label",
  "tags": ["navigation", "ui"],
  "namespace": "common",
  "projectId": "proj_6abc123def456",
  "createdAt": "2025-03-01T10:05:00.000Z",
  "updatedAt": "2025-03-01T10:05:00.000Z"
}

List Keys

Key listing is paginated. See Pagination for details.
curl "https://api.nt3.io/api/projects/proj_6abc123def456/keys?page=1&limit=50" \
  -H "X-API-Key: entri_your_token_here"
Response:
{
  "data": [
    {
      "_id": "key_abc123",
      "key": "nav.home",
      "description": "Navigation bar home link label"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 50,
    "total": 1,
    "totalPages": 1
  }
}

Get a Key

curl https://api.nt3.io/api/projects/proj_6abc123def456/keys/key_abc123 \
  -H "X-API-Key: entri_your_token_here"

Update a Key

All fields are optional — only included fields are changed.
curl -X PATCH https://api.nt3.io/api/projects/proj_6abc123def456/keys/key_abc123 \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"description": "Revised description for translators"}'

Delete a Key

Deleting a key also removes all of its translations across all languages.
curl -X DELETE https://api.nt3.io/api/projects/proj_6abc123def456/keys/key_abc123 \
  -H "X-API-Key: entri_your_token_here"

Bulk Operations

Use bulk endpoints when creating, updating, or deleting many keys at once. This is significantly more efficient than individual requests and reduces the risk of hitting rate limits. Bulk create:
curl -X POST https://api.nt3.io/api/projects/proj_6abc123def456/keys/bulk \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "keys": [
      { "key": "nav.home", "description": "Home link" },
      { "key": "nav.about", "description": "About link" },
      { "key": "nav.contact", "description": "Contact link" }
    ]
  }'
Bulk delete:
curl -X DELETE https://api.nt3.io/api/projects/proj_6abc123def456/keys/bulk \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"keyIds": ["key_abc123", "key_def456"]}'

Key Notes

  • Key names must be unique within a project. Attempting to create a duplicate key name returns 409 Conflict.
  • The Entri CLI uses bulk create internally when you run entri push.
  • Tags and namespaces are optional but help organize large key sets in the editor.