> 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.

# Create or Replace Entries

POST https://api.markup.ai/style-agent/terminology/entries
Content-Type: application/vnd.acrolinx.actif+xml

Create entries, or replace stored ones, from an ACTIF 1.0 document.

Send the document as the request body, with `Content-Type` set to
`application/vnd.acrolinx.actif+xml`, `application/xml` or `text/xml`. It
may hold up to 500 entries and 10 MB.

Each entry is the entry's complete new state:

* An entry whose `entry/uuid` matches a stored entry replaces it. Any other
  entry is created, keeping the `entry/uuid` and `term/uuid` values it
  carries, or getting new ones.
* Terms are matched by `term/uuid`. A stored term the entry leaves out is
  deleted, and a field the entry leaves empty is cleared.
* The term in `<head>` becomes the entry's head term. Without one, the
  current head stays if it is still in the entry, otherwise the first term
  becomes head.
* Languages, statuses, domains, morphosyntactic categories, and fields and
  their list values are given by name, as `GET /schema` lists them. A term
  without a status gets the default status.
* Dates, users, frequency and history events in the document are ignored:
  the server records them.

The document is stored entirely or not at all. A `400` lists every problem
in `errors`, and nothing is stored. A `409` means an import is running or
another request is writing the same entries; retry later.

Returns `201` if any entry was new, otherwise `200`, with the stored
entries in document order and a `Location` header for the first.

Reference: https://docs.markup.ai/developer-reference/api-reference/style-agent/terminology/write-entries

## Authentication

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

## Request

### Body (application/vnd.acrolinx.actif+xml)

This endpoint expects a string.

- `string`

## Response

### 200

Successful Response

- `entries` (list of EntryWriteResult, required)

### 201

At least one entry was new.

- `entries` (list of EntryWriteResult, required)

## Errors

### 400 Bad Request Error

The document is not valid ACTIF, or names something the organization does not have. `errors` lists every problem.

- `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.
- `errors` (list of string, required) — Every problem found, each naming the entry (by position in the document) and term it is in.

### 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.

### 409 Conflict Error

An import is running, or another request is writing the same entries. Retry later.

- `any`

### 413 Content Too Large Error

The document is larger than 10 MB.

- `any`

### 415 Unsupported Media Type Error

The body is not sent as ACTIF XML.

- `any`

### 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

### EntryWriteResult

One entry from the posted document, as stored.

- `uuid` (string, required) — The entry's uuid, as in ACTIF `entry/uuid`.
- `id` (string, required) — The entry's ID, as in ACTIF `entry/id`.
- `created` (boolean, required) — True if the entry was new; false if it replaced a stored one.

## Examples

### Example 1

**Request**

```json
"string"
```

**Response**

```json
{
  "entries": [
    {
      "uuid": "string",
      "id": "string",
      "created": true
    }
  ]
}
```

**SDK Code**

```python Python
from pathlib import Path

import requests

response = requests.post(
    "https://api.markup.ai/style-agent/terminology/entries",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/vnd.acrolinx.actif+xml",
    },
    data=Path("entries.xml").read_bytes(),
)
print(response.status_code, response.json())

```

```javascript
const url = 'https://api.markup.ai/style-agent/terminology/entries';
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/vnd.acrolinx.actif+xml'
  },
  body: '"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/entries"

	payload := strings.NewReader("\"string\"")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/vnd.acrolinx.actif+xml")

	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/entries")

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/vnd.acrolinx.actif+xml'
request.body = "\"string\""

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/entries")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/vnd.acrolinx.actif+xml")
  .body("\"string\"")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.markup.ai/style-agent/terminology/entries', [
  'body' => '"string"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/vnd.acrolinx.actif+xml',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/style-agent/terminology/entries");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/vnd.acrolinx.actif+xml");
request.AddParameter("application/vnd.acrolinx.actif+xml", "\"string\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/vnd.acrolinx.actif+xml"
]

let postData = NSData(data: ""string"".data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/style-agent/terminology/entries")! 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()
```

### Example 2

**Request**

```json
"string"
```

**Response**

```json
{
  "entries": [
    {
      "uuid": "string",
      "id": "string",
      "created": true
    }
  ]
}
```

**SDK Code**

```python Python
from pathlib import Path

import requests

response = requests.post(
    "https://api.markup.ai/style-agent/terminology/entries",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/vnd.acrolinx.actif+xml",
    },
    data=Path("entries.xml").read_bytes(),
)
print(response.status_code, response.json())

```

```javascript
const url = 'https://api.markup.ai/style-agent/terminology/entries';
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/vnd.acrolinx.actif+xml'
  },
  body: '"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/entries"

	payload := strings.NewReader("\"string\"")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/vnd.acrolinx.actif+xml")

	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/entries")

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/vnd.acrolinx.actif+xml'
request.body = "\"string\""

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/entries")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/vnd.acrolinx.actif+xml")
  .body("\"string\"")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.markup.ai/style-agent/terminology/entries', [
  'body' => '"string"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/vnd.acrolinx.actif+xml',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/style-agent/terminology/entries");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/vnd.acrolinx.actif+xml");
request.AddParameter("application/vnd.acrolinx.actif+xml", "\"string\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/vnd.acrolinx.actif+xml"
]

let postData = NSData(data: ""string"".data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/style-agent/terminology/entries")! 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()
```