Source Files
Add File
Required scopes: project.source.file (Read and Write).
post/projects/{projectId}/files
Request
- Base URLhttps://api.crowdin.com/api/v2
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
projectIdinteger required
Project Identifier. Get via List Projects
Request body
Example request
{
"storageId": 61,
"name": "umbrella_app.xliff",
"branchId": 34,
"directoryId": 4,
"title": "source_app_info",
"context": "Additional context valuable for translators",
"type": "xliff",
"parserVersion": 1,
"importOptions": {
"importEqSuggestions": true,
"autoApproveImported": true,
"addToTm": true,
"srxStorageId": 61,
"importTranslations": true,
"scheme": {
"identifier": 0,
"sourcePhrase": 1,
"en": 2,
"de": 3
}
},
"excludedTargetLanguages": [
"en",
"es",
"pl"
],
"attachLabelIds": [
1
],
"fields": {
"some-field-1": "some value 1",
"some-field-2": 12,
"some-field-3": true,
"some-field-4": [
"en",
"ja"
]
}
}Response
File was successfully added
Example response
{
"data": {
"id": 44,
"projectId": 2,
"branchId": 34,
"directoryId": 4,
"name": "umbrella_app.xliff",
"title": "source_app_info",
"context": "Context for translators",
"type": "xliff",
"path": "/directory1/directory2/filename.extension",
"status": "active",
"revisionId": 1,
"priority": "normal",
"importOptions": {
"scheme": {
"identifier": 0,
"sourcePhrase": 1,
"en": 2,
"de": 3
}
},
"exportOptions": {
"exportPattern": "/localization/%locale%/%file_name%.%file_extension%"
},
"excludedTargetLanguages": [
"en",
"es",
"pl"
],
"parserVersion": 12,
"createdAt": "2019-09-19T15:10:43+00:00",
"updatedAt": "2019-09-19T15:10:46+00:00",
"fields": {
"some-field-1": "some value 1",
"some-field-2": 12,
"some-field-3": true,
"some-field-4": [
"en",
"ja"
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.