> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.markup.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.markup.ai/_mcp/server.

# Contribute Term

POST https://api.markup.ai/style-agent/terminology/terms/contribute
Content-Type: application/json

Propose a new term.

Always creates a new entry with `proposed` status, for a terminologist to
review; the optional comment is recorded in the term's history. Status,
master term and morphosyntactic restriction cannot be set here.

Requires ``terminology.term-browser:contribute``. Returns 403 without that
permission, and also when the organization has term contribution turned
off — both conditions must hold.

Reference: https://docs.markup.ai/developer-reference/api-reference/style-agent/terminology/contribute-term

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a TermContributionRequest.

- `surface` (string, required)
- `language_id` (string, required)
- `category_ids` (list of string, required)
- `custom_field_values` (list of CustomFieldValueInput, optional, nullable)
- `comment` (string, optional, nullable)

## Response

### 201

Successful Response

- `id` (string, required) — Identifier used by this API.
- `uuid` (string, required) — The term's stable uuid, as in ACTIF `term/uuid`; searchable with `term_uuid`.
- `external_id` (string, required) — The term's ID, as in ACTIF `term/id`.
- `conceptid` (string, required) — The entry's ID, as in ACTIF `entry/id`.
- `conceptuuid` (string, required) — The entry's uuid, as in ACTIF `entry/uuid`; searchable with `entry_uuid`.
- `isconcept` (string, required) — `t` for the entry's head (primary) term, `f` otherwise.
- `surface` (SurfaceResponse, optional, nullable)
- `language` (CategoryResponse, optional, nullable) — One category: a language, status, domain, part of speech, or a value of a custom category type.
- `status` (CategoryResponse, optional, nullable) — One category: a language, status, domain, part of speech, or a value of a custom category type.
- `msr` (CategoryResponse, optional, nullable) — One category: a language, status, domain, part of speech, or a value of a custom category type.
- `categories` (list of CategoryResponse, optional, default: [])
- `variantsconfigurations` (string, optional, nullable)
- `variant_settings` (TermVariantSettings, optional) — How variants of one term are matched during checking.
- `frequency` (integer, optional, default: 0)
- `creationdate` (datetime, optional, nullable)
- `creator` (string, optional, nullable)
- `lastmodificationdate` (datetime, optional, nullable)
- `lastmodifier` (string, optional, nullable)
- `linked_term_count` (integer, optional, default: 0)
- `member_count` (integer, optional, default: 0)
- `custom_fields` (map from string to string, optional, default: {})
- `custom_field_values` (list of CustomFieldValueResponse, optional, default: [])

## Errors

### 401 Unauthorized Error

Authentication failed or no valid API key provided.

- `detail` (string, required) — A description of the error that occurred.
- `status` (integer, required) — The HTTP status code generated by the server for this issue
- `request_id` (string, required) — A unique ID associated with the HTTP request.

### 403 Forbidden Error

Forbidden

- `detail` (string, required) — A description of the error that occurred.
- `status` (integer, required) — The HTTP status code generated by the server for this issue
- `request_id` (string, required) — A unique ID associated with the HTTP request.

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Internal Server Error

Internal Server Error

- `detail` (string, required) — A description of the error that occurred.
- `status` (integer, required) — The HTTP status code generated by the server for this issue
- `request_id` (string, required) — A unique ID associated with the HTTP request.

## Types

### CustomFieldValueInput

One custom field's value(s) to persist for a term. `string_value` carries TEXT/HTML/IMAGE_URL fields; `category_ids` carries CATEGORY (one id) and CATEGORIES (many ids) fields. They are mutually exclusive per field — the field's type decides which applies. An empty `category_ids` with no `string_value` clears the field for that term.

- `field_id` (string, required)
- `string_value` (string, optional, nullable)
- `category_ids` (list of string, optional)

### SurfaceResponse

- `surface` (string, required)
- `lemmastart` (integer, required)
- `lemmalength` (integer, required)
- `lowercasesurface` (string, optional, nullable)

### CategoryResponse

One category: a language, status, domain, part of speech, or a value of a custom category type.

- `id` (string, required) — Identifier used by this API.
- `type` (string, required) — Category type ID
- `name` (string, required) — Name, unique within the type; for languages, the language code such as `en`.
- `displayname` (string, required)
- `issystem` (boolean, required)
- `uuid` (string, required) — Stable identifier carried over from Acrolinx terminology.
- `external_id` (string, required)
- `parent` (string, optional, nullable)
- `priority` (integer, optional, nullable)

### TermVariantSettings

How variants of one term are matched during checking.

- `rules` (TermVariantRuleOverrides, optional) — Per-term overrides of the account-wide variant rules. Null uses the account-wide value.
- `bosForms` (list of string, optional) — Forms accepted at the beginning of a sentence.
- `titleForms` (list of string, optional) — Forms accepted as the title form.
- `alwaysFlag` (list of string, optional) — Variants that are always flagged.
- `neverFlag` (list of string, optional) — Variants that are never flagged.

### CustomFieldValueResponse

