This site requires JavaScript

Contact sales +44 20 8144 1336


API Docs


API 1.0

Overview

Base URL is at https://wordy.com/api/1.0/. API keys are managed at https://wordy.com/account/apikeys/.

Sandbox

The sandbox is a testing and development environment that replicates the functionality of Wordy's API. You can use the sandbox to develop and test applications or develop against new or changed API methods.

Base URL for the sandbox is at https://sandbox.wordy.com/api/1.0/. API keys are managed at https://sandbox.wordy.com/account/apikeys/. Test payments can be made with credit cards as specified by Stripe's testing cards.

Implementation

All requests return an JSON-encoded string. See the documentation below for the structure of the data.

Errors are returned in the format: {"error": "failure type", "verbose": "failure message"}.

View account status

GET /account/

Parameters

None

Response

Key Value
balance amount of funds remaining in your account

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/account/
{"balance": "$100.00"}

List all jobs

GET /job/

Parameters

None

Response

List of job IDs.

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/
[101, 107, 262]

Create a job

POST /job/create/

Parameters

Key Value
language_id
intrusive_editing (known in the front-end as content rewrite) true or false
brief
fileToUpload single file to be edited
content raw text to be edited
json flat dictionary of content to be edited
callback_url URL that will receive notifications when the job changes states or receives messages

Note: can only submit one of fileToUpload, content, or json.

Response

Same as /job/123/

Example cURL request with JSON data

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/create/ --form json='{"Title":"Some content"}'
{"id": 123, "status": "acp", "source_language_name": [2, "English (UK)"], "source_word_count": 100, "cost": "$24.00", "intrusive_editing": false, "target_url": "/jobs/123/target/", "created": 1333404184, "brief": "Please edit this file.", "delivery_date": 123, "source_url": "/jobs/123/source/", "display_url": "/jobs/123/"}

Example cURL request with an uploaded file

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/create/ --form fileToUpload=@somefile.txt
{"id": 123, "status": "acp", "source_language_name": [2, "English (UK)"], "source_word_count": 100, "cost": "$24.00", "intrusive_editing": false, "target_url": "/jobs/123/target/", "created": 1333404184, "brief": "Please edit this file.", "delivery_date": 123, "source_url": "/jobs/123/source/", "display_url": "/jobs/123/"}

Price a job without creating it

POST /job/price/

Parameters

Identical to those used to create a new job.

Response

Job price formatted in your currency.

Job information

GET /job/{id}/

Parameters

None

Response

Key Value
id
status awc (awaiting word count), acp (awaiting customer payment), aer (awaiting editor response), acr (awaiting customer response), c (complete)
source_word_count Number of words in the provided document
source_language_name
intrusive_editing Whether the editor has been instructed to rewrite the content
brief
created
delivery_date
cost
display_url
source_url
target_url
callback_url

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/123/
{"id": 123, "status": "acp", "source_language_name": "English (UK)", "source_word_count": 100, "cost": "$24.00", "intrusive_editing": false, "target_url": "/jobs/123/target/", "created": 1333404184, "brief": "Please edit this file.", "delivery_date": 123, "source_url": "/jobs/123/source/", "display_url": "/jobs/123/"}

Original document

GET /job/{id}/source/

Parameters

None

Response

Original document as provided in /job/create/.

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/123/source/
{"Title":"Some content"}

Edited document

GET /job/{id}/target/

Parameters

None

Response

Document as edited or 404 if none exists.

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/123/target/
{"Title":"Some edited content"}

Get conversation associated with job

GET /job/{id}/conversation/

Parameters

None

Response

Key Value
user Name
created Unix timestamp
message Message

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/234/conversation/
[{"user":"John D", "created":1331420408, "message":"First post!"}, {"user":"Editor X", "created":1333150970, "message":"I'm working on your job now."}]

Update conversation

POST /job/{id}/conversation/

Parameters

Key Value
message

Response

None

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/345/conversation/ --form message="This is my new message."
200 OK

Pay for job

POST /job/{id}/pay/

Parameters

None

Response

None

Example cURL request

curl -X POST --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/123/pay/
200 OK

Confirm job as complete

POST /job/{id}/confirm/

Parameters

None

Response

None

Example cURL request

curl -X POST --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/123/confirm/
200 OK

Reject job as incomplete

POST /job/{id}/reject/

Parameters

Key Value
message A message to be left on the job as to why it's being rejected.

Response

None

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/job/123/reject/ --form message="I'm unhappy with the edit."
200 OK

Get available languages

GET /languages/

Parameters

None

Response

Key Value
language_id Language name

Example cURL request

curl --user :e8ddc55d93eb0e8281b255ea236dcc4f https://example.com/api/1.0/languages/
{"1": "English (US)", "2": "English (UK)", "3": "English (CAN)", "7": "Deutsch", "15": "Dansk", "16": "English (IN)", "18": "English (AUS)"}

Callbacks

Example callbacks

Callback posts will be made to the callback_url as provided when the job is initially created.

Customer pays for their job

{"status": ["acp", "aer"], "job_id": 123}

A new message is added to the job

{"username": "John D", "message": "Job claimed by editor.", "job_id": 123}

An editor returns the job to the customer

{"status": ["aer", "acr"], "job_id": 123}