{"components":{"schemas":{"ErrorDetail":{"additionalProperties":false,"properties":{"location":{"description":"Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'","type":"string"},"message":{"description":"Error message text","type":"string"},"value":{"description":"The value at the given location"}},"type":"object"},"ErrorModel":{"additionalProperties":false,"properties":{"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","examples":["Property foo is required but is missing."],"type":"string"},"errors":{"description":"Optional list of individual error details","items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","examples":["https://example.com/error-log/abc123"],"format":"uri","type":"string"},"status":{"description":"HTTP status code","examples":[400],"format":"int64","type":"integer"},"title":{"description":"A short, human-readable summary of the problem type. This value should not change between occurrences of the error.","examples":["Bad Request"],"type":"string"},"type":{"default":"about:blank","description":"A URI reference to human-readable documentation for the error.","examples":["https://example.com/errors/example"],"format":"uri","type":"string"}},"type":"object"},"Note":{"additionalProperties":false,"properties":{"author":{"description":"What they call themselves","examples":["Ada"],"type":"string"},"author_id":{"description":"Who wrote it: their id, empty for a program with one of the Worker's own tokens","examples":["4f1c9a0e7b2d4c6f8a1b3c5d7e9f0a1b"],"type":"string"},"body":{"examples":["Buy milk"],"type":"string"},"created_at":{"examples":["2026-10-01 12:00:00"],"type":"string"},"id":{"examples":[42],"format":"int64","type":"integer"}},"required":["id","body","author_id","author","created_at"],"type":"object"},"Person":{"additionalProperties":false,"properties":{"id":{"examples":["4f1c9a0e7b2d4c6f8a1b3c5d7e9f0a1b"],"type":"string"},"name":{"examples":["Ada"],"type":"string"},"role":{"enum":["member","moderator","admin"],"examples":["member"],"type":"string"}},"required":["id","role"],"type":"object"}},"securitySchemes":{"accessClientId":{"description":"A Cloudflare Access service token's Client ID: a machine's own (cf zero-trust access service-tokens create)","in":"header","name":"CF-Access-Client-Id","type":"apiKey","x-fern-header":{"env":"CHARTER_EXAMPLE_ACCESS_CLIENT_ID","name":"accessClientId"}},"accessClientSecret":{"description":"The service token's Client Secret","in":"header","name":"CF-Access-Client-Secret","type":"apiKey","x-fern-header":{"env":"CHARTER_EXAMPLE_ACCESS_CLIENT_SECRET","name":"accessClientSecret"}},"bearer":{"description":"A token of the Worker's own, or one a person who signed in to the app made for a program on their account page: it may do what they may, or less","scheme":"bearer","type":"http"},"oidc":{"description":"An access token from the OpenID Connect issuer the deployment trusts (OIDC_ISSUER), with the operation's scopes","openIdConnectUrl":"/.well-known/openid-configuration","type":"openIdConnect"}}},"info":{"description":"Notes API: contract -\u003e OpenAPI -\u003e Fern.","title":"charter-example","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/hello":{"get":{"operationId":"hello","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"message":{"examples":["Hello from charter-example"],"type":"string"}},"required":["message"],"type":"object"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[],"summary":"Say hello","tags":["meta"],"x-fern-sdk-group-name":"meta","x-fern-sdk-method-name":"hello"}},"/api/notes":{"get":{"operationId":"listNotes","parameters":[{"description":"Opaque cursor from the previous page's next_cursor","in":"query","name":"cursor","schema":{"description":"Opaque cursor from the previous page's next_cursor","examples":["42"],"type":"string"}},{"in":"query","name":"limit","schema":{"default":20,"examples":[20],"format":"int32","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/Note"},"type":"array"},"next_cursor":{"description":"Pass as cursor for the next page; absent on the last page","examples":["41"],"type":"string"}},"required":["data"],"type":"object"}}},"description":"OK"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unprocessable Entity"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[],"summary":"List notes, newest first (cursor pagination)","tags":["notes"],"x-fern-pagination":{"cursor":"$request.cursor","next_cursor":"$response.next_cursor","results":"$response.data"},"x-fern-sdk-group-name":"notes","x-fern-sdk-method-name":"list"},"post":{"operationId":"createNote","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"examples":["Buy milk"],"minLength":1,"type":"string"}},"required":["body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unauthorized"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Too Many Requests: more than 100 calls in 60 s by this caller","headers":{"Retry-After":{"description":"Seconds to wait before calling again","schema":{"type":"integer"}}}},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"bearer":["write"]},{"accessClientId":["write"],"accessClientSecret":[]},{"oidc":["write"]}],"summary":"Create a note","tags":["notes"],"x-fern-sdk-group-name":"notes","x-fern-sdk-method-name":"create","x-rate-limit":{"binding":"WRITE_LIMIT","limit":100,"period":60}}},"/api/notes/watch":{"get":{"description":"Each event's SSE id is the note id, so a browser EventSource resumes by itself (Last-Event-ID).","operationId":"watchNotes","parameters":[{"description":"Resume after this note id (the id of the last note you received). Absent: only notes created from now on","in":"query","name":"after","schema":{"description":"Resume after this note id (the id of the last note you received). Absent: only notes created from now on","examples":["42"],"pattern":"^\\d+$","type":"string"}},{"description":"How long to keep the stream open","in":"query","name":"seconds","schema":{"default":30,"description":"How long to keep the stream open","examples":[30],"format":"int32","maximum":300,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/Note"}}},"description":"OK"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unprocessable Entity"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[],"summary":"Stream notes as they are created (Server-Sent Events). The stream ends after `seconds`; call again with `after` = the last note id to continue without gaps","tags":["notes"],"x-fern-sdk-group-name":"notes","x-fern-sdk-method-name":"watch","x-fern-streaming":{"format":"sse","resumable":true,"terminator":"[end-of-stream]"}}},"/api/notes/{id}":{"delete":{"operationId":"deleteNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"examples":[42],"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unprocessable Entity"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"bearer":["write"]},{"accessClientId":["write"],"accessClientSecret":[]},{"oidc":["write"]}],"summary":"Remove a note: your own, or anyone's if you may moderate","tags":["notes"],"x-fern-sdk-group-name":"notes","x-fern-sdk-method-name":"delete"}},"/api/people":{"get":{"operationId":"listPeople","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/Person"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unauthorized"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"bearer":["admin"]},{"accessClientId":["admin"],"accessClientSecret":[]},{"oidc":["admin"]}],"summary":"Everyone who signed up, and their role","tags":["people"],"x-fern-sdk-group-name":"people","x-fern-sdk-method-name":"list"}},"/api/people/{id}/role":{"put":{"operationId":"setRole","parameters":[{"in":"path","name":"id","required":true,"schema":{"examples":["4f1c9a0e7b2d4c6f8a1b3c5d7e9f0a1b"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"role":{"enum":["member","moderator","admin"],"examples":["moderator"],"type":"string"}},"required":["role"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unauthorized"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Unprocessable Entity"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"bearer":["admin"]},{"accessClientId":["admin"],"accessClientSecret":[]},{"oidc":["admin"]}],"summary":"Make someone a member, a moderator or an admin","tags":["people"],"x-fern-sdk-group-name":"people","x-fern-sdk-method-name":"setRole"}}},"servers":[{"url":"https://charter-example.ubuntusoftware.net"}]}