Skip to main content
You can use the 1Password Events API to retrieve audit events from your business or enterprise account and send them to your security information and event management (SIEM) system. Follow this guide to request an access token, use it to authorize your first Events API request, and retrieve the next page of audit events.

Requirements

Before you get started with the Events API, you’ll need the following.

Step 1: Create an OAuth application in your 1Password account

Create an OAuth application in your 1Password account to get the client ID and client secret your integration uses to request an access token.
An OAuth application’s scopes are set when you create it. If your integration needs different scopes, create a new application.
  1. Sign in to your account on 1Password.com.
  2. Select Integrations in the sidebar. If you’ve set up other integrations in your account, select Directory on the Integrations page.
  3. Select Events reporting.
  4. Select Continue with OAuth.
  5. Configure your OAuth application:
    • Application Name: Enter a name to help you identify the integration.
    • Scopes: Check that View audit events is selected.
    • Description: (Optional) Add a description with additional information about your OAuth application.
    When you’re finished, select Next to generate your client ID and client secret.
    1Password shows the client secret once. Save it before you continue.
  6. Select Save in 1Password and choose a vault for the client ID and client secret. Then select View integration.
When you select Events reporting in the directory, 1Password chooses the Client credentials grant type for you and marks that step as complete. If you select Directory > OAuth Application, choose Client credentials as the grant type, then select the View audit events scope. Learn more about how to manage OAuth 2.0 authorization.

Step 2: Request an access token

After you create the OAuth application in your 1Password account, you’ll need an access token to make your first call to the Events API. Using curl on the command line, make a POST call to the /v1/oauth/token endpoint. Pass your client ID and client secret in the --user option so curl can encode your credentials and send them in the HTTP Basic header. Use the base URL that matches your account’s region. For example:
A successful response includes an access token and the scopes granted to it. For example:
Access tokens expire after 15 minutes. The expires_in value is in seconds. Request a new token when the current one expires. Learn more about OAuth 2.0 authorization in the Events API.

Step 3: Send a test request to the Events API

Use your access token in the Authorization header to authorize a request to the Events API. Make sure the token has the audit-events.view scope. Use the same base URL you used to request the access token. The - in the path selects the account associated with the token. In this example, max_page_size=1 limits the response to one audit event. The User-Agent header is optional. Include it in the format <CompanyOrProductName>/<version> to identify requests from your integration.
A successful request returns a JSON response with a results array. If more pages are available, the response includes a next_page_token. This example shows a vault access update.
Example response
The request covers the past hour by default. If results is empty, use an earlier start_time to expand the time range. If you have more pages of results, take the next_page_token from the response and use it in the page_token query parameter to fetch the next page. Use the same base URL as the first request.
Repeat with the token from each response until next_page_token is empty. Learn more about pagination and continuous polling.

Step 4: Connect your 1Password account to your SIEM

After you’ve confirmed that you can retrieve audit events, use the API reference and API conventions to build an integration that sends events to your SIEM. Some SIEM vendors offer built-in integrations with 1Password Events Reporting. Check the 1Password Marketplace for your platform, then confirm which Events API version your vendor supports.

Try out more examples

You can use the Retrieve audit events reference page to find more code examples. To send a request from the API playground, select Try it in the endpoint header, enter your values, then select Send.
Requests from the API playground go through the documentation platform’s proxy service. To send requests directly from your system to 1Password, copy a code example and run it with your own tools.
To use a code example with another tool, choose a language from the dropdown menu. Select copy , then paste the example into your tool. You can also download the OpenAPI specifications to use with code-generation tools, create mock servers, or import into API clients.

Learn more