curl --request POST \
--url https://public-api.hyperlocalise.com/v1/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"projectId": "<string>",
"title": "<string>",
"description": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"ownerEmail": "jsmith@example.com"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '<string>',
title: '<string>',
description: '<string>',
dueAt: '2023-11-07T05:31:56Z',
ownerEmail: 'jsmith@example.com'
})
};
fetch('https://public-api.hyperlocalise.com/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/jobs"
payload = {
"projectId": "<string>",
"title": "<string>",
"description": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"ownerEmail": "jsmith@example.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/jobs"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"ownerEmail\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"job": {
"id": "<string>",
"type": "keys",
"status": "queued"
}
}{
"job": {
"id": "<string>",
"type": "keys",
"status": "queued"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Create a job
Requires jobs:write. Takes the same body and checks as POST /api/v1/jobs on the files and jobs host. A keys job is a task for people on a native project’s strings. It starts as waiting_for_review and is ready to work in the editor. A string or file job is recorded as queued. This API does not start AI translation for it. A file job with fileInput.step is a task for a person on that file instead: it starts as waiting_for_review, or as queued when fileInput.after names a job of the same project that is not yet succeeded or cancelled, and opens when that job is (400 after_job_not_found when no such job is in the project). A task created here is not analysed for Reports until work is saved in it; one created with POST /api/v1/jobs is. Languages must be enabled on the project. A file job’s fileFormat must match its source file’s name (400 source_file_format_mismatch gives details.expectedFileFormat). A workspace holds at most 50 open jobs, not counting tasks for people (keys jobs and file jobs with a step), and creates at most 120 jobs an hour, tasks for people included (429 organization_job_budget_exceeded). Send an Idempotency-Key header to retry safely. A repeat of the same request returns the first job with 200 and Idempotent-Replayed: true. The same key with a different body returns 422 idempotency_key_reused. Keys are shared with POST /api/v1/jobs.
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"projectId": "<string>",
"title": "<string>",
"description": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"ownerEmail": "jsmith@example.com"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '<string>',
title: '<string>',
description: '<string>',
dueAt: '2023-11-07T05:31:56Z',
ownerEmail: 'jsmith@example.com'
})
};
fetch('https://public-api.hyperlocalise.com/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/jobs"
payload = {
"projectId": "<string>",
"title": "<string>",
"description": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"ownerEmail": "jsmith@example.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/jobs"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"ownerEmail\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"job": {
"id": "<string>",
"type": "keys",
"status": "queued"
}
}{
"job": {
"id": "<string>",
"type": "keys",
"status": "queued"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Body
Was this page helpful?

