Skip to main content

Introduction

The Locker Private Email API is organized around REST. These APIs return JSON responses and uses standard HTTP Response codes, authentication, and verbs.

These APIs are used on Locker Password Manager (https://locker.io).

Base API Host

https://api.locker.io

Authentication

The Locker API uses a Bearer token to authenticate requests. All APIs need to be authenticated by your API Key. This API Key is a JWT token with cs. prefix. After you upgrade your plan, you can get your API Key at Locker ID (https://id.locker.io/api-key).

One example API Key:

Bearer cs.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiMjMyM0Bwdy5jeXN0YWNrLm9yZyIsImNyZWF0ZWRfdGltZSI6MTY0MDYxNzAzNSwiZXhwaXJlZF90aW1lIjoxNjQwNjMxNDM1LCJ0b2tlbl90eXBlIjoiYXV0aGVudGljYXRpb24iLCJzY29wZSI6InB3ZG1hbmFnZXIifQ.xxxxxxxxxxxxxxxxxxxxxxxx_PrivateXXXX

Errors

The Private Email API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

Code 2xx range indicates success

Code in 4xx range indicates an error that failed given the information provided (e.g, a required parameter was omitted, authentication failed, etc.). Almost 4xx errors have the format as:

{
"code": "0000",
"message": "xxx",
"details": {}
}
  • code (string) This is an error code
  • message (string) Error description
  • details (object) An object indicates details of this error

Code in 5xx range indicates an error with our servers.

Pagination

All top-level API resources have support for bulk fetch via "list" API methods. These list API methods share a common structure, taking these parameters: page, size, paging.

  • page (optional, default is 1): The current index of "list"
  • size (optional, default is 10): A limit on the number of objects to be returned. Only some APIs support this parameter
  • paging (optional, default is 1): Paging or not. Only some APIs support this parameter

Rate limit

To keep incoming traffic under control and maintain a great experience for all our users, our API is behind a rate limiter. Users who send many requests in quick succession may see error responses that show up as status code 429.