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

# Get Current Terminology Job

GET https://api.markup.ai/style-agent/terminology/jobs/current

The publish or import currently running, or the last one that ran.

Poll this to follow a job's progress. Because it reports the organization's
job rather than the caller's, it also shows work started by someone else:
while `active` is true, starting a publish or import returns `409`.

`job` is null only when this organization has never published or imported.

Reference: https://docs.markup.ai/developer-reference/api-reference/style-agent/terminology/get-current-terminology-job

## Authentication

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

## Response

### 200

Successful Response

- `active` (boolean, required) — Whether a job is in progress. While true, publishing and importing are unavailable to everyone in the organization.
- `job` (TerminologyJobResponse, optional, nullable) — The in-progress job, or the most recent finished one. Null if this organization has never run either.

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

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

### TerminologyJobResponse

A publish or import running in the background, or the last one that ran.

- `id` (string, required)
- `job_type` (string, required) — Either `publish` or `import`.
- `status` (string, required) — One of `queued`, `running`, `succeeded`, `failed`, or `canceled`. The first two mean the job is still holding the lock.
- `started_at` (datetime, required)
- `stage` (string, optional, nullable) — Coarse progress label while running; null once finished.
- `started_by` (string, optional, nullable) — Who started the job, for display.
- `finished_at` (datetime, optional, nullable)
- `error` (string, optional, nullable) — Why the job failed; null unless status is `failed`.
- `term_count` (integer, optional, nullable) — Terms published, for a successful publish.
- `stats` (map from string to integer, optional, nullable) — Per-record-type counts, for a successful import.
- `languages` (list of TerminologyJobLanguage, optional) — How each language fared, for a publish. Empty for an import, and for publishes that ran before per-language reporting existed.
- `import_term_filters` (list of ImportTermFilterOutcome, optional) — What an import did with each of the legacy terminology's saved term filters. Empty for a publish, and for imports that ran before this was reported.
- `publish_term_filters` (list of PublishTermFilterOutcome, optional) — What a publish did with each filter used for checking. Empty for an import, and for publishes that ran before this was reported.

### TerminologyJobLanguage

How one language's build ended, on a finished publish.

- `language` (string, required)
- `status` (string, required) — `succeeded`, `stored`, `failed`, or `empty`. `empty` means the organization has no terminology at all — a language with none of its own is published as a document with no entries and reports `succeeded`. `stored` means it was published but is not being served, because no language variant is configured for this language; publishing again once one is will serve it.
- `term_count` (integer, optional, default: 0)
- `error` (string, optional, nullable)

### ImportTermFilterOutcome

What an import did with one of the legacy terminology's saved term filters.

- `name` (string, required)
- `outcome` (enum, required) — `imported`: a filter targets used, saved here and used for checking, replacing any filter of the same name. `personal_view`: someone's own Term Browser view, not brought over. `skipped`: a filter targets used that was not brought over; `reason` says why.
  - Allowed values: `imported`, `personal_view`, `skipped`
- `owner` (string, optional, nullable) — The legacy user the filter belonged to.
- `reason` (string, optional, nullable)
- `replaced` (boolean, optional, default: false) — Imported over a filter of the same name made or edited here.

### PublishTermFilterOutcome

What a publish did with one filter used for checking.

- `name` (string, required)
- `outcome` (enum, required) — `published`: sent with the terminology as a term set of its name. `skipped`: not sent; `reason` says why.
  - Allowed values: `published`, `skipped`
- `reason` (string, optional, nullable)
- `term_counts` (map from string to integer, optional) — For a published filter: the terms it was sent with, by language.

## Examples

**Response**

```json
{
  "active": true,
  "job": {
    "id": "string",
    "job_type": "string",
    "status": "string",
    "started_at": "2024-01-15T09:30:00Z",
    "stage": "string",
    "started_by": "string",
    "finished_at": "2024-01-15T09:30:00Z",
    "error": "string",
    "term_count": 1,
    "stats": {},
    "languages": [
      {
        "language": "string",
        "status": "string",
        "term_count": 0,
        "error": "string"
      }
    ],
    "import_term_filters": [
      {
        "name": "string",
        "outcome": "imported",
        "owner": "string",
        "reason": "string",
        "replaced": false
      }
    ],
    "publish_term_filters": [
      {
        "name": "string",
        "outcome": "published",
        "reason": "string",
        "term_counts": {}
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.markup.ai/style-agent/terminology/jobs/current"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.markup.ai/style-agent/terminology/jobs/current';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.markup.ai/style-agent/terminology/jobs/current"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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/jobs/current")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://api.markup.ai/style-agent/terminology/jobs/current")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.markup.ai/style-agent/terminology/jobs/current', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/style-agent/terminology/jobs/current");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/style-agent/terminology/jobs/current")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```