openapi: 3.2.0 info: title: Relm CRM Sequences 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: Sequences paths: /sequences: get: tags: - Sequences operationId: listSequences summary: List drip sequences with steps and enrollment counts responses: '200': description: Sequences content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' post: tags: - Sequences operationId: createSequence summary: Create a multi-step drip sequence requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SequenceInput' responses: '201': description: Created content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' /sequences/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: - Sequences operationId: getSequence summary: Fetch a sequence responses: '200': description: Sequence content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' patch: tags: - Sequences operationId: setSequenceEnabled summary: Enable or disable a sequence (only `enabled` is patchable) requestBody: required: true content: application/json: schema: type: object required: - enabled properties: enabled: type: boolean responses: '200': description: Sequence content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' delete: tags: - Sequences operationId: deleteSequence summary: Delete a sequence responses: '200': description: Deleted content: application/json: schema: $ref: '#/components/schemas/Deleted' default: $ref: '#/components/responses/Problem' /sequences/{id}/preview: parameters: - $ref: '#/components/parameters/IdPath' get: tags: - Sequences operationId: previewSequence summary: 'Dry-run: who would enroll now + the send schedule' responses: '200': description: Preview content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' /sequences/{id}/enrollments: parameters: - $ref: '#/components/parameters/IdPath' get: tags: - Sequences operationId: listEnrollments summary: List enrollments and their state responses: '200': description: Enrollments content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' /sequences/{id}/enroll: parameters: - $ref: '#/components/parameters/IdPath' post: tags: - Sequences operationId: enroll summary: Manually enroll a contact (idempotent per contact+sequence) requestBody: required: true content: application/json: schema: type: object required: - contact_id properties: contact_id: type: string source: type: object responses: '201': description: Enrollment content: application/json: schema: type: object default: $ref: '#/components/responses/Problem' components: schemas: SequenceInput: type: object required: - name - steps properties: name: type: string channel: type: string connection: type: string trigger: type: object exit_when: type: array steps: type: array items: type: object properties: wait_days: type: integer subject: type: string body: type: string enroll_existing: type: boolean enabled: type: boolean 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 Deleted: type: object properties: id: type: string object: type: string deleted: type: boolean responses: Problem: description: RFC-9457 problem+json error. content: application/problem+json: schema: $ref: '#/components/schemas/Problem' parameters: IdPath: name: id in: path required: true schema: type: string 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