{"openapi":"3.1.0","info":{"title":"Kudo","version":"1.0.0","summary":"Send a kudo: a short note of gratitude or affection, delivered as a link.","description":"Create a kudo for someone, get a share link for them and a private status link for the sender. Feelings become animated stickers on the card. No accounts. Messages should be first person, warm and specific, without em dashes."},"servers":[{"url":"https://kudo.kunalbagaria.com"}],"paths":{"/api/kudos":{"post":{"operationId":"createKudo","summary":"Seal a kudo and get its share link","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKudo"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Created"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests"}}}},"/api/kudos/{id}":{"get":{"operationId":"getKudo","summary":"Read a kudo as the recipient sees it","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Kudo"}}}},"404":{"description":"Not found"}}}},"/api/kudos/{id}/status":{"get":{"operationId":"getKudoStatus","summary":"Sender only: opens, hearts, reaction, lines","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"x-kudo-token","in":"header","required":true,"schema":{"type":"string"},"description":"Sender token from createKudo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"404":{"description":"Not found"}}}},"/api/kudos/{id}/lines":{"post":{"operationId":"addLine","summary":"Pass it along: add a line to a kudo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"line":{"type":"string","maxLength":200}},"required":["line"]}}}},"responses":{"200":{"description":"Updated lines"},"409":{"description":"Full"},"423":{"description":"Locked"}}}},"/api/kudos/{id}/reaction":{"post":{"operationId":"reactToKudo","summary":"Recipient: leave one reaction","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reaction":{"type":"string","enum":["love","grateful","joy","hug","cheer"]}},"required":["reaction"]}}}},"responses":{"200":{"description":"OK"}}}},"/api/kudos/{id}/hearts":{"post":{"operationId":"sendHearts","summary":"Recipient: send hearts back","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":12}}}}}},"responses":{"200":{"description":"OK"}}}},"/api/walls":{"post":{"operationId":"createWall","summary":"Create a shared wall for many kudos","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":60}},"required":["title"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"adminToken":{"type":"string"}}}}}}}}},"/api/walls/{id}":{"get":{"operationId":"getWall","summary":"Read a wall and its kudos","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}}},"components":{"schemas":{"CreateKudo":{"type":"object","required":["to","message","feelings"],"properties":{"to":{"type":"string","maxLength":40,"description":"Recipient's name"},"message":{"type":"string","minLength":2,"maxLength":600},"from":{"type":"string","maxLength":40,"description":"Omit to leave it unsigned"},"feelings":{"type":"array","items":{"type":"string","enum":["grateful","love","proud","joy","warmth","hug","missing","cheer","calm","lucky"]},"minItems":1,"maxItems":4},"paper":{"type":"string","enum":["cream","peach","rose","butter","sage","sky","lilac","midnight"],"default":"cream"},"unlockAt":{"type":"string","format":"date-time","description":"Keep it sealed until this moment"},"wallId":{"type":"string","description":"Pin to a wall"}}},"Created":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string","description":"Sender token. Keep private."},"shareUrl":{"type":"string","description":"Give this to the recipient"},"statusUrl":{"type":"string","description":"Sender only"},"printUrl":{"type":"string"},"unlockAt":{"type":["integer","null"]},"wallUrl":{"type":["string","null"]}}},"Kudo":{"type":"object","properties":{"id":{"type":"string"},"to":{"type":"string"},"from":{"type":"string"},"message":{"type":"string"},"feelings":{"type":"array","items":{"type":"string"}},"paper":{"type":"string"},"createdAt":{"type":"integer"},"unlockAt":{"type":["integer","null"]},"locked":{"type":"boolean"},"wallId":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"text":{"type":"string"},"at":{"type":"integer"}}}},"hasVoice":{"type":"boolean"}}},"Status":{"type":"object","properties":{"openCount":{"type":"integer"},"openedAt":{"type":["integer","null"]},"hearts":{"type":"integer"},"reaction":{"type":["string","null"]},"lines":{"type":"array"},"unlockAt":{"type":["integer","null"]}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"field":{"type":"string"}}}}}}