> For the complete documentation index, see [llms.txt](https://tsanet.gitbook.io/connect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tsanet.gitbook.io/connect/api-reference/case-notes.md). Agents can also search and read this documentation through its [MCP server](https://tsanet.gitbook.io/connect/~gitbook/mcp).

# Case Notes

Notes associated with collaboration requests

## GET /v1/collaboration-requests/{token}/notes

> Get notes for a collaboration request

```json
{"openapi":"3.0.3","info":{"title":"TSANet Connect Core API","version":"1.0.0"},"tags":[{"name":"Case Notes","description":"Notes associated with collaboration requests"}],"servers":[{"url":"http://localhost:8080","description":"Local"},{"url":"https://connect2.tahoelab.us","description":"Dev"},{"url":"https://connect2.tsanet.net","description":"Beta"},{"url":"https://connect2.tsanet.org","description":"Prod"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste a Bearer JWT here. Two token types are accepted:\n\n**Connect1 User Tokens** — issued by the Connect1 identity service. Copy the token from your Connect1 session.\n\n**Azure AD M2M** — use the `azureClientCredentials` scheme below to get a token, then paste it here.\n"}},"schemas":{"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyId":{"type":"integer","format":"int64","description":"Identifier of the company that authored the note. Same value as CompanyDTO.id. Absent when the note has no authoring company (platform-generated notes).\n"},"companyName":{"type":"string","maxLength":191,"description":"Display name of the company that authored the note. Not a stable identifier. Absent for platform-generated notes, which have creatorName \"SYSTEM\", a null companyId, and a null companyName. Do not treat a missing company as the partner company.\n"},"creatorUsername":{"type":"string","maxLength":191},"creatorEmail":{"type":"string","maxLength":191},"creatorName":{"type":"string","maxLength":191},"summary":{"type":"string","maxLength":500},"description":{"type":"string","maxLength":5000},"priority":{"$ref":"#/components/schemas/NotePriority"},"type":{"allOf":[{"$ref":"#/components/schemas/NoteTypeSelectionDTO"}],"description":"Null or absent means the sender set no type. Do not treat a null, absent or unrecognized type as public.\n"},"direction":{"allOf":[{"$ref":"#/components/schemas/CollaborationRequestDirection"}],"description":"Relative to the authenticated member reading the note, same enum as the collaboration case. OUTBOUND when companyId is the reader's company, INBOUND when it is the other company. Absent only when companyId is absent.\n"},"status":{"$ref":"#/components/schemas/NoteStatus"},"token":{"type":"string","maxLength":20},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"manifest":{"type":"string","nullable":true,"description":"Optional opaque Compact JWS for request verification by the receiving connector. Stored and returned as submitted; never parsed or modified by the platform.\n"},"encrypted":{"type":"boolean","default":false,"description":"Whether note content is encrypted. Always true or false; defaults to false when omitted on create. Never parsed or modified by the platform beyond applying that default.\n"}}},"NotePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"NoteTypeSelectionDTO":{"type":"object","required":["code","displayName"],"properties":{"code":{"$ref":"#/components/schemas/NoteTypeCode"},"displayName":{"type":"string","maxLength":191,"description":"Human-readable label. Do not use as an identifier."}}},"NoteTypeCode":{"type":"string","description":"Stable lowercase code. The set can grow without an API release, so match the code, never the display text. When creating, send a code from `GET /v1/note-types` (matched ignoring case); others are rejected. It is not an access-control filter.\n"},"CollaborationRequestDirection":{"type":"string","enum":["OUTBOUND","INBOUND"]},"NoteStatus":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"}},"additionalProperties":true}}},"paths":{"/v1/collaboration-requests/{token}/notes":{"get":{"tags":["Case Notes"],"summary":"Get notes for a collaboration request","operationId":"getNotes","parameters":[{"name":"token","in":"path","required":true,"description":"The token provided by TSANet for the collaboration request","schema":{"type":"string"}},{"name":"updatedAfter","in":"query","required":false,"description":"Filter by notes that were updated after (YYYY-MM-DDTHH:MM:SSZ)","schema":{"type":"string","format":"date-time"}},{"name":"createdAfter","in":"query","required":false,"description":"Filter by notes that were created after (YYYY-MM-DDTHH:MM:SSZ)","schema":{"type":"string","format":"date-time"}},{"name":"includeRemoved","in":"query","required":false,"description":"Filter to include removed notes - excluded by default","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"List of notes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}}}}}}}
```

## Create a note for a collaboration request

> Creates a note on a collaboration request. Closed requests reject note creation with the\
> message "Rejected: The TSANet request is Closed. Please create a new request."<br>

```json
{"openapi":"3.0.3","info":{"title":"TSANet Connect Core API","version":"1.0.0"},"tags":[{"name":"Case Notes","description":"Notes associated with collaboration requests"}],"servers":[{"url":"http://localhost:8080","description":"Local"},{"url":"https://connect2.tahoelab.us","description":"Dev"},{"url":"https://connect2.tsanet.net","description":"Beta"},{"url":"https://connect2.tsanet.org","description":"Prod"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste a Bearer JWT here. Two token types are accepted:\n\n**Connect1 User Tokens** — issued by the Connect1 identity service. Copy the token from your Connect1 session.\n\n**Azure AD M2M** — use the `azureClientCredentials` scheme below to get a token, then paste it here.\n"}},"schemas":{"CaseNoteTemplateDTO":{"required":["description","summary"],"type":"object","properties":{"summary":{"type":"string","maxLength":500},"description":{"type":"string","maxLength":5000},"priority":{"$ref":"#/components/schemas/NotePriority"},"type":{"allOf":[{"$ref":"#/components/schemas/NoteTypeReferenceDTO"}],"description":"Optional. Omitted, null, or `{\"code\": null}` stores the note with no type. Otherwise `code` must be one returned by `GET /v1/note-types`.\n"},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"manifest":{"type":"string","description":"Optional opaque Compact JWS for request verification by the receiving connector. Stored and returned as submitted; never parsed or modified by the platform.\n"},"encrypted":{"type":"boolean","default":false,"description":"Optional flag indicating whether note content is encrypted. Defaults to false when omitted. Never parsed or modified by the platform beyond applying that default.\n"}}},"NotePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"NoteTypeReferenceDTO":{"type":"object","required":["code"],"properties":{"code":{"allOf":[{"$ref":"#/components/schemas/NoteTypeCode"}],"nullable":true,"description":"Null stores the note with no type."}}},"NoteTypeCode":{"type":"string","description":"Stable lowercase code. The set can grow without an API release, so match the code, never the display text. When creating, send a code from `GET /v1/note-types` (matched ignoring case); others are rejected. It is not an access-control filter.\n"},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string","maxLength":191},"firstName":{"type":"string","maxLength":191},"lastName":{"type":"string","maxLength":191},"email":{"type":"string","maxLength":191},"phone":{"type":"string","maxLength":50},"phoneCountryCode":{"type":"string","maxLength":10},"city":{"type":"string","maxLength":191},"emailCheckFailData":{"type":"string","maxLength":191}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyId":{"type":"integer","format":"int64","description":"Identifier of the company that authored the note. Same value as CompanyDTO.id. Absent when the note has no authoring company (platform-generated notes).\n"},"companyName":{"type":"string","maxLength":191,"description":"Display name of the company that authored the note. Not a stable identifier. Absent for platform-generated notes, which have creatorName \"SYSTEM\", a null companyId, and a null companyName. Do not treat a missing company as the partner company.\n"},"creatorUsername":{"type":"string","maxLength":191},"creatorEmail":{"type":"string","maxLength":191},"creatorName":{"type":"string","maxLength":191},"summary":{"type":"string","maxLength":500},"description":{"type":"string","maxLength":5000},"priority":{"$ref":"#/components/schemas/NotePriority"},"type":{"allOf":[{"$ref":"#/components/schemas/NoteTypeSelectionDTO"}],"description":"Null or absent means the sender set no type. Do not treat a null, absent or unrecognized type as public.\n"},"direction":{"allOf":[{"$ref":"#/components/schemas/CollaborationRequestDirection"}],"description":"Relative to the authenticated member reading the note, same enum as the collaboration case. OUTBOUND when companyId is the reader's company, INBOUND when it is the other company. Absent only when companyId is absent.\n"},"status":{"$ref":"#/components/schemas/NoteStatus"},"token":{"type":"string","maxLength":20},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"manifest":{"type":"string","nullable":true,"description":"Optional opaque Compact JWS for request verification by the receiving connector. Stored and returned as submitted; never parsed or modified by the platform.\n"},"encrypted":{"type":"boolean","default":false,"description":"Whether note content is encrypted. Always true or false; defaults to false when omitted on create. Never parsed or modified by the platform beyond applying that default.\n"}}},"NoteTypeSelectionDTO":{"type":"object","required":["code","displayName"],"properties":{"code":{"$ref":"#/components/schemas/NoteTypeCode"},"displayName":{"type":"string","maxLength":191,"description":"Human-readable label. Do not use as an identifier."}}},"CollaborationRequestDirection":{"type":"string","enum":["OUTBOUND","INBOUND"]},"NoteStatus":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"}},"additionalProperties":true}}},"paths":{"/v1/collaboration-requests/{token}/notes":{"post":{"tags":["Case Notes"],"summary":"Create a note for a collaboration request","description":"Creates a note on a collaboration request. Closed requests reject note creation with the\nmessage \"Rejected: The TSANet request is Closed. Please create a new request.\"\n","operationId":"createNote","parameters":[{"name":"token","in":"path","required":true,"description":"The token provided by TSANet for the collaboration request","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNoteTemplateDTO"}}}},"responses":{"200":{"description":"Note created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNoteDTO"}}}},"400":{"description":"Unknown or non-writable `type`. `application/problem+json` adds `field` and\n`allowedValues`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}}}}}}}
```

## List note types

> Returns the note types a client may send on create, in display order. Using it is optional.

```json
{"openapi":"3.0.3","info":{"title":"TSANet Connect Core API","version":"1.0.0"},"tags":[{"name":"Case Notes","description":"Notes associated with collaboration requests"}],"servers":[{"url":"http://localhost:8080","description":"Local"},{"url":"https://connect2.tahoelab.us","description":"Dev"},{"url":"https://connect2.tsanet.net","description":"Beta"},{"url":"https://connect2.tsanet.org","description":"Prod"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste a Bearer JWT here. Two token types are accepted:\n\n**Connect1 User Tokens** — issued by the Connect1 identity service. Copy the token from your Connect1 session.\n\n**Azure AD M2M** — use the `azureClientCredentials` scheme below to get a token, then paste it here.\n"}},"schemas":{"NoteTypeSelectionDTO":{"type":"object","required":["code","displayName"],"properties":{"code":{"$ref":"#/components/schemas/NoteTypeCode"},"displayName":{"type":"string","maxLength":191,"description":"Human-readable label. Do not use as an identifier."}}},"NoteTypeCode":{"type":"string","description":"Stable lowercase code. The set can grow without an API release, so match the code, never the display text. When creating, send a code from `GET /v1/note-types` (matched ignoring case); others are rejected. It is not an access-control filter.\n"},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"}},"additionalProperties":true}}},"paths":{"/v1/note-types":{"get":{"tags":["Case Notes"],"summary":"List note types","description":"Returns the note types a client may send on create, in display order. Using it is optional.","operationId":"getNoteTypes","responses":{"200":{"description":"Note types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteTypeSelectionDTO"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}}}}}}}
```
