Creating an API Key
Log in to your Neon One account. At the bottom of your home screen, you will see a section labeled API Keys. You must have at least one application under development to see this section.
Click Create New API Key.
Enter a name for this key and click Create. We recommend using a different key for each App you build.
Copy your key and save it in a secure location. You will need this key to make API requests.
If you find it necessary to revoke an API key, you can click Delete next to the key.
The API accepts HTTP POST requests.
- You must supply your API key as an Authorization header. The format is as follows:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImE...
- You must supply a Content-Type: application/json header in your requests.
- You must set an Accept: application/json header on all requests. Certain errors may return a text/html response. If this happens, assume it is an error that needs to be fixed.
The Neon One API uses standard HTTP response codes to show the results of API requests.
- Codes in the 2xx range indicate success.
- Codes in the 4xx range result from a problem with the request sent to the API.
- Codes in the 5xx range are typically the result of a problem with Neon One’s servers.
Occasionally, additional information is provided in the response body.
|200||OK||Request was completed successfully.|
|401||Unauthorized||The request failed due to a problem with authentication. Either the API key is missing or invalid.|
|403||Forbidden||The request failed because you attempted to access a resource that is not available to you. This can sometimes be caused by referencing an incorrect ID or URL in a request.|
|404||Not Found||The requested resource does not exist. You have referenced an invalid URL in your request.|
|422||Unprocessable Entry||The request is either missing a required field or you have provided invalid data for a field.|
|429||Too Many Requests||Too many API requests were sent in too short of a time period.|
|50x||Server Error||There was an error in the Neon One application server.|