> 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).

# Case Notes

Notes associated with collaboration requests

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

> Get notes for a collaboration request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Notes","description":"Notes associated with collaboration requests"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/notes":{"get":{"tags":["Case Notes"],"summary":"Get notes for a collaboration request","operationId":"getNotes","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}},{"name":"updatedAfter","in":"query","description":"Filter by notes that were updated after (YYYY-MM-DDTHH:MM:SSZ)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createdAfter","in":"query","description":"Filter by notes that were created after (YYYY-MM-DDTHH:MM:SSZ)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"includeRemoved","in":"query","description":"Filter to include removed notes - excluded by default","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"List of notes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}}},"application/problem+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/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```

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

> Create a note for a collaboration request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Notes","description":"Notes associated with collaboration requests"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/notes":{"post":{"tags":["Case Notes"],"summary":"Create a note for a collaboration request","operationId":"createNote","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNoteTemplateDTO"}}},"required":true},"responses":{"200":{"description":"Note created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNoteDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CaseNoteDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseNoteTemplateDTO":{"required":["description","priority","summary"],"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"submittedBy":{"$ref":"#/components/schemas/UserDTO"}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```
