Skip to main content
POST
/
api
/
public
/
prismy-hosted
/
merge-branch
Merge branch into main
curl --request POST \
  --url https://app.prismy.io/api/public/prismy-hosted/merge-branch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "repositoryName": "my-repo",
  "branch": "feature/new-translations"
}'
{
"success": true,
"message": "Successfully merged branch 'feature/new-translations' into 'main'",
"branch": "feature/new-translations",
"mainBranch": "main",
"filesProcessed": 5,
"successfulMerges": 5,
"failedMerges": 0,
"totalKeysAdded": 12,
"totalKeysUpdated": 3,
"totalKeysKeptFromMain": 45,
"versionsUpdated": 15,
"results": [
{
"success": true,
"filePath": "<string>",
"language": "<string>",
"keysAdded": 123,
"keysUpdated": 123,
"keysKeptFromMain": 123
}
]
}

Authorizations

Authorization
string
header
required

API token from your organization settings

Body

application/json
repositoryName
string
required

Name of the repository to merge

Example:

"my-repo"

branch
string
required

Name of the branch to merge into main

Example:

"feature/new-translations"

Response

Branch merged successfully

success
boolean
Example:

true

message
string
Example:

"Successfully merged branch 'feature/new-translations' into 'main'"

branch
string
Example:

"feature/new-translations"

mainBranch
string
Example:

"main"

filesProcessed
integer

Number of files processed during merge

Example:

5

successfulMerges
integer

Number of files successfully merged

Example:

5

failedMerges
integer

Number of files that failed to merge

Example:

0

totalKeysAdded
integer

Total number of new keys added from branch

Example:

12

totalKeysUpdated
integer

Total number of keys updated during merge

Example:

3

totalKeysKeptFromMain
integer

Total number of keys kept from main branch

Example:

45

versionsUpdated
integer

Number of key versions updated

Example:

15

results
object[]

Detailed results for each file processed

I