PHPackages                             smartcat/smartcat-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. smartcat/smartcat-api

ActiveLibrary[API Development](/categories/api)

smartcat/smartcat-api
=====================

PHP client for SmartCAT API https://smartcat.ai/api/methods/

3.0.0(1y ago)662.6k↓33.3%10[6 PRs](https://github.com/smartcatai/SmartCAT-API/pulls)1GPL-3.0-or-laterPHPPHP ^7.4 | ^8.0

Since Sep 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/smartcatai/SmartCAT-API)[ Packagist](https://packagist.org/packages/smartcat/smartcat-api)[ Docs](https://github.com/smartcatai/SmartCAT-API)[ RSS](/packages/smartcat-smartcat-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (47)Used By (1)

PHP client SmartCAT API
=======================

[](#php-client-smartcat-api)

[![Latest Version](https://camo.githubusercontent.com/2de214b7c8c8994a77c1a69a2b75f2ab74ac00fdc37deb68b6dfb3852f4693b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736d61727463617461692f536d6172744341542d4150492e7376673f7374796c653d666c61742d737175617265)](https://img.shields.io/github/release/smartcatai/SmartCAT-API.svg?style=flat-square)[![Software License](https://camo.githubusercontent.com/3dba1db1e4ab59a15bc599566f8b0058f8761fab5b904a3b3853705cc55ddcb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f736d61727463617461692f536d6172744341542d4150492e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/c407aa897530a805dfa9c912c9042574de7d4e0d3aa0e2c30b5a7d8757915b1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736d6172746361742f736d6172746361742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smartcat/smartcat-api)

[PHP client SmartCAT API](https://smartcat.com/api/methods/)

How to use:
-----------

[](#how-to-use)

1. Install [composer](https://getcomposer.org/)
2. composer require smartcat/smartcat-api
3. composer install

[Use Case](https://www.smartcat.com/api/docs/)

```
use SmartCat\Client\SmartCat;

$sc=new SmartCat($login, $password);
```

[Account](https://smartcat.com/api/methods/#!/Account/Account_GetAccountInfo)
-----------------------------------------------------------------------------

[](#account)

[Gets the account details](https://smartcat.com/api/methods/#!/Account/Account_GetAccountInfo)
**GET** /api/integration/v1/account

```
$sc->getAccountManager()->accountGetAccountInfo();
```

[Gets MT engines available for the account](https://smartcat.com/api/methods/#!/Account/Account_GetMTEnginesForAccount)
**GET** /api/integration/v1/account/mtengines

```
$sc->getAccountManager()->accountGetMTEnginesForAccount();
```

Gets LSP's services available for the account\]([https://smartcat.com/api/methods/#!/Account/Account\_GetLSPServicesForAccount](https://smartcat.com/api/methods/#!/Account/Account_GetLSPServicesForAccount))
**GET** /api/integration/v1/account/lsp/services

```
$sc->getAccountManager()->accountGetLSPServicesForAccount();
```

[Gets available assignees (MyTeam freelancers or internal account users)](https://smartcat.ai/api/methods/#!/Account/Account_GetAssignableExecutives)
**GET** /api/integration/v1/account/assignableExecutives

```
$sc->getAccountManager()->accountGetAssignableExecutives();
```

[Callback](https://smartcat.ai/api/methods/#!/Callback)
-------------------------------------------------------

[](#callback)

[Reset configurations of notifications reception](https://smartcat.ai/api/methods/#!/Callback/Callback_Delete)**DELETE** /api/integration/v1/callback

```
$sc->getCallbackManager()->callbackDelete()
```

[Reading configurations of notifications reception of the account](https://smartcat.ai/api/methods/#!/Callback/Callback_Get)**GET** /api/integration/v1/callback

```
$sc->getCallbackManager()->callbackGet()
```

[Creating and updating configurations of notifications reception](https://smartcat.ai/api/methods/#!/Callback/Callback_Update)**POST** /api/integration/v1/callback

```
$callback=new CallbackPropertyModel();
$callback->setUrl('https://smartcat.ai');
$res=$sc->getCallbackManager()->callbackUpdate($callback);
```

[Reading the last sending errors (no more than 100)](https://smartcat.ai/api/methods/#!/Callback/Callback_GetLastErrors)**GET** /api/integration/v1/callback/lastErrors

```
$sc->getCallbackManager()->callbackGetLastErrors(['limit'=>$limit])
```

[Client](https://smartcat.ai/api/methods/#!/Client)
---------------------------------------------------

[](#client)

[Creates a client with the specified name and returns the Id](https://smartcat.ai/api/methods/#!/Client/Client_CreateClient)
If the client already exists, just returns the Id.
**POST** /api/integration/v1/client/create

```
$clientId = $sc->getClientManager()->clientCreateClient('Test client');
```

[Get details on a client specified within an account](https://smartcat.ai/api/methods/#!/Client/Client_GetClient)
**GET** /api/integration/v1/client/{clientId}

```
$client = $sc->getClientManager()->clientGetClient($clientId);
```

[Sets the specified net rate model for the specified customer](https://smartcat.ai/api/methods/#!/Client/Client_SetClientNetRate)
**PUT** /api/integration/v1/client/{clientId}/set

```
$client = $sc->getClientManager()->clientSetClientNetRate($clientId, ['netRateId' => $netRateId]);
```

[Directories](https://smartcat.ai/api/methods/#!/Directories)
-------------------------------------------------------------

[](#directories)

[Receive the specified directory](https://smartcat.ai/api/methods/#!/Directories/Directories_Get)**GET** /api/integration/v1/directory

```
$sc->getDirectoriesManager()->directoriesGet(['type'=>'projectStatus'])
```

[Gets parsing formats supported by the account](https://smartcat.ai/api/methods/#!/Directories/Directories_GetSupportedFormatsForAccount)
**GET** /api/integration/v1/directory/formats

```
$sc->getDirectoriesManager()->directoriesGetSupportedFormatsForAccount();
```

[Document](https://smartcat.ai/api/methods/#!/Document)
-------------------------------------------------------

[](#document)

[Delete one or several documents](https://smartcat.ai/api/methods/#!/Document/Document_Delete)**DELETE** /api/integration/v1/document

```
$sc->getDocumentManager()->documentDelete(['documentIds'=>['id1','id2']])
```

[Receive document model](https://smartcat.ai/api/methods/#!/Document/Document_Get)**GET** /api/integration/v1/document

```
$sc->getDocumentManager()->documentGet(['documentId'=>$docId])
```

[Update assigned document](https://smartcat.ai/api/methods/#!/Document/Document_Update)**PUT** /api/integration/v1/document/update

```
$bilingualFileImportSettings = new BilingualFileImportSettingsModel();
$bilingualFileImportSettings
    ->setConfirmMode('none')
    ->setLockMode('none')
    ->setTargetSubstitutionMode('all');
$updateDocumentModel = new UploadDocumentPropertiesModel();
$updateDocumentModel->setBilingualFileImportSettings($bilingualFileImportSettings);
$res = $sc->getDocumentManager()->documentUpdate([
    'documentId' => $docId,
    'updateDocumentModel' => $updateDocumentModel,
    'uploadedFile' => [
        'fileContent' => fopen(__DIR__ . '\Resources\File2_EN.docx', 'r'),
        'fileName' => 'File2_EN.docx'
    ]
]);
```

[Rename assigned document](https://smartcat.ai/api/methods/#!/Document/Document_Rename)**PUT** /api/integration/v1/document/rename

```
$sc->getDocumentManager()->documentRename(['documentId'=>$docId,'name'=>'New file name'])
```

[Translate indicated document using the transferred file with translations](https://smartcat.ai/api/methods/#!/Document/Document_Translate)**PUT** /api/integration/v1/document/translate

```
$sc->getDocumentManager()->documentTranslate([
   'documentId'=>$docId,
   'translationFile'=>[
       'filePath'=>'file path',
       'fileName'=>'file name'
   ]
])
```

[Импортировать xliff-файл с переводами документа](https://smartcat.ai/api/methods/#!/Document/Document_TranslateWithXliff)
**PUT** /api/integration/v1/document/translateWithXliff

```
$sc->getDocumentManager()->documentTranslateWithXliff([
    'documentId' => $docId,
    'confirmTranslation' => true,
    'overwriteUpdatedSegments' => true,
    'translationFile' => [
        'filePath' => 'file path',
        'fileName' => 'file.xliff'
    ]
]);
```

[Receive the status of adding document translation](https://smartcat.ai/api/methods/#!/Document/Document_GetTranslationStatus)**GET** /api/integration/v1/document/translate/status

```
$sc->getDocumentManager()->documentGetTranslationStatus(['documentId'=>$docId])
```

[Gets a detailed report about translation importing results](https://smartcat.ai/api/methods/#!/Document/Document_GetTranslationsImportResult)
**GET** /api/integration/v1/document/translate/result

```
$sc->getDocumentManager()->documentGetTranslationsImportResult(['documentId' => $docsId]);
```

[Gets statistics](https://smartcat.ai/api/methods/#!/Document/Document_GetTranslationsImportResult)
**GET** /api/integration/v1/document/statistics

```
$sc->getDocumentManager()->documentGetStatistics(['documentId' => $docsId]);
```

[Split document into equal segments according to the number of words and assign each freelancer to one segment](https://smartcat.ai/api/methods/#!/Document/Document_AssignFreelancersToDocument)**POST** /api/integration/v1/document/assignFreelancers

```
$sc->getDocumentManager()->documentAssignFreelancersToDocument(
 ['Abbyyaolid1','Abbyyaolid2'],
 [
   'documentId' => $documentId,
   'stageNumber' => $stageNumber
 ]
)
```

[DocumentExport](https://smartcat.ai/api/methods/#!/DocumentExport)
-------------------------------------------------------------------

[](#documentexport)

[Request document (-s) export](https://smartcat.ai/api/methods/#!/DocumentExport/DocumentExport_RequestExport)**POST** /api/integration/v1/document/export

```
$sc->getDocumentExportManager()->documentExportRequestExport(['documentIds'=>['documenId1','documentId2'])
```

[Download the results of export](https://smartcat.ai/api/methods/#!/DocumentExport/DocumentExport_DownloadExportResult)**GET** /api/integration/v1/document/export/{taskId}

```
$sc->getDocumentExportManager()->documentExportDownloadExportResult($taskId);
```

[Glossary](https://smartcat.ai/api/methods/#!/Glossary)
-------------------------------------------------------

[](#glossary)

[Получить набор глоссариев](https://smartcat.ai/api/methods/#!/Glossary/Glossary_GetGlossaries)
**GET** /api/integration/v1/glossaries

```
$res = $sc->getGlossaryManager()->glossaryGetGlossaries();
```

[Invoice](https://smartcat.ai/api/methods/#!/Invoice)
-----------------------------------------------------

[](#invoice)

[Creates a payable for a freelancer](https://smartcat.ai/api/methods/#!/Invoice/Invoice_ImportJob)
**POST** /api/integration/v1/invoice/job

```
$importJobModel = new ImportJobModel();
$importJobModel->setFreelancerId($freelanceId)
    ->setServiceType('translation')
    ->setJobDescription('Test invoice')
    ->setUnitsType('Any text')
    ->setUnitsAmount(10)
    ->setPricePerUnit(1)
    ->setCurrency('usd');
$res=$sc->getInvoiceManager()->invoiceImportJob($importJobModel);
```

[PlaceholderFormatApi](https://smartcat.ai/api/methods/#!/PlaceholderFormatApi)
-------------------------------------------------------------------------------

[](#placeholderformatapi)

[Gets all placeholder formats available in the current account](https://smartcat.ai/api/methods/#!/PlaceholderFormatApi/PlaceholderFormatApi_GetPlaceholderFormats)
**GET** /api/integration/v1/placeholders

```
$res = $sc->getPlaceholderFormatApiManager()->placeholderFormatApiGetPlaceholderFormats();
```

[Saves a set of placeholder formats for the current account](https://smartcat.ai/api/methods/#!/PlaceholderFormatApi/PlaceholderFormatApi_UpdatePlaceholderFormats)
**PUT** /api/integration/v1/placeholders

```
$placeHolder1 = new PlaceholderFormatModel();
$placeHolder1->setRegex($regEx1);
$placeHolder2 = new PlaceholderFormatModel();
$placeHolder2->setRegex($regEx2);
$res = $sc->getPlaceholderFormatApiManager()->placeholderFormatApiUpdatePlaceholderFormats([$placeHolder1, $placeHolder2]);
```

[Validates the specified placeholder format](https://smartcat.ai/api/methods/#!/PlaceholderFormatApi/PlaceholderFormatApi_ValidatePlaceholderFormat)
**GET** /api/integration/v1/placeholders/validate

```
$res = $this->sc->getPlaceholderFormatApiManager()->placeholderFormatApiValidatePlaceholderFormat(['format' => 'Stable\:(\s+)(.+)[\r|]\n']);
```

[Project](https://smartcat.ai/api/methods/#!/Project)
-----------------------------------------------------

[](#project)

[Delete project](https://smartcat.ai/api/methods/#!/Project/Project_Delete)**DELETE** /api/integration/v1/project/{projectId}

```
$sc->getProjectManager()->projectDelete($projectId)
```

[Receive project model](https://smartcat.ai/api/methods/#!/Project/Project_Get)**GET** /api/integration/v1/project/{projectId}

```
sc->getProjectManager()->projectGet($projectId)
```

[Update project using ID](https://smartcat.ai/api/methods/#!/Project/Project_UpdateProject)
**PUT** /api/integration/v1/project/{projectId}

[Receive the list of all projects in account](https://smartcat.ai/api/methods/#!/Project/Project_GetAll)**GET** /api/integration/v1/project/list

```
$sc->getProjectManager()->projectGetAll()
```

Receive the list of all projects in account with offset (v2)

**GET** /api/integration/v2/project/list

```
$sc->getProjectManager()->projectsGetWithOffset($offset = 0, $limit = 100)
```

[Receive statistics and project value](https://smartcat.ai/api/methods/#!/Project/Project_GetProjectStatistics)
**GET** /api/integration/v2/project/{projectId}/statistics

```
$sc->getProjectManager()->projectGetProjectStatistics($projectId);
do {
   sleep(5);
   $res = $sc->getProjectManager()->projectGetProjectStatistics($projectId);
} while(!is_array($res));
```

[Receiving statistics for the completed parts of the project](https://smartcat.ai/api/methods/#!/Project/Project_GetCompletedWorkStatistics)
**GET** /api/integration/v1/project/{projectId}/completedWorkStatistics

```
$res = $sc->getProjectManager()->projectGetCompletedWorkStatistics($projectId);
```

[Receiving a list of the TMs plugged into the project](https://smartcat.ai/api/methods/#!/Project/Project_GetProjectTranslationMemories)
**GET** /api/integration/v1/project/{projectId}/translationmemories

```
$res = $sc->getProjectManager()->projectGetProjectTranslationMemories($projectId);
```

[Rewrite connected TMs — same set of TMs for all target languages](https://smartcat.ai/api/methods/#!/Project/Project_SetTranslationMemoriesForWholeProject)
**POST** /api/integration/v1/project/{projectId}/translationmemories

```
$translationMemoryForProjectModel = new TranslationMemoryForProjectModel();
$translationMemoryForProjectModel->setId($tmId);
$translationMemoryForProjectModel->setIsWritable(true);
$translationMemoryForProjectModel->setMatchThreshold(100);
$res = $sc->getProjectManager()->projectSetTranslationMemoriesForWholeProject($projectId, [$translationMemoryForProjectModel]);
```

[Gets a set of glossaries enabled for a project](https://smartcat.ai/api/methods/#!/Project/Project_GetGlossaries)
**GET** /api/integration/v1/project/{projectId}/glossaries

```
$res = $sc->getProjectManager()->projectGetGlossaries($projectId);
```

[Enables a set of glossaries for a project](https://smartcat.ai/api/methods/#!/Project/Project_SetGlossaries)
**PUT** /api/integration/v1/project/{projectId}/glossaries

```
$res = $this->sc->getProjectManager()->projectSetGlossaries($projectId, [$glossaryId1, $glossaryId2]);
```

[Starts generating statistics for the project](https://smartcat.ai/api/methods/#!/Project/Project_BuildStatistics)
**POST** /api/integration/v1/project/{projectId}/statistics/build

```
$sc->getProjectManager()->projectBuildStatistics($this->prj->getId());
```

[Rewrite connected TMs — each target language with its own set of TMs](https://smartcat.ai/api/methods/#!/Project/Project_SetTranslationMemoriesForWholeProject)
**POST** /api/integration/v1/project/{projectId}/translationmemories/bylanguages

```
$translationMemoryForProjectModel = new TranslationMemoryForProjectModel();
$translationMemoryForProjectModel->setId($tmId);
$translationMemoryForProjectModel->setIsWritable(true);
$translationMemoryForProjectModel->setMatchThreshold(100);
$tm = new TranslationMemoriesForLanguageModel();
$tm->setLanguage('en');
$tm->setTranslationMemories([$translationMemoryForProjectModel]);
$res = $sc->getProjectManager()->projectSetProjectTranslationMemoriesByLanguages($projectId, [$tm]);
```

[Create a project](https://smartcat.ai/api/methods/#!/Project/Project_CreateProject)**POST** /api/integration/v1/project/create

```
$prjCreate = new CreateProjectWithFilesModel();
$prjCreate->setName('Test project');
$prjCreate->setDescription('Test project');
$prjCreate->setSourceLanguage('ru');
$prjCreate->setTargetLanguages(['en']);
$prjCreate->setAssignToVendor(false);
$prjCreate->setUseMT(false);
$prjCreate->setPretranslate(false);
$prjCreate->setAutoPropagateRepetitions(false);
$prjCreate->setIsForTesting(true);
$prjCreate->setWorkflowStages(['translation']);
$prjCreate->attacheFile(fopen(__DIR__.'\Resources\File1_EN.docx'),'File1_EN.docx');
$sc->getProjectManager()->projectCreateProjectWithFiles($prjCreate);
```

[Add new document to project](https://smartcat.ai/api/methods/#!/Project/Project_AddDocument)**POST** /api/integration/v1/project/document

```
$bilingualFileImportSettings = new BilingualFileImportSettingsModel();
$bilingualFileImportSettings
    ->setConfirmMode('none')
    ->setLockMode('none')
    ->setTargetSubstitutionMode('all');
$documentModel = new CreateDocumentPropertyWithFilesModel();
$documentModel->setBilingualFileImportSettings($bilingualFileImportSettings);
$documentModel->attachFile(fopen(__DIR__ . '\Resources\File2_EN.docx'), 'File2_EN.docx');
$res = $sc->getProjectManager()->projectAddDocument([
    'documentModel' => [$documentModel],
    'projectId' => $projectId
]);
```

If you want to set Disassemble Settings, you should set Disassemble Algorithm. For example:

```
$bilingualFileImportSettings = new BilingualFileImportSettingsModel();
$bilingualFileImportSettings
    ->setConfirmMode('none')
    ->setLockMode('none')
    ->setTargetSubstitutionMode('all');

$disassembleSettings = (new DisassembleSettingsModel())
     ->setTranslatableAttributes(['img'=>['data-caption']]);

$documentModel = new CreateDocumentPropertyWithFilesModel();
$documentModel->setDisassembleAlgorithmName('html');
$documentModel->setDisassembleSettings($disassembleSettings);
$documentModel->setBilingualFileImportSettings($bilingualFileImportSettings);
$documentModel->attachFile(fopen(__DIR__ . '\Resources\File2_EN.docx'), 'File2_EN.docx');
$res = $sc->getProjectManager()->projectAddDocument([
    'documentModel' => [$documentModel],
    'projectId' => $projectId
]);
```

Deprecated:

```
$sc->getProjectManager()->projectAddDocument([
    'projectId'=>$projectId,
    'file' => [
       'filePath'=>'path to file',
       'fileName'=>'File name'
    ]
]);
```

[Add new target language to project](https://smartcat.ai/api/methods/#!/Project/Project_AddLanguage)**POST** /api/integration/v1/project/language

```
$sc->getProjectManager()->projectAddLanguage(['projectId'=>$projectId,'targetLanguage'=>'ja']);
```

[Assign the group of translators for the specific stage of documents in project](https://smartcat.ai/api/methods/#!/Project/Project_AssignGroupToWorkflowStage)**PUT** /api/integration/v1/project/{projectId}/assignGroupToWorkflowStage

```
$sc->getProjectManager()->projectAssignGroupToWorkflowStage($projectId,['groupName'=>'Administrators','workflowStage'=>'translation'])
```

[Cancel project](https://smartcat.ai/api/methods/#!/Project/Project_CancelProject)**POST** /api/integration/v1/project/cancel

```
$sc->getProjectManager()->projectCancelProject(['projectId'=>$projectId])
```

[Restore project](https://smartcat.ai/api/methods/#!/Project/Project_RestoreProject)**POST** /api/integration/v1/project/restore

```
$sc->getProjectManager()->projectRestoreProject(['projectId'=>$projectId])
```

[Completes the workflow for all project documents. The project status will change to Completed.](https://smartcat.ai/api/methods/#!/Project/Project_CompleteProject)
**POST** /api/integration/v1/project/restore

```
$sc->getProjectManager()->projectCompleteProject(['projectId' => $this->prj->getId()]);
```

[TranslationMemories](https://smartcat.ai/api/methods/#!/TranslationMemories)
-----------------------------------------------------------------------------

[](#translationmemories)

[Deletes the TM](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_RemoveTranslationMemory)
**DELETE** /api/integration/v1/translationmemory/{tmId}

```
$sc->getTranslationMemoriesManager()->translationMemoriesRemoveTranslationMemory($tmId)
```

[Gets TM details](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_GetMetaInfo)
**GET** /api/integration/v1/translationmemory/{tmId}

```
$sc->getTranslationMemoriesManager()->translationMemoriesGetMetaInfo($tmId);
```

[Imports TMX files into the TM](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_Import)
**POST** /api/integration/v1/translationmemory/{tmId}

```
$sc->getTranslationMemoriesManager()->translationMemoriesImport(
   $tmId,
   [
       'replaceAllContent' => 'true',
       'tmxFile' => [
           'filePath' => __DIR__ . '\Resources\Space.tmx'
       ]
   ]
);
```

[Gets a collection of TMs available for the account](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_Import)
**GET** /api/integration/v1/translationmemory

```
$thirstRes = $sc->getTranslationMemoriesManager()->translationMemoriesGetTranslationMemoriesBatch([
   'lastProcessedId' => '',
   'batchSize' => 10
]);
$last = array_pop($thirstRes);
$secondRes = $sc->getTranslationMemoriesManager()->translationMemoriesGetTranslationMemoriesBatch([
   'lastProcessedId' => $last->getId(),
   'batchSize' => $count
]);
```

[Creates an empty TM](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_CreateEmptyTM)
**POST** /api/integration/v1/translationmemory

```
$tm = new CreateTranslationMemoryModel();
$name = 'PHP Unit ' . date('U');
$tm->setName($name);
$tm->setSourceLanguage('ru');
$tm->setTargetLanguages(['en']);
$tm->setDescription("Description: $name");

$tmId = $sc->getTranslationMemoriesManager()->translationMemoriesCreateEmptyTM($tm);
```

[Gets a collection of tasks for TMX import](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_GetPendingTasks)
**GET** /api/integration/v1/translationmemory/task

```
$sc->getTranslationMemoriesManager()->translationMemoriesGetPendingTasks();
```

[Sets an array of target languages required by the TM](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_SetTMTargetLanguages)
**PUT** /api/integration/v1/translationmemory/{tmId}/target

```
$sc->getTranslationMemoriesManager()->translationMemoriesSetTMTargetLanguages($tmId, ["en", "es"]);
```

[Exports TMX files from the TM](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_ExportFile)
**GET** /api/integration/v1/translationmemory/{tmId}/file

```
$sc->getTranslationMemoriesManager()->translationMemoriesExportFile($tmId, ['withTags' => true])
```

[Gets matches from a given TM](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_GetTMTranslations)
**POST** /api/integration/v1/translationmemory/matches

```
$tmMatch = new TmMatchesRequest();
$tmMatch->setSourceLanguage('en');
$tmMatch->setTargetLanguage('ru');
$segmentModel = new SegmentModel();
$segmentModel->setText('Test text message');
$segmentModel->setPrevContext('');
$segmentModel->setNextContext('');
$segmentModel->setTags([]);
$tmMatch->setSegmentModel($segmentModel);

$sc->getTranslationMemoriesManager()->translationMemoriesGetTMTranslations($tmMatch, ['tmId' => $tmId]);
```

[Removes a given import task](https://smartcat.ai/api/methods/#!/TranslationMemories/TranslationMemories_RemoveSpecificImportTask)
**DELETE** /api/integration/v1/translationmemory/task/{taskId}

```
$sc->getTranslationMemoriesManager()->translationMemoriesRemoveSpecificImportTask($last->getId())
```

[User](https://smartcat.ai/api/methods/#!/User)
-----------------------------------------------

[](#user)

[Creates a new user with the specified parameters](https://smartcat.ai/api/methods/#!/User/User_Create)
**POST** /api/integration/v1/user

```
$user = new CreateUserRequest();
$user->setEmail('test@test.com')
    ->setFirstName('FirstName')
    ->setLastName('LastName')
    ->setExternalId('my-external-id')
    ->setRightsGroup('executive');
$res = $sc->getUserManager()->userCreate($user);
```

[Deletes a user](https://smartcat.ai/api/methods/#!/User/User_Delete)
**DELETE** /api/integration/v1/user/{accountUserId}

```
$sc->getUserManager()->userDelete($smartcatAccountUserId);
```

[Gets a user model](https://smartcat.ai/api/methods/#!/User/User_Get)
**GET** /api/integration/v1/user/{accountUserId}

```
$res = $sc->getUserManager()->userGet($smartcatAccountUserId);
```

[Updates user data](https://smartcat.ai/api/methods/#!/User/User_Update)
**PUT** /api/integration/v1/user/{accountUserId}

```
$updateModel = new UpdateUserRequest();
$updateModel->setFirstName($newName);
$sc->getUserManager()->userUpdate($smartcatAccountUserId, $updateModel);
```

[Gets a user by its external ID](https://smartcat.ai/api/methods/#!/User/User_Get_0)
**GET** /api/integration/v1/user/external

```
$res = $sc->getUserManager()->userGetExternal(['id' => $externalId]);
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Recently: every ~250 days

Total

44

Last Release

692d ago

Major Versions

1.7.0 → 2.0.02018-11-14

1.7.3 → 2.0.42018-12-12

v1.x-dev → 2.0.52019-07-04

2.2.2 → 3.0.02024-06-25

PHP version history (7 changes)1.3.1PHP &gt;=5.4

1.6.0PHP &gt;=5.6

2.0.6PHP ~5.6 | ~7.0

v2.1.x-devPHP ^7.1

2.1.7PHP ^7.3|^7.4|^8.0

2.2.2PHP ^7.3|^8.0

3.0.0PHP ^7.4 | ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/307628fc3ace3665ef743b2a29e532877c54c1b21cbc92e61c9d94bc51f01f59?d=identicon)[smartcat.ai](/maintainers/smartcat.ai)

---

Top Contributors

[![mediclab](https://avatars.githubusercontent.com/u/1334139?v=4)](https://github.com/mediclab "mediclab (16 commits)")[![protasevichsmartcat](https://avatars.githubusercontent.com/u/163120515?v=4)](https://github.com/protasevichsmartcat "protasevichsmartcat (7 commits)")[![AndreySavenkov](https://avatars.githubusercontent.com/u/497800?v=4)](https://github.com/AndreySavenkov "AndreySavenkov (5 commits)")[![m1nyasha](https://avatars.githubusercontent.com/u/44201734?v=4)](https://github.com/m1nyasha "m1nyasha (4 commits)")[![morazalysmartcat](https://avatars.githubusercontent.com/u/173448493?v=4)](https://github.com/morazalysmartcat "morazalysmartcat (2 commits)")[![GreenSuslik](https://avatars.githubusercontent.com/u/16554138?v=4)](https://github.com/GreenSuslik "GreenSuslik (2 commits)")[![larionturlo](https://avatars.githubusercontent.com/u/2802750?v=4)](https://github.com/larionturlo "larionturlo (1 commits)")[![scalywhale](https://avatars.githubusercontent.com/u/33759754?v=4)](https://github.com/scalywhale "scalywhale (1 commits)")[![vzakharov](https://avatars.githubusercontent.com/u/188197?v=4)](https://github.com/vzakharov "vzakharov (1 commits)")

---

Tags

phpapismartcat

### Embed Badge

![Health badge](/badges/smartcat-smartcat-api/health.svg)

```
[![Health](https://phpackages.com/badges/smartcat-smartcat-api/health.svg)](https://phpackages.com/packages/smartcat-smartcat-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
