Reviewaible LogoGet Started

API References

Integrate with Reviewaible's powerful contract analysis capabilities

Global API Settings

Authentication

All API requests require an API key to be included in the request headers.

// Include this header with all requests
X-API-Key: your_api_key_here

How to get your API Key

To generate an API key for authenticating your requests:

  1. In the Reviewaible app, go to Settings in the sidebar.
  2. Select the API Keys tab at the top.
  3. Click the Create API Key button if you do not have one yet.
  4. Copy your new API key and store it securely.

API Key creation screenshot

Base URL

All API requests should be made to the following base URL:

https://api.reviewaible.com

API Key Identification API Documentation

Endpoint: GET /v2/credentials/identify

Retrieves workspace and user information associated with the provided API key.

Authentication

Request

Headers

x-api-key: <your-api-key>

Example using cURL

curl -X GET \
  -H "x-api-key: your-api-key-here" \
  https://api.reviewaible.com/v2/credentials/identify

Example using JavaScript/TypeScript

// Using Fetch API

const response = await fetch("https://api.reviewaible.com/v2/credentials/identify", {
  method: "GET",
  headers: {
    "x-api-key": apiKey,
  },
})

Response

Success Response (200 OK)

{
  "success": true,
  "data": {
    "workspace_name": string,  // Name of the workspace
    "user_id": string,        // ID of the user who created the API key
    "user_email": string,     // Email of the user
    "user_name": string       // Full name of the user (first_name + last_name)
  }
}

Error Responses

  1. 401 Unauthorized

    {
      "message": "Invalid or expired API key"
    }
    
  2. 403 Forbidden

    {
      "message": "Workspace not found"
    }
    

    or

    {
      "message": "User not found"
    }
    

Important Notes

  1. Authentication

    • Validates the API key
    • Verifies workspace existence
    • Verifies user existence
  2. Response Data

    • Returns workspace name
    • Returns user identification details
    • Combines first and last name into full name

Troubleshooting

  1. Common Issues

    • 401 Unauthorized: Verify API key is valid and properly set
    • 403 Forbidden: Verify workspace and user still exist
    • Connection issues: Check network connectivity
  2. Debugging

    • Check server logs for detailed error information
    • Verify API key permissions
    • Verify workspace and user existence in database
  3. Support

    • For API key issues, contact your account administrator
    • For technical support, contact the development team
    • Check the status page for service availability

File Upload API Documentation

Endpoint: PUT /v2/files/upload

Uploads a PDF file to the system, which will be processed and analyzed. The endpoint handles file validation, database record creation, and S3 storage.

Authentication

Request

Headers

Content-Type: multipart/form-data
x-api-key: <your-api-key>

Body

Form data with a single field:

Example using cURL

curl -X PUT \
  -H "x-api-key: your-api-key-here" \
  -F "file=@document.pdf" \
  https://api.reviewaible.com/v2/files/upload

Example using JavaScript/TypeScript

// Using Fetch API
const response = await fetch("https://api.reviewaible.com/v2/files/upload", {
  method: "PUT",
  headers: {
    "x-api-key": apiKey,
  },
  body: formData,
})

Response

Success Response (201 Created)

{
  "file": {
    "id": number,        // Unique identifier for the uploaded file
    "filename": string,  // Original filename
    "status": string    // Current status of the file ("In Progress")
  }
}

Error Responses

  1. 400 Bad Request

    • No file uploaded
    {
      "message": "No file uploaded"
    }
    
  2. 401 Unauthorized

    {
      "message": "Invalid or expired API key"
    }
    
  3. 429 Too Many Requests

    {
      "message": "Too many requests, please try again later"
    }
    

Troubleshooting

  1. Common Issues

    • 400 Bad Request: Check file type and form data format
    • 401 Unauthorized: Verify API key is valid and properly set
    • 429 Too Many Requests: Implement rate limiting handling
    • Upload failures: Check network connection and file size
  2. Debugging

    • Check server logs for detailed error information
    • Verify API key permissions
    • Ensure file meets size and type requirements
    • Monitor rate limit usage
  3. Support

    • For API key issues, contact your account administrator
    • For technical support, contact the development team
    • Check the status page for service availability

File List API Documentation

Endpoint: GET /v2/files/list

Retrieves a list of completed files for the authenticated workspace.

Authentication

Request

Headers

x-api-key: <your-api-key>

Example using cURL

curl -X GET \
  -H "x-api-key: your-api-key-here" \
  https://api.reviewaible.com/v2/files/list

Example using JavaScript/TypeScript

// Using Fetch API
const response = await fetch("https://api.reviewaible.com/v2/files/list", {
  method: "GET",
  headers: {
    "x-api-key": apiKey,
  },
})

Response

Success Response (200 OK)

{
  "rows": [
    {
      "id": number,
      "filename": string,
      "effective_date": string,  // ISO date string
      "created_at": string,     // ISO date string
      "updated_at": string,     // ISO date string
      // ... other file metadata
    }
  ],
  "count": number,  // Total number of files
  "limit": number,  // Number of files per page
  "offset": number  // Current page offset
}

Error Responses

  1. 401 Unauthorized

    {
      "message": "Invalid or expired API key"
    }
    
  2. 429 Too Many Requests

    {
      "message": "Too many requests, please try again later"
    }
    

Important Notes

  1. Filtering

    • Only returns files with status "Completed"
    • Files are filtered by the authenticated workspace
    • Results are paginated
  2. Rate Limiting

    • Limited to 100 requests per minute per API key
    • Exceeding the limit returns 429 status code
  3. Response Format

    • Dates are returned in ISO format
    • Some internal fields are excluded from the response
    • Includes pagination metadata

Best Practices

  1. Client Implementation

    • Handle pagination appropriately
    • Implement rate limiting handling
    • Cache results when appropriate
    • Handle date formatting on client side
  2. Error Handling

    • Implement proper error handling for all response codes
    • Display user-friendly error messages
    • Implement retry logic for transient failures
  3. Security

    • Never expose API keys in client-side code
    • Use HTTPS for all requests
    • Implement proper access control

Troubleshooting

  1. Common Issues

    • 401 Unauthorized: Verify API key is valid and properly set
    • 429 Too Many Requests: Implement rate limiting handling
    • Empty results: Verify workspace has completed files
  2. Debugging

    • Check server logs for detailed error information
    • Verify API key permissions
    • Monitor rate limit usage

Support

If you have any questions or need assistance with our API, please contact our support team: