PushPush file changes

Push file changes

Creates, updates, or deletes documentation files in a single Git commit. Supports up to 20 operations per request. Pushing to the deployment branch triggers a live deployment. Requires editor or admin role.

curl -X POST "https://api.documentationai.app/api/v1/push" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "commitMessage": "example_string",
  "branch": "example_string",
  "operations": [
    {
      "type": "create",
      "path": "getting-started/quickstart.mdx",
      "content": "example_string"
    }
  ]
}'
{
  "commitSha": "example_string",
  "branch": "example_string",
  "isDeploymentBranch": true,
  "operationsCompleted": 42
}
POST
/push
POST
Bearer Token
Bearer Tokenstring
Required

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Content-Typestring
Required

The media type of the request body

Options: application/json
commitMessagestring
Required

Git commit message

Min length: 1 • Max length: 500
branchstring

Target branch. Defaults to the deployment branch.

operationsarray
Required

File operations to perform in this commit

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

Body

application/json
commitMessagestring
Required

Git commit message

branchstring

Target branch. Defaults to the deployment branch.

operationsarray
Required

File operations to perform in this commit

Responses