{"openapi":"3.1.0","info":{"title":"Doname API","version":"1.0.0","summary":"Public read API for Doname causes.","description":"Doname is an open source tool for causes in Latin America to receive monthly and one-time donations with 0% platform fee. This API lists approved public cause pages. Creating a page, donating, and contacting the team happen on the website so a person can confirm the story and the payment.","contact":{"name":"Doname","url":"https:\/\/dona.me\/contacto","email":"alfonso@vexilo.com"},"license":{"name":"MIT","url":"https:\/\/github.com\/alfonsobries\/doname"}},"servers":[{"url":"https:\/\/dona.me","description":"This Doname instance"}],"tags":[{"name":"causes","description":"Approved public cause pages."}],"paths":{"\/api\/causes":{"get":{"operationId":"listCauses","tags":["causes"],"summary":"List public causes","description":"Returns every approved cause, ordered by monthly supporters, descending. Unapproved or unpublished pages are omitted.","parameters":[],"responses":{"200":{"description":"Approved public causes.","content":{"application\/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Cause"}}}}}}}}}},"\/api\/causes\/{slug}":{"get":{"operationId":"getCause","tags":["causes"],"summary":"Get a public cause","description":"Returns one approved cause by slug. Unknown or unpublished slugs return 404.","parameters":[{"name":"slug","in":"path","required":true,"description":"Cause slug, matching the subdomain of the public page.","schema":{"type":"string","minLength":1,"example":"patitas-libres"}}],"responses":{"200":{"description":"The approved cause.","content":{"application\/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#\/components\/schemas\/Cause"}}}}}},"404":{"description":"No approved cause uses that slug.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorMessage"}}}}}}}},"components":{"schemas":{"Cause":{"type":"object","additionalProperties":false,"required":["name","slug","url","headline","about","category","city","founded_year","monthly_supporters_count","monthly_amounts","accepts_one_time","avatar_url","cover_url"],"properties":{"name":{"type":"string","description":"Public name of the cause.","examples":["Patitas Libres"]},"slug":{"type":"string","description":"URL slug. The public page lives at {slug}.dona.me.","examples":["patitas-libres"]},"url":{"type":"string","format":"uri","description":"Absolute URL of the cause page."},"headline":{"type":["string","null"],"description":"Short public headline."},"about":{"type":["string","null"],"description":"Longer public story of the cause."},"category":{"type":["string","null"],"description":"Cause category key."},"city":{"type":["string","null"],"description":"City where the cause operates."},"founded_year":{"type":["integer","null"],"description":"Year the cause started."},"monthly_supporters_count":{"type":"integer","minimum":0,"description":"How many people currently give every month."},"monthly_amounts":{"type":"array","items":{"type":"integer"},"description":"Suggested monthly amounts in the cause currency, in major units."},"accepts_one_time":{"type":"boolean","description":"Whether the cause also accepts one-time donations."},"avatar_url":{"type":["string","null"],"format":"uri"},"cover_url":{"type":["string","null"],"format":"uri"}}},"ErrorMessage":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}