Contracts AI

OAuth setup

Register browser-based or machine-to-machine OAuth applications so approved integrations can securely access Contracts AI APIs.

OAuth applications

OAuth applications connect Contracts AI to internal tools, third-party software, data warehouses, and approved add-ins using OAuth 2.0.

Contracts AI supports two application types:

  • Browser / web application — A user signs in through Contracts AI using the OAuth authorization-code flow.
  • Machine-to-machine data export — An automated service authenticates with a Client ID and Client Secret, without interactive user login. This is suitable for Snowflake, ETL tools, and scheduled contract exports.

Why this is useful

  • Secure integrations — Applications use OAuth tokens instead of user passwords.
  • Appropriate authentication flows — Interactive applications use user sign-in, while automated exports use client credentials.
  • Read-only exports — Machine-to-machine applications are restricted to read-only contract API access.
  • Operational control — Admins can activate, deactivate, rotate, or remove integrations centrally.

Common cases

  • Microsoft Word add-in or plugin — Uses a browser application and registered redirect URIs.
  • Internal web tools — Access APIs after a user completes OAuth sign-in.
  • Snowflake and ETL pipelines — Use a machine-to-machine application to retrieve contract data on a schedule.
  • Partner integrations — Use the application type appropriate to whether user interaction is required.

Exact endpoints and response schemas are documented in the API documentation.


Where to configure

Go to Admin → Security → Manage OAuth Applications.

Only users with the appropriate admin permissions can manage OAuth applications.


Create a browser or web application

Use this option when an integration signs in on behalf of a user.

  1. Click Create Application.
  2. Select Browser / web application.
  3. Enter:
    • Application name — A recognizable name such as Procurement Portal.
    • Redirect URIs — The approved callback URLs for the application.
  4. Click Create.
  5. Copy the generated Client ID.

Browser applications use the OAuth authorization-code flow. Users authenticate through Contracts AI and the resulting API access follows the signed-in user’s permissions.

Register exact redirect URIs for each environment. Avoid wildcards.


Create a machine-to-machine data export

Use this option for Snowflake, ETL tools, scheduled jobs, and other automated exports that do not require interactive user login.

  1. Click Create Application.
  2. Select Machine-to-machine data export.
  3. Enter an Application name, such as Snowflake Export.
  4. Click Create.
  5. Copy both the Client ID and Client Secret immediately.

A redirect URI is not required for machine-to-machine applications.

The Client Secret is displayed only once. Store it in the integration’s secrets manager. Contracts AI stores only a secure hash and cannot show the original secret again.

Request an access token

Send the credentials to the OAuth token endpoint:

curl --request POST \
  https://api.contracts.ai/api/oauth/token \
  --header "Content-Type: application/json" \
  --data '{
    "grant_type": "client_credentials",
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "scope": "contracts:read"
  }'

Did this answer your question?