|
Documentation
Book a DemoPlatform
PlatformMCPCLIAPI
Workflows
GuidesChangelog

Welcome

  • Overview
  • Authentication
  • Errors & status codes
  • Webhook signatures

Localization

  • Overview
  • Create jobs
  • Lock non-translatable keys
  • Track a job group
  • Get a single job
  • List jobs
  • Webhook delivery
  • Live progress (WebSocket)

Pipeline

  • Overview
  • Pre-localization AI edit
  • Human review
  • AI review (post-edit)
  • Rephrase for natural copy
  • Back-translation check
  • Configure the pipeline
  • Observe pipeline runs

Provisioning

  • Overview
  • Create a provisioning job
  • Source types
  • What the AI extracts
  • Webhook delivery
  • Live progress (WebSocket)

Synchronous

  • Localize
  • Recognize

Engine management

  • Engine Suggestions

Create a provisioning job

Submit the sources you already have, get an engine back. POST /jobs/provisioning takes a name for a new engine and up to 10 sources – links to crawl or raw text – and returns 202 Accepted with the engine's ID. You do not wait for the AI to finish reading your content: the engine exists the moment the call returns, and its configuration is applied as the job runs.

text
POST /jobs/provisioning

This page covers the create call: its parameters, the request shape, and the 202 response. New to async provisioning? Start with the Async Provisioning API overview for the mental model. What counts as a good source is its own page – Source types – and what the AI pulls out of them lives on What the AI extracts.

Authentication

Pass your API key in the X-API-Key header. Keys are organization-scoped and reach every engine in the organization. See Authentication for details.

Parameters#

Only engine.name is required. Everything else shapes what the engine learns – or, if you omit it all, leaves you with a clean engine on defaults.

ParameterTypeDescription
engine.namestringName for the new localization engine.
engine.descriptionstring (optional)Free-text description for the engine.
localesstring[] (optional)BCP-47 target locales to configure for, e.g. ["es", "ja", "de"].
sourcesarray (optional)Up to 10 sources to analyze. Each is a link (a URL the platform crawls) or content (raw text or markdown). See Source types.
callbackUrlstring (optional)HTTPS webhook URL for the completion result. HTTPS only – HTTP callback URLs are rejected. See Webhook delivery.

Request#

A source is a { type, payload } object. Point link sources at pages with real context – brand guidelines, style guides, product docs – and use content for terminology and tone rules you can paste in directly. The request below mixes both: two pages to crawl and one block of explicit rules.

javascript
const response = await fetch("https://api.lingo.dev/jobs/provisioning", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.LINGO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    engine: {
      name: "Acme Corp Engine",
      description: "Production localization engine for acme.com",
    },
    locales: ["de", "fr", "ja", "es"],
    sources: [
      { type: "link", payload: "https://acme.com/brand-guidelines" },
      { type: "link", payload: "https://acme.com/docs/style-guide" },
      {
        type: "content",
        payload:
          "Brand name 'Acme' is never translated. Use formal tone in German (Sie-form). Product names: AcmeFlow, AcmeSync, AcmeVault - always keep in English.",
      },
    ],
    callbackUrl: "https://your-app.com/webhooks/provisioning",
  }),
});

const { jobId, engineId, status } = await response.json();
// 202 back right away.
// status: "in_progress" – the AI is reading your sources.
console.log(engineId); // "eng_X1y2Z3a4B5c6D7e8" – usable right now

Response (202 Accepted)#

The call returns without waiting for the crawl or the analysis – it hands you a job ID to track and an engine ID that is live from this point on.

json
{
  "jobId": "pjb_A1b2C3d4E5f6G7h8",
  "engineId": "eng_X1y2Z3a4B5c6D7e8",
  "status": "in_progress"
}
FieldDescription
jobIdProvisioning job ID (pjb_ prefix). Track the job by connecting a WebSocket for live progress, or receive the result on your webhook when it finishes.
engineIdThe new engine's ID (eng_ prefix). Usable immediately – the configuration the AI extracts is applied to it as the job runs.
statusin_progress when you provide sources; completed when you do not (see below).

The detail that makes this an async call worth making rather than a wait: engineId comes back in the same 202, and it points at a real engine right away. You can store it, send a synchronous Localize request through it, or wire it into your app before the AI has finished reading a single source. As brand voices, glossary items, and instructions are extracted, the platform applies each one to that same engine – the engine exists before its configuration does. To know exactly what the job created, read What the AI extracts.

No sources? You get an engine, not a wait.

Omit sources and there is nothing to crawl, so the engine is created with default model configuration and returned with status: "completed" in the same response. That is the fast path when you want an empty engine to configure yourself – one call, a ready engineId, no background job to track.

Next steps#

Source types
link vs content sources, and what makes a source worth analyzing.
What the AI extracts
Brand voices, glossary items, and instructions – plus the summary the job returns.
Webhook delivery
Receive the completion result at your callback URL, and verify the signature.

Was this page helpful?

Max PrilutskiyMax Prilutskiy·Updated 3 days ago·4 min read