openapi: 3.0.1 info: title: Twenty CRM Companies Notes API description: 'REST specification for Twenty, the open-source CRM. Twenty auto-generates a REST API (and a parallel GraphQL API) from your workspace data model. This document covers the Core API (CRUD over records such as People, Companies, Opportunities, Notes, and Tasks) and the Metadata API (schema management for objects and fields). Endpoints are served from a per-workspace base URL: https://api.twenty.com on Twenty Cloud, or https://{your-domain} when self-hosted. The Core API lives under /rest and the Metadata API under /rest/metadata. All requests are authenticated with a Bearer API key created in Settings -> API & Webhooks.' termsOfService: https://twenty.com/legal/tos contact: name: Twenty url: https://twenty.com/ license: name: AGPL-3.0 url: https://github.com/twentyhq/twenty/blob/main/LICENSE version: '0.40' servers: - url: https://api.twenty.com description: Twenty Cloud - url: https://{domain} description: Self-hosted workspace variables: domain: default: your-domain.com description: Your self-hosted Twenty instance host. security: - bearerAuth: [] tags: - name: Notes description: Core API CRUD over note records. paths: /rest/notes: get: operationId: listNotes tags: - Notes summary: List notes parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/OrderBy' - $ref: '#/components/parameters/Filter' - $ref: '#/components/parameters/Depth' responses: '200': description: A page of notes. content: application/json: schema: $ref: '#/components/schemas/RecordListResponse' post: operationId: createNote tags: - Notes summary: Create a note requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NoteInput' responses: '201': description: The created note. content: application/json: schema: $ref: '#/components/schemas/RecordResponse' /rest/notes/{id}: parameters: - $ref: '#/components/parameters/RecordId' get: operationId: getNote tags: - Notes summary: Get a note responses: '200': description: The requested note. content: application/json: schema: $ref: '#/components/schemas/RecordResponse' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateNote tags: - Notes summary: Update a note requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NoteInput' responses: '200': description: The updated note. content: application/json: schema: $ref: '#/components/schemas/RecordResponse' delete: operationId: deleteNote tags: - Notes summary: Delete a note responses: '200': $ref: '#/components/responses/Deleted' components: parameters: Depth: name: depth in: query description: Relation traversal depth (0, 1, or 2) to embed related records. schema: type: integer enum: - 0 - 1 - 2 default: 1 OrderBy: name: order_by in: query description: Field and direction to sort by, e.g. `createdAt[DescNullsLast]`. schema: type: string RecordId: name: id in: path required: true description: The UUID of the record. schema: type: string format: uuid Limit: name: limit in: query description: Maximum number of records to return per page. schema: type: integer default: 60 maximum: 60 Filter: name: filter in: query description: Filter expression, e.g. `name[eq]:Acme`. schema: type: string schemas: PageInfo: type: object properties: hasNextPage: type: boolean startCursor: type: string endCursor: type: string NoteInput: type: object properties: title: type: string body: type: object description: Rich-text body payload (blocknote/markdown JSON). position: type: number Error: type: object properties: statusCode: type: integer messages: type: array items: type: string error: type: string RecordResponse: type: object properties: data: type: object additionalProperties: true RecordListResponse: type: object properties: data: type: object additionalProperties: true pageInfo: $ref: '#/components/schemas/PageInfo' totalCount: type: integer responses: NotFound: description: The record was not found. content: application/json: schema: $ref: '#/components/schemas/Error' Deleted: description: The record was deleted. content: application/json: schema: type: object properties: data: type: object properties: deletePerson: type: object properties: id: type: string format: uuid securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: 'API key created in Settings -> API & Webhooks, sent as `Authorization: Bearer `.'