GitBook Agent is here! Introducing a new way to ideate, plan, and ship docs.
Find out more
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Developer documentation
  • Build an integration
    • Quickstart
    • Install the CLI
      • CLI reference
    • Configure your integration
    • Develop your integration
      • ContentKit
        • Component reference
        • Markdown
      • Integration runtime
      • Client library
        • GitBook methods
    • Publish your integration
    • Submit your integration for review
    • Concepts
    • Guides
      • Create a custom unfurl action
      • Create interactive blocks
      • Receive webhook notifications
      • Work with HTTP requests
  • GitBook API
    • Quickstart
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Imports
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
      • Download OpenAPI spec
    • Authentication
    • Rate limiting
    • Pagination
    • Errors
    • Concepts
    • Guides
      • Track advanced analytics with GitBook's Events Aggregation API
  • Resources
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference

Translations

Configure multi-language support and translation options for your documentation.

Last updated 5 days ago

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

The Translations API provides ways to localize your content into various languages. It supports custom strings, default language settings, and more.

  • GETList all the translations
  • POSTCreate a translation
  • GETGet a translation by its ID
  • PUTUpdate a translation
  • DELETEDelete a translation
  • POSTRun a translation again

List all the translations

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
200

OK

application/json
Responseall of
get
200

OK

Create a translation

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
languagestring · enumRequiredPossible values:
Responses
201

Translation has been created

application/json
400

Bad Request

application/json
post

Get a translation by its ID

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

translationIdstringRequired

The unique id of the translation

Responses
200

OK

application/json
404

No matching translation found

application/json
get

Update a translation

put
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

translationIdstringRequired

The unique id of the translation

Body
Responses
200

Translation has been updated

application/json
400

Bad Request

application/json
put

Delete a translation

delete
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

translationIdstringRequired

The unique id of the translation

Responses
204

Translation did not exist

205

Translation has been deleted

delete

No content

Run a translation again

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

translationIdstringRequired

The unique id of the translation

Responses
204

Translation run triggered

404

No matching translation found

application/json
post

No content

{
  "object": "translation",
  "id": "text",
  "status": "pending",
  "source": {
    "space": "text",
    "language": "en"
  },
  "language": "en",
  "instructions": {
    "object": "document",
    "data": {
      "schemaVersion": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "nodes": [
      {
        "object": "block",
        "type": "paragraph",
        "key": "text",
        "nodes": [
          "[Circular Reference]"
        ],
        "isVoid": false,
        "data": {
          "align": "start"
        }
      }
    ],
    "meta": {
      "token": "text"
    }
  },
  "result": {
    "space": "text",
    "revision": "text"
  },
  "createdAt": "2025-12-24T13:01:25.244Z",
  "updatedAt": "2025-12-24T13:01:25.244Z",
  "stats": {
    "runs": 1,
    "totalWords": 1,
    "totalPages": 1,
    "totalDuration": 1,
    "latestRunDuration": 1,
    "latestPages": 1,
    "latestWords": 1
  },
  "permissions": {
    "view": true,
    "edit": true
  },
  "urls": {
    "location": "https://example.com"
  }
}
{
  "object": "translation",
  "id": "text",
  "status": "pending",
  "source": {
    "space": "text",
    "language": "en"
  },
  "language": "en",
  "instructions": {
    "object": "document",
    "data": {
      "schemaVersion": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "nodes": [
      {
        "object": "block",
        "type": "paragraph",
        "key": "text",
        "nodes": [
          "[Circular Reference]"
        ],
        "isVoid": false,
        "data": {
          "align": "start"
        }
      }
    ],
    "meta": {
      "token": "text"
    }
  },
  "result": {
    "space": "text",
    "revision": "text"
  },
  "createdAt": "2025-12-24T13:01:25.244Z",
  "updatedAt": "2025-12-24T13:01:25.244Z",
  "stats": {
    "runs": 1,
    "totalWords": 1,
    "totalPages": 1,
    "totalDuration": 1,
    "latestRunDuration": 1,
    "latestPages": 1,
    "latestWords": 1
  },
  "permissions": {
    "view": true,
    "edit": true
  },
  "urls": {
    "location": "https://example.com"
  }
}
GET /v1/orgs/{organizationId}/translations HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "translation",
      "id": "text",
      "status": "pending",
      "source": {
        "space": "text",
        "language": "en"
      },
      "language": "en",
      "instructions": {
        "object": "document",
        "data": {
          "schemaVersion": 1,
          "ANY_ADDITIONAL_PROPERTY": "anything"
        },
        "nodes": [
          "[Circular Reference]"
        ],
        "meta": {
          "token": "text"
        }
      },
      "result": {
        "space": "text",
        "revision": "text"
      },
      "createdAt": "2025-12-24T13:01:25.244Z",
      "updatedAt": "2025-12-24T13:01:25.244Z",
      "stats": {
        "runs": 1,
        "totalWords": 1,
        "totalPages": 1,
        "totalDuration": 1,
        "latestRunDuration": 1,
        "latestPages": 1,
        "latestWords": 1
      },
      "permissions": {
        "view": true,
        "edit": true
      },
      "urls": {
        "location": "https://example.com"
      }
    }
  ]
}
POST /v1/orgs/{organizationId}/translations HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 318

{
  "source": {
    "space": "text",
    "language": "en"
  },
  "language": "en",
  "instructions": {
    "object": "document",
    "data": {
      "schemaVersion": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "nodes": [
      {
        "object": "block",
        "type": "paragraph",
        "key": "text",
        "nodes": [
          "[Circular Reference]"
        ],
        "isVoid": false,
        "data": {
          "align": "start"
        }
      }
    ],
    "meta": {
      "token": "text"
    }
  }
}
GET /v1/orgs/{organizationId}/translations/{translationId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "translation",
  "id": "text",
  "status": "pending",
  "source": {
    "space": "text",
    "language": "en"
  },
  "language": "en",
  "instructions": {
    "object": "document",
    "data": {
      "schemaVersion": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "nodes": [
      {
        "object": "block",
        "type": "paragraph",
        "key": "text",
        "nodes": [
          "[Circular Reference]"
        ],
        "isVoid": false,
        "data": {
          "align": "start"
        }
      }
    ],
    "meta": {
      "token": "text"
    }
  },
  "result": {
    "space": "text",
    "revision": "text"
  },
  "createdAt": "2025-12-24T13:01:25.244Z",
  "updatedAt": "2025-12-24T13:01:25.244Z",
  "stats": {
    "runs": 1,
    "totalWords": 1,
    "totalPages": 1,
    "totalDuration": 1,
    "latestRunDuration": 1,
    "latestPages": 1,
    "latestWords": 1
  },
  "permissions": {
    "view": true,
    "edit": true
  },
  "urls": {
    "location": "https://example.com"
  }
}
PUT /v1/orgs/{organizationId}/translations/{translationId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 260

{
  "instructions": {
    "object": "document",
    "data": {
      "schemaVersion": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "nodes": [
      {
        "object": "block",
        "type": "paragraph",
        "key": "text",
        "nodes": [
          "[Circular Reference]"
        ],
        "isVoid": false,
        "data": {
          "align": "start"
        }
      }
    ],
    "meta": {
      "token": "text"
    }
  }
}
DELETE /v1/orgs/{organizationId}/translations/{translationId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
POST /v1/orgs/{organizationId}/translations/{translationId}/run HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*