openapi: 3.2.0 info: title: Nooks Sequencing Sequence Steps API version: 0.1.0 description: "The Nooks Sequencing API provides programmatic access to manage sequences, tasks, templates, and prospect engagement workflows created using the Nooks SEP.\n\n## Authentication\n\nSend a bearer token in the `Authorization` header:\n```\nAuthorization: Bearer \n```\n\nTwo token types are accepted on the same header — the API detects which\nformat you sent and validates accordingly. If you already have a token,\npaste it into the Authentication panel and skip the flow setup.\n\n### API keys\n\nLong-lived, workspace-scoped. Best for backend integrations and\nserver-to-server automation. Generate one from **Developer Settings →\nAPI Keys** in your Nooks workspace. API keys are prefixed `nooks-api-`\nand have full read/write access within the owning workspace.\n\n### OAuth 2.0 access tokens\n\nShort-lived (1 hour), user-scoped, scope-limited JWTs issued by\n`https://oauth.nooks.in` via the standard authorization-code + PKCE flow.\nBest for third-party apps acting on behalf of a specific user — the token\ncarries that user's identity and a subset of scopes the user consented\nto. Refresh tokens rotate every 90 days and are invalidated on first\nre-use (refresh-token reuse detection).\n\n**Endpoints:**\n\n- Authorize: `https://oauth.nooks.in/oauth/authorize`\n- Token: `https://oauth.nooks.in/oauth/token`\n- JWKS: `https://oauth.nooks.in/.well-known/jwks.json`\n- Server metadata (RFC 8414): `https://oauth.nooks.in/.well-known/oauth-authorization-server`\n\n**Available scopes:**\n\n| Scope | Grants |\n| --- | --- |\n| `prospects:read` | View your prospects |\n| `prospects:write` | Create and update prospects |\n| `sequences:read` | View your sequences |\n| `sequences:write` | Create and update sequences |\n| `sequence-steps:read` | View sequence steps |\n| `sequence-states:read` | View sequence enrollments |\n| `sequence-states:write` | Enroll prospects and manage enrollments |\n| `tasks:read` | View your tasks |\n| `tasks:write` | Create, update, complete, skip, and delete tasks |\n| `calls:read` | View your calls |\n| `calls:write` | Create and update calls |\n| `call-dispositions:read` | View call dispositions |\n| `emails:read` | View your emails |\n| `emails:write` | Create and update emails |\n| `mailboxes:read` | View connected mailboxes |\n| `users:read` | View users in your workspace |\n| `accounts:read` | View accounts (companies) in your workspace |\n| `notes:write` | Create notes on CRM-backed prospects and accounts |\n| `opportunities:read` | View opportunities (deals) in your workspace |\n| `search:read` | Search across your prospects, accounts, and other records |\n\n## Rate Limiting\nAPI requests are rate limited per workspace and per endpoint in a fixed\none-minute window. Separate endpoint buckets do not share quota, except\nroutes without an explicit limit use the shared default bucket.\n\nEvery response includes these headers:\n- `X-RateLimit-Limit` -- maximum requests allowed in the current per-minute window\n- `X-RateLimit-Remaining` -- requests remaining in the current window\n- `X-RateLimit-Reset` -- seconds until the current window resets\n\nWhen the limit is exceeded the API returns `429 Too Many Requests` with a\n`Retry-After` header indicating how many seconds to wait before retrying.\n\n**Current limits:**\n\n| Endpoint class | Methods | Limit |\n| --- | --- | --- |\n| List reads: `/sequences`, `/emails`, `/users`, `/sequenceStates`, `/prospects`, `/mailboxes`, `/calls`, `/sequenceSteps`, `/callDispositions`, `/tasks`, `/accounts` | `GET` | 300 requests/minute per endpoint |\n| Read by ID: `/sequences/{id}`, `/emails/{id}`, `/users/{id}`, `/sequenceStates/{id}`, `/prospects/{id}`, `/mailboxes/{id}`, `/calls/{id}`, `/sequenceSteps/{id}`, `/callDispositions/{id}`, `/tasks/{id}`, `/accounts/{id}`, `/emailTemplate/{id}` | `GET` | 600 requests/minute per endpoint |\n| Sequence writes: `/sequences`, `/sequences/{id}` | `POST`, `PATCH` | 120 requests/minute per endpoint |\n| Sequence state writes: `/sequenceStates`, `/sequenceStates/{id}`, `/sequenceStates/{id}/actions/finish` | `POST`, `DELETE` | 120 requests/minute per endpoint |\n| Task writes: `/tasks`, `/tasks/{id}`, `/tasks/{id}/complete`, `/tasks/{id}/skip` | `POST`, `PATCH`, `DELETE` | 120 requests/minute per endpoint |\n| CRM note writes: `/prospects/{id}/notes`, `/accounts/{id}/notes` | `POST` | 30 requests/minute per endpoint |\n| `/integrations/prospects/sync` | `POST` | 10 requests/minute |\n| Any other endpoint | Any | 30 requests/minute, shared default bucket |\n\n## Pagination\nList endpoints support cursor-based pagination using the `page[size]` and `page[after]`/`page[before]` query parameters.\n- Maximum page size: 100\n- Default page size: 50\n\n## Include (Inline Expansion)\nMost GET endpoints support an `include` query parameter that expands related `ReferenceObject` fields inline,\neliminating the need for follow-up API calls.\n\n**Format:** `?include=field1,field2` (comma-separated field names)\n\n**Without include:**\n```json\nGET /v1/prospects/123\n\n{\n \"id\": \"123\",\n \"sequenceStates\": [\n { \"id\": \"ss-1\", \"_href\": \"/v1/sequenceStates/ss-1\" }\n ]\n}\n```\n\n**With `include=sequenceStates`:**\n```json\nGET /v1/prospects/123?include=sequenceStates\n\n{\n \"id\": \"123\",\n \"sequenceStates\": [\n {\n \"id\": \"ss-1\",\n \"_href\": \"/v1/sequenceStates/ss-1\",\n \"state\": \"active\",\n \"sequence\": { \"id\": \"seq-1\", \"_href\": \"/v1/sequences/seq-1\" },\n \"prospect\": { \"id\": \"123\", \"_href\": \"/v1/prospects/123\" },\n \"creator\": { \"id\": \"u-1\", \"_href\": \"/v1/users/u-1\" },\n \"sequenceStep\": null,\n \"createdAt\": \"2024-01-01T00:00:00Z\",\n \"updatedAt\": \"2024-01-01T00:00:00Z\"\n }\n ]\n}\n```\n\nThe expanded object is a superset of `ReferenceObject` — it keeps `id` and `_href` and adds all DTO fields.\nThe response shape is unchanged; the field just contains richer data.\n\n**Hard constraints (enforced with 400 errors):**\n- **Max 3 includes per request.** Requesting more than 3 comma-separated values returns `400: \"include accepts at most 3 values\"`.\n- **GET endpoints only.** POST, PATCH, and DELETE endpoints do not accept `include`.\n- **No nested includes.** Only top-level field names are valid (e.g., `sequenceStates`). Dot-notation like `sequenceStates.prospect` returns 400.\n- **`account` on Prospect is not includable.** Requesting `include=account` returns 400.\n\nEach endpoint's `include` parameter lists the valid field names for that resource.\n" contact: name: Nooks API Support email: support@nooks.in url: https://www.nooks.in license: name: Proprietary x-logo: url: ./nooks-logo.svg altText: Nooks Logo href: https://www.nooks.ai servers: - url: https://partner-api.nooks.in/v1 description: Production API security: - BearerAuth: [] tags: - name: SequenceSteps description: Access sequence step definitions paths: /sequenceSteps: get: operationId: listSequenceSteps summary: List sequence steps description: "Returns a paginated list of sequence steps. Supports filtering by step IDs or by sequence.\n\nExample:\n```bash\ncurl -X GET 'https://partner-api.nooks.in/v1/sequenceSteps?page[size]=50' \\\n -H \"Authorization: Bearer nooks-api-...\"\n```\n\nFilter by sequence:\n```bash\ncurl -X GET 'https://partner-api.nooks.in/v1/sequenceSteps?filter[sequence][id]=550e8400-e29b-41d4-a716-446655440000' \\\n -H \"Authorization: Bearer nooks-api-...\"\n```\n\nFilter by IDs:\n```bash\ncurl -X GET 'https://partner-api.nooks.in/v1/sequenceSteps?filter[id]=UUID1,UUID2' \\\n -H \"Authorization: Bearer nooks-api-...\"\n```\n" tags: - SequenceSteps parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageAfter' - $ref: '#/components/parameters/PageBefore' - $ref: '#/components/parameters/FilterId' - name: filter[sequence][id] in: query description: Filter steps belonging to a specific sequence required: false schema: type: string format: uuid example: 550e8400-e29b-41d4-a716-446655440000 - name: include in: query description: Comma-separated relations to expand inline (`sequence`, `template`) or computed fields to include (`analytics`). Max 3. required: false schema: type: array items: type: string enum: - sequence - template - analytics maxItems: 3 style: form explode: false example: - analytics - $ref: '#/components/parameters/FilterUpdatedAtGte' - $ref: '#/components/parameters/FilterUpdatedAtLt' responses: '200': description: Successful response content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/SequenceStep' links: $ref: '#/components/schemas/PaginationLinks' example: data: - id: aa0e8400-e29b-41d4-a716-446655440030 order: 0 interval: null action: auto_email note: Initial outreach email sequence: id: 550e8400-e29b-41d4-a716-446655440000 _href: /v1/sequences/550e8400-e29b-41d4-a716-446655440000 template: id: ee0e8400-e29b-41d4-a716-446655440080 _href: /v1/emailTemplate/ee0e8400-e29b-41d4-a716-446655440080 hasAbVariants: true createdAt: '2025-10-01T10:00:00.000Z' updatedAt: '2025-10-01T10:00:00.000Z' - id: aa0e8400-e29b-41d4-a716-446655440031 order: 1 interval: 4320 action: call note: null sequence: id: 550e8400-e29b-41d4-a716-446655440000 _href: /v1/sequences/550e8400-e29b-41d4-a716-446655440000 template: null hasAbVariants: false createdAt: '2025-10-01T10:00:00.000Z' updatedAt: '2025-10-01T10:00:00.000Z' links: first: https://partner-api.nooks.in/v1/sequenceSteps?page[size]=50 prev: null next: https://partner-api.nooks.in/v1/sequenceSteps?page[size]=50&page[after]=eyJpZCI6ImFhMGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAzMSIsInYiOjF9 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' /sequenceSteps/{id}: get: operationId: getSequenceStep summary: Get sequence step by ID description: "Returns a single sequence step by its unique identifier.\n\nExample:\n```bash\ncurl -X GET 'https://partner-api.nooks.in/v1/sequenceSteps/aa0e8400-e29b-41d4-a716-446655440030' \\\n -H \"Authorization: Bearer nooks-api-...\"\n```\n" tags: - SequenceSteps parameters: - name: id in: path required: true description: Unique identifier for the sequence step schema: type: string format: uuid example: aa0e8400-e29b-41d4-a716-446655440030 - name: include in: query description: Comma-separated relations to expand inline (`sequence`, `template`) or computed fields to include (`analytics`). Max 3. required: false schema: type: array items: type: string enum: - sequence - template - analytics maxItems: 3 style: form explode: false example: - analytics responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/SequenceStep' example: id: aa0e8400-e29b-41d4-a716-446655440030 order: 0 interval: null action: auto_email note: Initial outreach email sequence: id: 550e8400-e29b-41d4-a716-446655440000 _href: /v1/sequences/550e8400-e29b-41d4-a716-446655440000 template: id: ee0e8400-e29b-41d4-a716-446655440080 _href: /v1/emailTemplate/ee0e8400-e29b-41d4-a716-446655440080 hasAbVariants: true analytics: email: delivered: 412 opened: 198 clicked: 41 replied: 23 bounced: 7 unsubscribed: 2 calls: null linkedIn: null createdAt: '2025-10-01T10:00:00.000Z' updatedAt: '2025-10-01T10:00:00.000Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' components: responses: Unauthorized: description: Unauthorized - invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/Error' example: error: code: UNAUTHORIZED message: Invalid or missing API key NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' example: error: code: NOT_FOUND message: The requested resource was not found InternalError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' example: error: code: INTERNAL_ERROR message: An unexpected error occurred BadRequest: description: Bad request - invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' example: error: code: BAD_REQUEST message: Invalid page[after] cursor parameters: FilterUpdatedAtLt: name: filter[updatedAt][lt] in: query description: Filter by updatedAt before this timestamp, exclusive (ISO 8601 datetime) required: false schema: type: string format: date-time example: '2026-01-01T00:00:00Z' PageSize: name: page[size] in: query description: Number of items per page (max 100) required: false schema: type: integer minimum: 1 maximum: 100 default: 50 example: 50 FilterUpdatedAtGte: name: filter[updatedAt][gte] in: query description: Filter by minimum updatedAt (ISO 8601 datetime) required: false schema: type: string format: date-time example: '2025-01-01T00:00:00Z' PageAfter: name: page[after] in: query description: 'Cursor for fetching the next page. Opaque token returned by the API in `links.next`; callers should treat it as opaque and only pass values they received from a previous response. Malformed cursors return `400 Bad Request`. ' required: false schema: type: string example: eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsInYiOjF9 FilterId: name: filter[id] in: query description: Filter by IDs (comma-separated UUIDs). An empty value is treated as "no filter". required: false schema: type: string pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(,[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})*)?$ example: 550e8400-e29b-41d4-a716-446655440000,660e8400-e29b-41d4-a716-446655440001 PageBefore: name: page[before] in: query description: 'Cursor for fetching the previous page. Opaque token returned by the API in `links.prev`; callers should treat it as opaque and only pass values they received from a previous response. Malformed cursors return `400 Bad Request`. ' required: false schema: type: string example: eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsInYiOjF9 schemas: Error: type: object description: Standard error response properties: error: type: object properties: code: type: string description: Error code example: NOT_FOUND message: type: string description: Human-readable error message example: The requested resource was not found traceId: type: string description: 'Request trace identifier for correlating this error with server logs and support requests. Present whenever the request carried a trace context (the normal case); omitted otherwise. ' example: abc123def456 Analytics: type: object description: 'Channel-grouped engagement counts, returned only when requested via `include=analytics`. Counts are lifetime totals (not date-windowed) and are raw counts, not rates — pick your own denominators. All three keys are always present. A group is `null` if and only if the channel is not applicable to the object: on a SequenceStep, only the group matching the step''s `action` channel is populated; on a Sequence, a group is populated when the sequence has at least one step of that channel (summed over its steps). `null` always means "channel not applicable here" — never "not computed". Zero means "applicable, nothing happened yet". Steps whose channel has no tracked analytics (`basic_task`, SMS) have all three groups `null`. ' properties: email: nullable: true description: Email engagement counts, or null if this object has no email channel allOf: - $ref: '#/components/schemas/EmailAnalytics' calls: nullable: true description: Call outcome counts, or null if this object has no call channel allOf: - $ref: '#/components/schemas/CallAnalytics' linkedIn: nullable: true description: LinkedIn engagement counts, or null if this object has no LinkedIn channel allOf: - $ref: '#/components/schemas/LinkedInAnalytics' required: - email - calls - linkedIn LinkedInAnalytics: type: object description: 'Lifetime LinkedIn engagement counts for sequence-attributed activity. Only activity tied to a sequence task is counted — LinkedIn connections imported from the user''s existing network and manually logged activity are excluded. Acceptances are discovered by periodic polling from the Nooks Chrome extension, so `connectionRequestsAccepted` can lag reality. ' properties: connectionRequestsSent: type: integer description: Connection requests sent (pending or accepted; withdrawn/failed requests are not counted) example: 96 connectionRequestsAccepted: type: integer description: Connection requests accepted example: 31 messagesSent: type: integer description: LinkedIn messages sent example: 64 repliesReceived: type: integer nullable: true description: 'Inbound LinkedIn replies. Replies can only be attributed at the sequence level (via the conversation''s first-reply sequence), so this is a number on Sequence analytics and always `null` on SequenceStep analytics. ' example: 12 required: - connectionRequestsSent - connectionRequestsAccepted - messagesSent - repliesReceived PaginationLinks: type: object description: 'Pagination links for navigating through results. Links are returned as relative references (path + query) that should be resolved against the base URL of the request. ' properties: first: type: string format: uri-reference description: URL for the first page example: /v1/sequences?page[size]=50 prev: type: string format: uri-reference nullable: true description: URL for the previous page (null if on first page) example: null next: type: string format: uri-reference nullable: true description: URL for the next page (null if on last page) example: /v1/sequences?page[size]=50&page[after]=eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsInYiOjF9 CallAnalytics: type: object description: 'Lifetime call outcome counts. Within a single step, each enrolled prospect is counted once, by the furthest outcome reached (not once per dial). Counts nest numerically (meetings ≤ connected ≤ dialed). ' properties: dialed: type: integer description: Prospects dialed example: 380 connected: type: integer description: Prospects where a call connected example: 71 meetings: type: integer description: Prospects where a meeting was booked example: 5 required: - dialed - connected - meetings EmailAnalytics: type: object description: Lifetime email engagement counts. properties: delivered: type: integer description: Emails delivered example: 412 opened: type: integer description: Emails opened (requires open tracking to be enabled for the workspace) example: 198 clicked: type: integer description: Emails with a tracked link click (requires click tracking) example: 41 replied: type: integer description: Email replies received example: 23 bounced: type: integer description: Emails that bounced example: 7 unsubscribed: type: integer description: Unsubscribes attributed to these emails example: 2 required: - delivered - opened - clicked - replied - bounced - unsubscribed SequenceStep: type: object description: A step within a sales sequence defining an action to perform properties: id: type: string format: uuid description: Unique identifier for the sequence step example: aa0e8400-e29b-41d4-a716-446655440030 order: type: integer description: Zero-based position of this step within the sequence example: 0 name: type: string nullable: true description: Optional display name for this step, or null if unnamed example: Intro email interval: type: integer nullable: true description: Number of minutes to wait before executing this step (null for the first step) example: 4320 action: type: string enum: - call - manual_email - auto_email - manual_email_reply - auto_email_reply - basic_task - linkedin_connection_request - manual_linkedin_connection_request - manual_linkedin_message - automatic_linkedin_message - manual_sms - auto_sms description: 'Type of action for this step: - `call`: Phone call task - `manual_email`: Manually composed email - `auto_email`: Automatically sent email - `manual_email_reply`: Manual email reply - `auto_email_reply`: Automatic email reply - `basic_task`: Generic manual task - `linkedin_connection_request`: LinkedIn connection request - `manual_linkedin_connection_request`: Manual LinkedIn connection request - `manual_linkedin_message`: Manual LinkedIn message - `automatic_linkedin_message`: Automatically sent LinkedIn message - `manual_sms`: Manual SMS message - `auto_sms`: Automatically sent SMS message ' example: auto_email note: type: string nullable: true description: Optional note or instructions for this step example: Initial outreach email sequence: description: The sequence this step belongs to $ref: '#/components/schemas/ReferenceObject' template: nullable: true description: 'The single email template attached to this step, or null if the step has no template (e.g. call/LinkedIn/SMS steps, or AI-email steps that select from a template chain at send time). Use `?include=template` to inline the full EmailTemplate DTO. ' allOf: - $ref: '#/components/schemas/ReferenceObject' hasAbVariants: type: boolean description: 'Whether this step is running an A/B test (i.e. has multiple variants). ' example: false analytics: description: 'Lifetime engagement counts for this step, grouped by channel. **Only present when the request includes `include=analytics`** (steps inlined into other resources via `include=sequenceSteps` never carry it). Only the group matching the step''s `action` channel is populated; the others are `null`. `linkedIn.repliesReceived` is always `null` on steps — replies are only attributable on the Sequence. ' $ref: '#/components/schemas/Analytics' createdAt: type: string format: date-time description: When the step was created example: '2025-10-01T10:00:00.000Z' updatedAt: type: string format: date-time description: When the step was last updated example: '2025-10-01T10:00:00.000Z' required: - id - order - name - interval - action - note - sequence - template - hasAbVariants - createdAt - updatedAt ReferenceObject: type: object description: A reference to a related resource properties: id: type: string description: Unique identifier of the referenced resource example: 550e8400-e29b-41d4-a716-446655440000 _href: type: string description: API path to the referenced resource example: /v1/sequences/550e8400-e29b-41d4-a716-446655440000 required: - id - _href securitySchemes: BearerAuth: type: http scheme: bearer description: 'Bearer token sent in the `Authorization` header. Accepts either a long-lived Nooks API key (`nooks-api-...`, from Developer Settings → API Keys) or an OAuth 2.0 access token issued by `https://oauth.nooks.in`. Use whichever you already have — the API validates both formats on the same header. For full OAuth flow details (authorize/token endpoints, scopes, refresh behavior) see the Authentication section of this spec''s introduction. ' x-tagGroups: - name: API Reference tags: - Sequences - SequenceSteps - Emails - Users - SequenceStates - Prospects - Accounts - Notes - Mailboxes - Calls - CallDispositions - Tasks - EmailTemplates - Introspection