{"openapi":"3.1.0","info":{"title":"ADSGRAM.store Publisher Pilot API","version":"0.1.0","description":"Server-to-server bot and channel pilot delivery. No charges, payouts, conversion API or Mini App SDK."},"servers":[{"url":"https://adsgram.store"}],"security":[{"PublisherKey":[]}],"components":{"securitySchemes":{"PublisherKey":{"type":"http","scheme":"bearer","description":"An approved publisher API key. Store on your server."}},"schemas":{"Ad":{"type":"object","properties":{"campaign_id":{"type":"integer"},"title":{"type":"string"},"text":{"type":"string"},"button_text":{"type":"string"},"image_url":{"type":["string","null"]},"click_url":{"type":"string","format":"uri"},"delivery_token":{"type":"string"},"expires_in":{"type":"integer","const":3600},"sponsored":{"type":"boolean","const":true},"billing":{"type":"string","const":"pilot_non_billable"}}}}},"paths":{"/api/network/ad":{"get":{"summary":"Select an active pilot creative","parameters":[{"name":"language","in":"query","schema":{"type":"string","default":"en"}}],"responses":{"200":{"description":"Creative allocated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ad"}}}},"204":{"description":"No matching creative"},"400":{"description":"Invalid language"},"401":{"description":"Publisher not approved or key invalid"},"429":{"description":"60 requests per publisher per minute exceeded"},"503":{"description":"Service unavailable"}}}},"/api/network/delivery":{"post":{"summary":"Confirm a successful publisher delivery once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"delivery_token from the ad response"}}}}}},"responses":{"200":{"description":"Delivery confirmed or already confirmed"},"400":{"description":"Invalid JSON or token"},"401":{"description":"Invalid publisher key"},"404":{"description":"Token expired or unrelated to publisher"},"413":{"description":"Body exceeds 200 characters"},"503":{"description":"Service unavailable"}}}}}}