Contracts AI

Setting up the API

Use the Contracts.ai Customer API with OAuth. Find the API reference, create an OAuth application in Admin, and authenticate to call the API.

You can integrate with Contracts.ai using the Customer API. This guide points you to the API reference and explains how to set up OAuth and use the API.

API reference

The full API reference (endpoints, request/response schemas, and examples) is available at:

https://api.contracts.ai/api/redoc/

Open that link to browse all available endpoints (e.g. contracts, views, search, chat). Use it when building integrations or scripts that call the API.

Set up OAuth

To call the API on behalf of users or your organization, you use OAuth 2.0 (authorization code flow). First, create an OAuth application in the app:

  1. Go to Admin and open OAuth Applications (or Manage OAuth Applications).
  2. Create a new application: give it a name (e.g. "My integration") and one or more redirect URIs (where the user is sent after authorizing—e.g. https://yourapp.com/callback or http://localhost:8080/callback for local testing).
  3. After saving, you receive a Client ID and Client secret. Copy and store the Client secret securely; it may only be shown once. You will need both when implementing the OAuth flow.

Keep the redirect URIs in sync with the actual URLs your app uses; only those URIs will be accepted during authorization.

Use the API

  1. Authorize – Direct the user (or your server) to the authorization URL with your client_id, redirect_uri, response_type=code, and optional scope. The exact URL is documented in the API reference (e.g. under authentication or OAuth).
  2. Exchange the code for a token – After the user approves, the callback receives an authorization code. Exchange it for an access token (and optionally refresh token) by POSTing to the token endpoint with client_id, client_secret, code, and redirect_uri.
  3. Call the API – Send the access token in the Authorization header (e.g. Bearer <access_token>) with each API request. Use the paths and parameters described in the API reference.

If your deployment uses a different base URL (e.g. a tenant or staging environment), use that host instead of api.contracts.ai for both the API reference and the OAuth/API endpoints. Your admin can confirm the correct base URL.

Did this answer your question?