Currently, we only support a single environment.
All requests use the current version of our API. When we make backwards-incompatible changes to the API, which we do our best to avoid, we'll release a new major version and introduce a versioning scheme.
The Jahuty API uses API keys to authenticate requests. You can view and manage your organization's API keys from your organization settings.
There are two types of API keys: public and secret. Although public keys are not secret and carry limited priviledges, you should not share them in publicly accessible areas such as Github, Bitbucket, client-side code, and so forth.
Each SDK provides a method to set your organization's API key using a static method or public static variable. Once it's set, it'll be included in subsequent requests automatically.
If you're using the API directly, you can pass your organization's API token via bearer authentication, by setting the
Authorization to request header's value to
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
To learn more about API keys, see API keys.
A sample test API key is included in all the examples here, so you can test any example right away:
To test requests using your account, replace the sample API key with one of your organization's actual API keys.
Jahuty uses conventional HTTP response codes to indicate the success or failure of an API request.
In general: codes in the
2xx range indicate success; codes in the
4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, the resource does not exist, etc.); and, codes in the
5xx range indicate an error with Jahuty's servers (these are rare).
When an error does occur, the Jahuty API will respond with the
application/problem+json content type.
- 200 - OK
- Everything worked as expected.
- 401 - Unauthorized
- No valid API key provided.
- 402 - Payment Required
- Your free trial or subscription has expired.
- 403 - Forbidden
- The API key doesn't have permissions to perform the request.
- 404 - Not Found
- The requested resource doesn't exist.
- 500, 502, 503, 504 - Server Errors
- Something went wrong on Jahuty's end. (These are rare.)
Jahuty uses the application/problem+json resource to describe errors.
- The original HTTP status code.
- A short, human-readable title for the general error type.
- A human-readable description of the specific error.
- A URL to more information about the reported error.
Our SDKs raise exceptions for errors that need your attention such as invalid parameters or authentication errors.
We don't recommend writing code that handles API exceptions. An exception will likely only occur in a situation which requires your attention.
A snippet is a small piece of text or HTML you manage through our website; render using our SDKs or API; and, display in your application on-demand. Each snippet is assigned a unique identifier (aka,
id) that you'll use to refer to it.
Render a snippet
Renders a snippet's content using the passed parameters. You need only supply the unique identifier that was assigned to the snippet upon creation.
- The identifier of the snippet to retrieve.
A URL-encoded, JSON string of parameters to use. Passed via the
paramsquery string parameter. Unused variables are ignored.
Returns a rendered snippet. When requesting a snippet that does not exist or you are not authorized to access, a
404 error will be returned.
Find a typo? Something is wrong in this documentation? Fork and edit it!