The WordFields API is a RESTful web service enabling developers to seamlessly integrate the automated document generation into their applications.
WordFields ensures secure access to its API through API keys. Once you've created your account in WordFields, get your API key in the admin pages of your workspace to start making requests to the WordFields API.
As mentioned above, to authenticate, you must pass your API key with the x-api-key
header. This method allows you to access your WordFields data via API calls, so keep your API key safe to prevent unauthorized access.
Read the authentication guide to get started.
Here is the list of API methods available on the v1.0 endpoint https://api.wordfields.com/v1.0
.
Method | Request | Description |
---|---|---|
Create document | POST /templates/{id}/documents |
Generate a new document based on the specified template. |
List templates | GET /templates |
List templates in the workspace. |
Get template | GET /templates/{id} |
Get the properties of a specified template. |
List workspace | GET /workspace |
List currently authenticated workspace. |
Get workspace | GET /workspace/{id} |
Get the workspace properties. |
To make a request to read from or write to a resource, you construct a HTTP request that looks like this:
{HTTP method} https://api.wordfields.com/v1/{path}?{query-parameters}
Here are the components of the request, explained:
{HTTP method}
: An HTTP method specifies the type of action to be performed on a resource identified by a URL.{path}
: The resource path within the WordFields API that you are accessing or referring to.{query-parameters}
: Optional query options used to specify filtering, sorting, or other details.{headers}
: Headers provide additional information about the request. This can be optional or required.We use JSON for all API data. This means that you can only send the Content-Type
header Content-Type: application/json; charset=utf-8
when you're sending a POST or PUT request to WordFields API.
Alternatively you can send Accept: application/json
.
After making a request, the response typically contains JSON-formatted data. The style is camelCase for object keys.
API clients must expect and gracefully handle transient server errors and rate limits. We recommend baking graceful 5xx and 429 retries into your integration from the beginning so errors are handled automatically.
The WordFields API utilizes the HTTP method in your request to determine its purpose.
Name | Description |
---|---|
GET | Retrieves data from a server based on a specified resource. |
POST | Creates a new resource or invokes an action. |
PATCH | Updates existing resource on the server. |
PUT | Applies partial modifications to a resource. |
DELETE | Deletes a resource. |
GET
and DELETE
methods do not require a request body.
POST
, PATCH
, and PUT
methods typically require a JSON-formatted request body. This body includes additional information such as property values for the resource.
Important: In the WordFields API, write requests are subject to a size limit. Requests that exceed this limit result in a failure with HTTP status code 413, accompanied by an error message stating either "Request entity too large" or "Payload too large".
WordFields API supports both HTTP standard headers and custom headers.
Specific APIs may require additional headers to be included in the request. For instance, all requests must include the API key header x-api-key
.
WordFields API currently supports version 1.0.
You can use our API Explorer web-based tool to build and test requests using WordFields APIs. Access WordFields API Explorer at: https://api.wordfields.com/api-explorer.
If you have a question about the API, please send us a message.