API Integration

Advanced30 minutesUpdated Sep 23, 2025

Prerequisites

REST API knowledge, programming experience

MultiLang API Reference

MultiLang provides a comprehensive REST API for programmatic access to translation data.

Authentication

All API requests require authentication using API keys or WordPress nonces.

API Key Authentication

curl -H "Authorization: Bearer YOUR_API_KEY" 
     https://yoursite.com/wp-json/multilang/v1/translations

Endpoints

Get Translations

GET /wp-json/multilang/v1/translations

Create Translation

POST /wp-json/multilang/v1/translations
{
    "post_id": 123,
    "language": "es",
    "title": "Título en español",
    "content": "Contenido en español"
}

Update Translation

PUT /wp-json/multilang/v1/translations/456
{
    "title": "Título actualizado",
    "content": "Contenido actualizado"
}

Webhooks

MultiLang can send webhooks when translations are created or updated.

Webhook Events

  • translation.created
  • translation.updated
  • translation.deleted

Rate Limits

API requests are limited to 1000 requests per hour per API key.

Error Handling

All API responses include appropriate HTTP status codes and error messages.