DoiT Contracts API

List and manage tenant-scoped contracts as a T1/T2 PartnerOps caller.

Business capability
Contract Management BC-150.10

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /customers/{customerID}/contracts List a customer's contracts · List contracts #
Ask an LLM
“Which contracts does a given customer hold?”
“Can I see contracts for one of my descendant tenants?”
Tell an agent
List contracts for customer {customerID}.
Show every contract held by {customerID}.
POST /customers/{customerID}/contracts Create a draft contract · Create contract #
Ask an LLM
“How do I create a new draft contract for a customer?”
“What fields are required to draft a contract?”
Tell an agent
Draft contract {name} for customer {customerID} starting {startDate} with renewal {renewalPolicy}.
Create a draft contract {name} for {customerID} billed to profile {billingProfile}.
GET /customers/{customerID}/contracts/{contractID} Retrieve a contract · Retrieve a contract #
Ask an LLM
“How do I see the details of a specific customer contract?”
“What are the dates and renewal terms on one contract?”
Tell an agent
Get contract {contractID} for customer {customerID}.
Show the terms of contract {contractID} of {customerID}.
POST /customers/{customerID}/contracts/{contractID} Save a new version of a contract · Update contract #
Ask an LLM
“How do I change the end date on an existing contract?”
“Does editing a contract create a new version?”
Tell an agent
Update contract {contractID} for {customerID} to end on {endDate}.
Rename contract {contractID} of customer {customerID} to {name}.
POST /customers/{customerID}/contracts/{contractID}/activate Activate a draft contract · Activate contract #
Ask an LLM
“How do I make a draft contract live?”
“What happens if I activate a contract whose start date is in the future?”
Tell an agent
Activate contract {contractID} for customer {customerID}.
Move draft {contractID} of {customerID} to active.
POST /customers/{customerID}/contracts/{contractID}/cancel Cancel a contract · Cancel contract #
Ask an LLM
“How do I end an active contract since it can't be deleted?”
“Can I record why a contract was cancelled?”
Tell an agent destructive · confirm first
Cancel contract {contractID} for customer {customerID}.
Cancel contract {contractID} of {customerID} because {reason}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/doit:doit-contracts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

doit-contracts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DoiT Contracts API
  description: Programmatic access to DoiT Platform
  version: v1
servers:
- url: https://api.doit.com
security:
- api_key: []
- tenantId: []
  api_key: []
tags:
- name: Contracts
  description: List and manage tenant-scoped contracts as a T1/T2 PartnerOps caller.
