API KeysCreate an API key for the authenticated userpost

Create an API key for the authenticated user

Issues a TextMine API key for the authenticated user. The raw tm_... key is returned only once in this response; store it securely and never paste it into docs, code, or chat logs.

curl -X POST "https://api.textmine.com/v3/api-keys" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -d '{
  "name": "Docs maintenance",
  "organizationId": 654,
  "environment": "production"
}'
{
  "id": 123,
  "name": "John Doe",
  "key": "tm_test_xxxxxxxxxxxxxxxxxxxxx",
  "keyPrefix": "tm_test",
  "createdAt": "2024-12-25T10:00:00Z"
}
POST
/v3/api-keys
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

Auth0 user-session JWT used by the TextMine web app, for endpoints such as API-key creation.

Auth0 user-session JWT used by the TextMine web app, for endpoints such as API-key creation.
Content-Typestring
Required

The media type of the request body

Options: application/json
organizationIdinteger

Organization the API key should act in.

Format: int64
expiresAtstring
Format: date-time
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). Auth0 user-session JWT used by the TextMine web app, for endpoints such as API-key creation.

Body

application/json
namestring
Example:
Codex documentation maintenance
organizationIdinteger

Organization the API key should act in.

environmentstring
Example:
production

Responses