openapi: 3.2.0 info: title: Relm CRM Discovery API version: 0.17.1 summary: API-first CRM built for LLMs and AI agents. description: REST surface for Relm. contact: name: Relm url: https://relmcrm.com/ license: name: Proprietary servers: - url: https://api.relmcrm.com/v1 description: Production security: - bearerAuth: [] - oauth2: - crm tags: - name: Discovery description: Self-describing schema, usage, settings. paths: /schema: get: tags: - Discovery operationId: getSchema summary: Live object/field/enum registry description: Returns every object with its fields, id_prefix and list_filters, all enum groups, list_controls, the automation capability catalog, and usage notes. Call this before guessing a type, field or filter. responses: '200': description: Schema document content: application/json: schema: $ref: '#/components/schemas/SchemaDoc' default: $ref: '#/components/responses/Problem' /usage: get: tags: - Discovery operationId: getUsage summary: Current billing period usage responses: '200': description: Usage content: application/json: schema: $ref: '#/components/schemas/Usage' default: $ref: '#/components/responses/Problem' /settings: get: tags: - Discovery operationId: getSettings summary: Workspace settings (spend cap) responses: '200': description: Settings content: application/json: schema: $ref: '#/components/schemas/Settings' default: $ref: '#/components/responses/Problem' patch: tags: - Discovery operationId: setSettings summary: Set the monthly overage spend cap requestBody: required: true content: application/json: schema: type: object required: - overage_cap_usd properties: overage_cap_usd: type: - number - 'null' description: USD cap on metered overage; 0 = never any overage, null = unlimited. responses: '200': description: Settings content: application/json: schema: $ref: '#/components/schemas/Settings' default: $ref: '#/components/responses/Problem' components: schemas: Usage: type: object properties: period: type: string used: type: integer overage: type: integer limit: type: integer plan: type: string Problem: type: object description: RFC-9457 error. Closed-set rejections carry valid_options + suggestion so an agent self-corrects. properties: type: type: string format: uri example: https://relmcrm.com/errors/unknown_value title: type: string status: type: integer detail: type: string code: type: string example: unknown_value field: type: string valid_options: type: array items: type: string suggestion: type: string request_id: type: string Settings: type: object properties: overage_cap_usd: type: - number - 'null' SchemaDoc: type: object properties: objects: type: array items: type: object properties: key: type: string id_prefix: type: - string - 'null' list_filters: type: array items: type: string fields: type: array items: type: object enum_groups: type: object list_controls: type: array items: type: string notes: type: object responses: Problem: description: RFC-9457 problem+json error. content: application/problem+json: schema: $ref: '#/components/schemas/Problem' securitySchemes: bearerAuth: type: http scheme: bearer description: Workspace-scoped API key. relm_live_... (live) or relm_test_... (free, isolated test mode). Mint at https://app.relmcrm.com/. oauth2: type: oauth2 description: 'OAuth 2.1 with PKCE (S256) and dynamic client registration (RFC 7591). Live mode only; test mode is API-key only. Discovery: /.well-known/oauth-authorization-server.' flows: authorizationCode: authorizationUrl: https://api.relmcrm.com/oauth/authorize tokenUrl: https://api.relmcrm.com/oauth/token refreshUrl: https://api.relmcrm.com/oauth/token scopes: crm: Read and write the connected Relm workspace