paths:
  /customers/{customerID}/contracts:
    get:
      tags:
      - Contracts
      summary: List contracts
      description: Lists the contracts held by the specified customer. Callable by a T1/T2 PartnerOps principal for its own tenant or any descendant tenant. Read access requires contractsReadOnly, contractsViewer, or a write-capable role (without contractsReadOnly). User API tokens must include the matching permission in their scope.
      operationId: listContracts
      parameters:
      - name: customerID
        in: path
        description: The customer (tenant) whose contracts are requested.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - The request succeeded.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MTSContractResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
      - Contracts
      summary: Create contract
      description: Creates a draft contract for the specified customer. Requires the caller to be the direct parent (T1 for a T2-level contract, T2 for a T3-level contract). Write access requires a role without contractsReadOnly; user API tokens must include the matching permission in their scope.
      operationId: createContract
      parameters:
      - name: customerID
        in: path
        description: The customer (tenant) the contract is created for.
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MTSContractCreateInput'
      responses:
        '201':
          description: Created - The contract draft was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateContractResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /customers/{customerID}/contracts/{contractID}:
    get:
      tags:
      - Contracts
      summary: Retrieve a contract
      description: Returns the specified contract.
      operationId: getContract
      parameters:
      - name: customerID
        in: path
        required: true
        schema:
          type: string
      - name: contractID
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - Contract returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MTSContractDetailResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
      - Contracts
      summary: Update contract
      description: Creates a new version of the contract. The contract type is immutable and cannot be changed by an update.
      operationId: updateContract
      parameters:
      - name: customerID
        in: path
        required: true
        schema:
          type: string
      - name: contractID
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MTSContractInput'
      responses:
        '200':
          description: OK - New contract version created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateContractResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /customers/{customerID}/contracts/{contractID}/activate:
    post:
      tags:
      - Contracts
      summary: Activate contract
      description: Transitions a draft contract to active or scheduled (when the start date is in the future). Produces the same system state as activating via the Console.
      operationId: activateContract
      parameters:
      - name: customerID
        in: path
        required: true
        schema:
          type: string
      - name: contractID
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - Contract activated or scheduled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractLifecycleResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: Conflict - An active contract of the same type already exists for this tier.
  /customers/{customerID}/contracts/{contractID}/cancel:
    post:
      tags:
      - Contracts
      summary: Cancel contract
      description: Cancels (deactivates) a contract. Active contracts cannot be deleted; cancel is the terminal operation.
      operationId: cancelContract
      parameters:
      - name: customerID
        in: path
        required: true
        schema:
          type: string
      - name: contractID
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: Optional cancellation reason.
      responses:
        '200':
          description: OK - Contract cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractLifecycleResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  schemas:
    ContractLifecycleResponse:
      type: object
      description: Result of an activate or cancel operation.
      properties:
        contractId:
          type: string
          description: The contract identifier.
        status:
          type: string
          description: The contract status after the operation (`active`, `scheduled`, or `cancelled`).
          enum:
          - active
          - scheduled
          - cancelled
    Error:
      type: object
      description: Standard error response structure.
      properties:
        error:
          type: string
          description: Detailed error message.
    MTSContractResponse:
      type: object
      description: External view of a contract. DoiT-internal fields are not exposed.
      properties:
        id:
          type: string
          description: The unique identifier of the contract.
        customerId:
          type: string
          description: The customer (tenant) that holds the contract.
        type:
          type: string
          description: The immutable contract type.
        status:
          type: string
          description: The contract status.
          enum:
          - draft
          - scheduled
          - active
          - cancelled
          - expired
          - superseded
        name:
          type: string
          description: The contract name.
        startDate:
          type:
          - string
          - 'null'
          format: date-time
          description: The contract start date.
        endDate:
          type:
          - string
          - 'null'
          format: date-time
          description: The contract end date.
        renewalPolicy:
          type: string
          description: The renewal policy.
          enum:
          - auto
          - manual
          - fixed
        doitInvoicingEnabled:
          type: boolean
          description: Whether DoiT generates invoices for this contract.
        currentVersionNumber:
          type:
          - integer
          - 'null'
          description: The current version number of the contract.
        timeCreated:
          type: string
          format: date-time
          description: When the contract was created.
    MTSContractInput:
      type: object
      description: Contract create/update payload. Full field-level validation is applied server-side.
      required:
      - name
      - startDate
      - renewalPolicy
      properties:
        name:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type:
          - string
          - 'null'
          format: date-time
        renewalPolicy:
          type: string
          enum:
          - auto
          - manual
          - fixed
        doitInvoicingEnabled:
          type: boolean
          default: true
          description: Whether DoiT generates invoices for this contract. Disabling suppresses invoice generation from that point forward while billing calculations and pipeline outputs continue. Omitting the field leaves invoicing enabled.
        invoicesEmail:
          type: string
          format: email
          description: Required for an end-customer contract with doitInvoicingEnabled set to true; optional otherwise.
        contractUpdatesEmail:
          type: string
          format: email
          description: Required for an end-customer contract with doitInvoicingEnabled set to true; optional otherwise.
        billingProfile:
          type: object
          description: The billing profile (name, country, state, city, address, zip). Required for an end-customer contract with doitInvoicingEnabled set to true; optional otherwise.
        managementAccounts:
          type: array
          items:
            type: string
        billingRules:
          type: array
          items:
            type: object
        priceBooks:
          type: array
          items:
            type: object
        customLineItems:
          type: array
          items:
            type: object
    MTSContractDetailResponse:
      description: A single contract with its version terms. DoiT-internal fields are not exposed.
      allOf:
      - $ref: '#/components/schemas/MTSContractResponse'
      - type: object
        properties:
          versions:
            type: array
            description: The contract versions, newest last, with their billing terms.
            items:
              type: object
              properties:
                version:
                  type: integer
                  description: Contract version number.
                status:
                  type: string
                  description: Version status.
                name:
                  type: string
                startDate:
                  type: string
                  format: date-time
                endDate:
                  type:
                  - string
                  - 'null'
                  format: date-time
                effectiveStart:
                  type: string
                  format: date-time
                effectiveEnd:
                  type:
                  - string
                  - 'null'
                  format: date-time
                renewalPolicy:
                  type: string
                cancellationReason:
                  type:
                  - string
                  - 'null'
                billingProfile:
                  type: object
                invoicesEmail:
                  type: string
                  format: email
                contractUpdatesEmail:
                  type: string
                  format: email
                doitInvoicingEnabled:
                  type: boolean
                  description: Whether DoiT generates invoices for this contract.
                managementAccounts:
                  type: array
                  items:
                    type: string
                billingRules:
                  type: array
                  items:
                    type: object
                priceBooks:
                  type: array
                  items:
                    type: object
                customLineItems:
                  type: array
                  items:
                    type: object
    CreateContractResponse:
      type: object
      description: The result of creating a contract or contract version.
      properties:
        contractId:
          type: string
        version:
          type: integer
        status:
          type: string
        message:
          type: string
        timestamp:
          type: string
          format: date-time
    MTSContractCreateInput:
      allOf:
      - $ref: '#/components/schemas/MTSContractInput'
      - type: object
        properties:
          templateId:
            type: string
            description: ID of a contract template owned by the authenticated tenant. When specified, the template's billing rules, price books, and custom line items are copied onto the new contract. Mutually exclusive with billingRules, priceBooks, and customLineItems in the request body.
  responses:
    '404':
      description: Not Found - The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '401':
      description: Unauthorized - Invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '403':
      description: Forbidden - The client is not authorized to perform the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '400':
      description: Bad Request - The server cannot process the request, often due to a malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      description: Use the "Bearer <API_KEY>" format or sign in for autofill
      in: header
    tenantId:
      type: apiKey
      name: X-Tenant-Id
      description: 'Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint''s normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.'
      in: header
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://console.doit.com/sign-in/oauth
          tokenUrl: https://console.doit.com/api/auth/token
          scopes:
            dci: Access All Data
x-samples-languages:
- curl
- go
- node
- python
x-cli-config:
  security: oauth2
  params:
    client_id: cli
x-provenance:
  method: harvested
  publisher: DoiT
  source: https://api.doit.com/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)