Business RecordsSuggest a business record schemapost

Suggest a business record schema

Creates a suggested schema from a prompt or supplied definition.

curl -X POST "https://api.textmine.com/v3/record-schemas/suggest" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "teamId": 321,
  "vaultId": 12345,
  "name": "Supplier obligations",
  "suggestionPrompt": "Suggest a schema for tracking supplier obligations, renewal dates, termination rights, and governing law."
}'
{
  "id": 3001,
  "teamId": 123,
  "vaultId": 123,
  "name": "John Doe",
  "description": "example_string",
  "status": "active",
  "scopeType": "example_string",
  "scopeId": "example_string",
  "activeVersionId": 123,
  "created": "2024-12-25T10:00:00Z",
  "updated": "2024-12-25T10:00:00Z",
  "versions": [
    {
      "id": 4001,
      "schemaId": 3001,
      "versionNumber": 1,
      "status": "active",
      "recordTypes": [
        {
          "id": 5001,
          "recordTypeKey": "supplier",
          "label": "Supplier"
        }
      ],
      "relationshipTypes": []
    }
  ]
}
POST
/v3/record-schemas/suggest
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.
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.

Body

application/json
vaultIdinteger
Example:
12345
namestring
Required
Example:
Supplier master data
descriptionstring
Example:
Structured supplier facts extracted from contracts.
scopeTypestring
Example:
VAULT
scopeIdstring
Example:
12345
suggestionPromptstring
Example:
Track supplier name, jurisdiction, renewal type, and termination notice.
schemaobject

Responses