TagsValidate a document tag answerpost

Validate a document tag answer

Marks a tag answer as valid or invalid. Pass validated_answer to override the AI answer.

curl -X POST "https://api.textmine.com/v3/documents/123/tags/123/validate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "is_valid": true,
  "validated_answer": "30 days written notice",
  "comment": "Confirmed against clause 12.2."
}'
{
  "document_id": 67890,
  "status": "processed",
  "tags": [
    {
      "tag_id": 456,
      "name": "Termination notice period",
      "question": "example_string",
      "answer": "30 days",
      "confidence": 0.89,
      "reasoning": "example_string",
      "run_at": "2024-12-25T10:00:00Z",
      "validation": {
        "is_valid": true,
        "validated_answer": "30 days written notice",
        "comment": "example_string",
        "validated_by_id": 123,
        "validated_by_name": "John Doe",
        "validated_at": "2024-12-25T10:00:00Z"
      }
    }
  ]
}
POST
/v3/documents/{documentId}/tags/{tagId}/validate
POST
Base URLstring

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

Bearer Token (`tm_<key>`)
Bearer Tokenstring
Required

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
path
documentIdinteger
Required

Document ID.

Format: int64
path
tagIdinteger
Required

Tag ID.

Format: int64
Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tm_<key>). Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Path Parameters

Body

application/json
is_validboolean
Example:
true
validated_answerstring
Example:
30 days written notice
commentstring
Example:
Confirmed against clause 12.2.

Responses

document_idinteger
statusstring
tagsarray