One custom field's value for a term. Text fields carry `string_value`; category fields carry `category_values`, with every selected category of a multi-select field in one entry. `field_uuid` is the field's stable identifier carried over from Acrolinx terminology and kept across import and export.

- `field_id` (string, required)
- `field_uuid` (string, required)
- `name` (string, required)
- `displayname` (string, required)
- `type` (string, required)
- `isconceptlevel` (boolean, required)
- `ismultiline` (boolean, required)
- `location` (integer, required)
- `string_value` (string, optional, nullable)
- `category_values` (list of CategoryResponse, optional, default: [])

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### TermVariantRuleOverrides

Per-term overrides of the account-wide variant rules. Null uses the account-wide value.

- `flagVariants` (boolean, optional, nullable)
- `allowHyphen` (boolean, optional, nullable)
- `allowTitleAnywhere` (boolean, optional, nullable)
- `allowUpperCase` (boolean, optional, nullable)
- `allowBOS` (boolean, optional, nullable)
- `requireBOSFormAtBOS` (boolean, optional, nullable)
- `upperCaseTitleAfterHyphen` (boolean, optional, nullable)
- `applyMcatRestriction` (boolean, optional, nullable)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "surface": "string",
  "language_id": "string",
  "category_ids": [
    "string"
  ]
}
```

**Response**

```json
{
  "id": "string",
  "uuid": "string",
  "external_id": "string",
  "conceptid": "string",
  "conceptuuid": "string",
  "isconcept": "string",
  "surface": {
    "surface": "string",
    "lemmastart": 1,
    "lemmalength": 1,
    "lowercasesurface": "string"
  },
  "language": {
    "id": "string",
    "type": "string",
    "name": "string",
    "displayname": "string",
    "issystem": true,
    "uuid": "string",
    "external_id": "string",
    "parent": "string",
    "priority": 1
  },
  "status": {
    "id": "string",
    "type": "string",
    "name": "string",
    "displayname": "string",
    "issystem": true,
    "uuid": "string",
    "external_id": "string",
    "parent": "string",
    "priority": 1
  },
  "msr": {
    "id": "string",
    "type": "string",
    "name": "string",
    "displayname": "string",
    "issystem": true,
    "uuid": "string",
    "external_id": "string",
    "parent": "string",
    "priority": 1
  },
  "categories": [
    {
      "id": "string",
      "type": "string",
      "name": "string",
      "displayname": "string",
      "issystem": true,
      "uuid": "string",
      "external_id": "string",
      "parent": "string",
      "priority": 1
    }
  ],
  "variantsconfigurations": "string",
  "variant_settings": {
    "rules": {
      "flagVariants": true,
      "allowHyphen": true,
      "allowTitleAnywhere": true,
      "allowUpperCase": true,
      "allowBOS": true,
      "requireBOSFormAtBOS": true,
      "upperCaseTitleAfterHyphen": true,
      "applyMcatRestriction": true
    },
    "bosForms": [
      "string"
    ],
    "titleForms": [
      "string"
    ],
    "alwaysFlag": [
      "string"
    ],
    "neverFlag": [
      "string"
    ]
  },
  "frequency": 0,
  "creationdate": "2024-01-15T09:30:00Z",
  "creator": "string",
  "lastmodificationdate": "2024-01-15T09:30:00Z",
  "lastmodifier": "string",
  "linked_term_count": 0,
  "member_count": 0,
  "custom_fields": {},
  "custom_field_values": [
    {
      "field_id": "string",
      "field_uuid": "string",
      "name": "string",
      "displayname": "string",
      "type": "string",
      "isconceptlevel": true,
      "ismultiline": true,
      "location": 1,
      "string_value": "string",
      "category_values": [
        {
          "id": "string",
          "type": "string",
          "name": "string",
          "displayname": "string",
          "issystem": true,
          "uuid": "string",
          "external_id": "string",
          "parent": "string",
          "priority": 1
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.markup.ai/style-agent/terminology/terms/contribute"

payload = {
    "surface": "string",
    "language_id": "string",
    "category_ids": ["string"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.markup.ai/style-agent/terminology/terms/contribute';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"surface":"string","language_id":"string","category_ids":["string"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.markup.ai/style-agent/terminology/terms/contribute"

	payload := strings.NewReader("{\n  \"surface\": \"string\",\n  \"language_id\": \"string\",\n  \"category_ids\": [\n    \"string\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.markup.ai/style-agent/terminology/terms/contribute")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"surface\": \"string\",\n  \"language_id\": \"string\",\n  \"category_ids\": [\n    \"string\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.markup.ai/style-agent/terminology/terms/contribute")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"surface\": \"string\",\n  \"language_id\": \"string\",\n  \"category_ids\": [\n    \"string\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.markup.ai/style-agent/terminology/terms/contribute', [
  'body' => '{
  "surface": "string",
  "language_id": "string",
  "category_ids": [
    "string"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/style-agent/terminology/terms/contribute");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"surface\": \"string\",\n  \"language_id\": \"string\",\n  \"category_ids\": [\n    \"string\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "surface": "string",
  "language_id": "string",
  "category_ids": ["string"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/style-agent/terminology/terms/contribute")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```