Skip to main content
The 1Password Events API is a REST-style API that supports standard HTTP methods and follows the OpenAPI 3.1.0 specification. All communication between clients and servers is over HTTPS. The following conventions cover how to authorize and structure requests and interpret responses and errors.

Authorization

The Events API uses the OAuth 2.0 client credentials grant to issue access tokens to integrations.
  1. Create an OAuth application in your 1Password account with the audit-events.view scope.
  2. Send your client credentials in a POST request to the OAuth token endpoint to request an access token.
  3. Send the access token in the Authorization header for each Events API request, prefixed with Bearer:
  4. Request a new token when the current one expires, or revoke a token when it’s no longer needed.
Access tokens expire after 15 minutes (900 seconds). Learn more about how to authorize your integrations using OAuth 2.0.

Endpoints

An Events API endpoint URL consists of a base URL and an endpoint path. The path identifies the API version, the account, and the resource.

Base URLs

Choose the base URL that matches the region of your 1Password account. Use the same base URL to request an access token and retrieve audit events. If your integration supports accounts in multiple regions, let users choose the base URL.

Endpoint paths

Append the endpoint path to your base URL. For example:
Replace {account} with the ID of the 1Password account that owns the OAuth application, or use - to select the account associated with your token. Endpoint paths are matched exactly. Use the path without a trailing slash. See the Events API reference for endpoint details.

Requests

Request methods

Request headers

  • Authorization: Your OAuth access token, prefixed with Bearer. Required on every request. See Authorization.
  • User-Agent: Recommended. Send an identifiable User-Agent header in the format <CompanyOrProductName>/<version> so requests can be attributed to a specific integration. This helps with support and troubleshooting, and with analytics on integration usage.
Requests to the OAuth API endpoints send parameters as URL-encoded form data and require a Content-Type: application/x-www-form-urlencoded header. Learn more about requesting an access token.

Request bodies

Audit events requests use query parameters for pagination and time filters. Leave the request body empty.

Query parameters

Add filters and pagination parameters to the endpoint URL. Start the query string with ?, separate parameters with &, and URL-encode their values. For example:
Unknown or repeated query parameters return 400 Bad Request. See Retrieve audit events for the supported parameters.

Filtering

The Retrieve audit events endpoint supports two date and time parameters in RFC 3339 format:
  • start_time: Return events with an insert_time strictly after this value.
  • end_time: Return events with an insert_time strictly before this value.
The parameters filter on when 1Password received and stored the event. Learn more about dates and times in the API. If you provide both parameters, start_time must be earlier than end_time. Otherwise, the API returns 400 Bad Request.
  • If you omit both start_time and end_time, the API returns events received in the last hour.
  • If you include only end_time, the API returns events received in the hour before that time.
  • If you include only start_time, the API returns events received after that time, up to the latest searchable events.
The Events API can retrieve events from the last 120 days. If start_time or end_time is more than 120 days ago, the API uses the time 120 days ago for that parameter. If start_time is in the future, the API returns an empty result.

Pagination

Use the following query parameters to page through results.
  • max_page_size: The maximum number of events to return per page. The default is 100 when you omit it or set it to 0. Values below 0 or above 1000 return 400 Bad Request.
  • page_token: An opaque string that identifies the next page of results to retrieve.
Don’t use the start_time or end_time query parameters in a request that also uses page_token. Doing so returns a 400 Bad Request error.

Pagination workflow

  1. Make a GET call to /v3/accounts/{account}/audit-events with any combination of max_page_size, start_time, and end_time that you need.
  2. Process the events in results. Check whether next_page_token has a value.
  3. If there are more pages of events, use next_page_token as page_token in the next request. The token carries the original query settings. For example:
    Repeat until next_page_token is empty. Omit page_token to start a new query. Sending page_token= returns 400 Bad Request.

Continuous polling

To poll for new events, retrieve and process every page in the current query. Use the last processed event’s insert_time as start_time for the next poll.
  1. Set start_time to the earliest insertion time you want to retrieve. Retrieve and process every page in the query.
  2. After the last page, save the insert_time of the last event you processed in the query. Keep the previous checkpoint if the query returned no events.
  3. On your next scheduled poll, use the saved timestamp as start_time and leave end_time unset. If you haven’t processed any events yet, retry with your original starting time. For example:
  4. Retrieve and process every page before advancing the checkpoint again.
Keep the full precision of insert_time. Page tokens let you retrieve events with the same timestamp across pages in a query. A new query skips events at its start_time. To recheck for events that became searchable after a poll, use a start_time before the saved timestamp and skip events you’ve already stored by id. If your integration retries a query after a partial failure, use each event’s id to skip events you’ve already stored.

Responses

A successful request returns 200 OK with a JSON body. The results array contains the events on the current page. When the query finds no events, results is an empty array. An empty next_page_token marks the last page. See Pagination for how to retrieve each page and Errors for other response statuses.

Dates and times

Event timestamps use RFC 3339 format.
  • create_time records when the event occurred.
  • insert_time records when 1Password received and stored the event.
The time bounds filter on insert_time. If a client sends an event after it occurs, the response can include an event whose create_time is earlier than the requested time range. Learn more about filtering by time.

Rate limits

All integrations in an account share two limits. Both apply.
  • 600 requests per minute
  • 30,000 requests per hour
The API can include these headers. They describe the window with fewer requests remaining:
  • RateLimit-Limit: The total number of requests allowed for the current time window.
  • RateLimit-Remaining: How many requests you can still make in the current window.
  • RateLimit-Reset: The time when the current window resets, as a Unix timestamp in seconds.
Requests to the OAuth API endpoints are rate limited separately. See Users API conventions for the shared OAuth endpoint limits. If the Events API returns 429 Too Many Requests, stop sending additional requests. Wait the number of seconds in Retry-After, then resume requests.

Errors

The API uses HTTP status codes to indicate the result of a request. When a response includes a JSON error body, code identifies the error and message describes it. For example:
The JSON error format is provisional. Use HTTP status codes to handle errors in your integration. An expired access token can also return 403 Forbidden with an empty body. Request a new access token and retry. See the Retrieve audit events reference for the response schemas.