# Fix Smartling API 500 on job creation

## TL;DR

The 500 is on Smartling's side or your payload trips an unhandled case, so validate the payload, retry once, then check their status. First rule out your JSON, a malformed field is the most common trigger. If the payload is clean and it still 500s, wait and retry, then contact support with the request id.

## The error

```text
HTTP 500 Internal Server Error
POST /jobs-api/v3/projects/{id}/jobs to 500, no useful body
```

## Fix it

### Step 1: Validate your payload against the docs

```bash
node -e "const p=require('./job.json'); console.log('jobName' in p && 'targetLocales' in p ? 'required fields present' : 'missing required fields')"
```

Expected: Required fields are present and types look right.

### Step 2: Retry once after a short wait

```bash
sleep 30 && curl -s -o /dev/null -w "%{http_code}" -X POST -H "your auth header -H "Content-Type: application/json" -d @job.json https://api.smartling.com/jobs-api/v3/projects/$SMARTLING_PROJECT/jobs
```

Expected: A transient 500 often clears on the second try.

### Step 3: Check the Smartling status page

```bash
curl -s https://status.smartling.com/api/v2/status.json | head -c 200
```

Expected: You see whether there is an active incident.

### Step 4: Retry with a minimal payload to isolate the trigger

```bash
node -e "console.log('send jobName plus one target locale only, add fields back until it 500s')"
```

Expected: You find the field that triggers it, or it works and the original had a bad value.

## When to use this

- Smartling job creation returns 500
- The error body is empty or generic

## When NOT to use this

- The API returns 400, that is your payload, fix the named field
- The API returns 401, that is auth

## Tool and version compatibility

- Smartling Jobs API v3
- Check status.smartling.com during incidents

## Variant phrasings

### 500 on file upload instead of job creation

Same approach. Try a tiny test file first to separate payload from service issues.

### 500 only for one project

Something about that project's config trips it. Compare settings with a working project.

## Why it happens

A 500 means the server failed handling the request. With translation APIs that is usually either a transient backend hiccup or one specific payload shape the backend does not handle, like an unusual locale code or a duplicate job name.

## Edge cases

- Always capture the request id or timestamp for support, 500s without it are hard to trace
- Do not retry in a tight loop, back off or you will look like an attack
- Idempotency: check whether the job was created before retrying, 500s can be ambiguous

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_LDPtBunEv_FKSJmekFhxMg
