{"openapi":"3.1.0","info":{"title":"debords","version":"1","description":"the feeds of debords: seals, what happened to them, and who did what. read-only; amounts are strings of the currency's smallest units"},"servers":[{"url":"https://staging.debords.com"}],"paths":{"/api/seals":{"get":{"summary":"seals, newest first, twenty at a time","parameters":[{"name":"state","in":"query","schema":{"type":"string","enum":["live","funded","released","not funded","not released","voided"]}},{"name":"currency","in":"query","schema":{"type":"string","description":"the token's address; 0x000…0 for eth"}},{"name":"creator","in":"query","schema":{"type":"string"}},{"name":"lang","in":"query","schema":{"type":"string","description":"two letters"}},{"name":"q","in":"query","schema":{"type":"string","description":"words to look for in the text"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["newest","ending","funded"]}},{"name":"cursor","in":"query","schema":{"type":"string","description":"the cursor the last page gave"}}],"responses":{"200":{"description":"seals and the cursor for the next page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Seals"}}}}}}},"/api/seals/{id}":{"get":{"summary":"one seal and its history","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the seal and its events"},"404":{"description":"no such seal"}}}},"/api/activity":{"get":{"summary":"everything anyone did, newest first, twenty at a time","parameters":[{"name":"seal","in":"query","schema":{"type":"string"}},{"name":"account","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"events, the seals they touch, and the cursor for the next page"}}}},"/api/accounts/{address}":{"get":{"summary":"an account's part in every seal it touched","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the seals, and what the account sealed, pledged, bonded and claimed"}}}},"/api/nonce":{"get":{"summary":"a nonce for signing in with a wallet (sign-in with ethereum)","responses":{"200":{"description":"{ nonce }"}}}},"/api/session":{"get":{"summary":"who is signed in","responses":{"200":{"description":"{ address }"},"401":{"description":"nobody"}}},"post":{"summary":"sign in: the signed message sets a cookie","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"{ address }"}}},"delete":{"summary":"sign out","responses":{"200":{"description":"ok"}}}},"/api/keys":{"get":{"summary":"your api keys (signed in)","responses":{"200":{"description":"{ keys: [{ hash, name, created, tier }] }"}}},"post":{"summary":"a new api key, shown once; send it in the `x-api-key` header to read the feeds at the key's rate","responses":{"200":{"description":"{ key, hash, name, tier }"}}}},"/api/tiers":{"get":{"summary":"the pass tiers: name, price a month and a year in usd, and the api rate","responses":{"200":{"description":"ok"}}}},"/api/passes/{address}":{"get":{"summary":"the pass an account holds now, if any: tier and when it ends","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/api/quote":{"post":{"summary":"a signed price for a pass, good for ten minutes (the page's own; sent from this site only)","responses":{"200":{"description":"ok"}}}},"/api/filters":{"get":{"summary":"your saved filters (signed in, with a supporter pass)","responses":{"200":{"description":"ok"}}},"post":{"summary":"save a filter under a name {name, query}","responses":{"200":{"description":"ok"}}}},"/api/filters/{name}":{"delete":{"summary":"forget a saved filter","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/api/alerts":{"get":{"summary":"your alerts and the chat they go to (signed in)","responses":{"200":{"description":"ok"}}},"post":{"summary":"set an alert {kind: own | creator | saved, target}","responses":{"200":{"description":"ok"}}}},"/api/alerts/link":{"post":{"summary":"a code to link a telegram chat, good for ten minutes","responses":{"200":{"description":"ok"}}}},"/api/alerts/{kind}/{target}":{"delete":{"summary":"take an alert back","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"target","in":"path","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/api/keys/{hash}":{"delete":{"summary":"revoke one of your api keys by its hash","parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/api/currencies":{"get":{"summary":"the currencies a seal may be priced in","responses":{"200":{"description":"symbol, address, decimals and the least fee in each"}}}}},"components":{"schemas":{"Seal":{"type":"object","properties":{"id":{"type":"string"},"contract":{"type":"string"},"creator":{"type":"string"},"token":{"type":"string"},"goal":{"type":"string"},"pledged":{"type":"string"},"bonded":{"type":"string"},"deadline":{"type":"integer"},"sealedAt":{"type":"integer"},"fundedAt":{"type":"integer"},"bondFee":{"type":"integer","description":"basis points"},"platformFee":{"type":"integer","description":"basis points"},"minFee":{"type":"string"},"status":{"type":"integer","description":"1 live, 2 funded, 3 released, 4 not funded, 5 not released, 6 voided"},"mask":{"type":"string","description":"bit i set: the i-th character is hidden"},"lang":{"type":"string"},"teaser":{"type":"string","description":"the text with each hidden character as a block"},"released":{"type":"string","description":"the whole text once released, else empty"}}},"Seals":{"type":"object","properties":{"seals":{"type":"array","items":{"$ref":"#/components/schemas/Seal"}},"cursor":{"type":["string","null"]}}}}}}