{"openapi":"3.1.0","info":{"title":"Tease API","version":"1"},"tags":[{"name":"Smart link postbacks"}],"servers":[{"url":"https://app.tease.club"}],"components":{"schemas":{"PostbackBody":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"http_method":{"type":"string","enum":["GET","POST"],"title":"Http Method","default":"GET"},"conversion_types":{"items":{"type":"string"},"type":"array","maxItems":4,"minItems":1,"title":"Conversion Types","description":"Any of: new_subscriber, new_transaction, message_received, fan_sent_3_messages."},"smart_link_scope":{"type":"string","enum":["global","campaign_specific"],"title":"Smart Link Scope"},"smart_link_ids":{"items":{"type":"integer"},"type":"array","maxItems":200,"title":"Smart Link Ids"},"headers":{"anyOf":[{"items":{"$ref":"#/components/schemas/Header"},"type":"array","maxItems":10},{"type":"null"}],"title":"Headers"},"body":{"type":"string","maxLength":2000,"title":"Body","default":""},"account_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Account Id"}},"type":"object","required":["url","conversion_types","smart_link_scope"],"title":"PostbackBody","description":"A postback as the vendor writes it; ``account_id`` places a global one."},"Header":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name"},"value":{"type":"string","maxLength":500,"title":"Value"}},"type":"object","required":["name","value"],"title":"Header","description":"One request header; its value is sealed in the vault and never shown again."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"TestSendBody":{"properties":{"conversion_type":{"type":"string","maxLength":32,"title":"Conversion Type","description":"One of: new_subscriber, new_transaction, message_received, fan_sent_3_messages.","default":"new_subscriber"}},"type":"object","title":"TestSendBody","description":"Which conversion type the made-up test conversion has."}}},"paths":{"/v1/smart-link-postbacks":{"get":{"summary":"List postbacks","description":"The key's postbacks, oldest first, with their latest delivery outcome.","operationId":"list_postbacks_v1_smart_link_postbacks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-api-key-scope":"read","tags":["Smart link postbacks"]},"post":{"summary":"Create a postback","description":"Create a postback: an Own URL connection owed every matching conversion from now on.","operationId":"create_postback_v1_smart_link_postbacks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostbackBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Smart link postbacks"]}},"/v1/smart-link-postbacks/{postback_id}":{"get":{"summary":"Read a postback","description":"One postback with its latest delivery outcome.","operationId":"get_postback_v1_smart_link_postbacks__postback_id__get","parameters":[{"name":"postback_id","in":"path","required":true,"schema":{"type":"string","maxLength":32,"pattern":"^[0-9a-f]{1,32}$","title":"Postback Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Smart link postbacks"]},"patch":{"summary":"Update a postback","description":"Replace a postback's settings; its account stays, omitted headers keep their values.","operationId":"update_postback_v1_smart_link_postbacks__postback_id__patch","parameters":[{"name":"postback_id","in":"path","required":true,"schema":{"type":"string","maxLength":32,"pattern":"^[0-9a-f]{1,32}$","title":"Postback Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostbackBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Smart link postbacks"]},"delete":{"summary":"Delete a postback","description":"Delete a postback; deliveries still owed to it are cancelled on their next turn.","operationId":"delete_postback_v1_smart_link_postbacks__postback_id__delete","parameters":[{"name":"postback_id","in":"path","required":true,"schema":{"type":"string","maxLength":32,"pattern":"^[0-9a-f]{1,32}$","title":"Postback Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Smart link postbacks"]}},"/v1/smart-link-postbacks/{postback_id}/test":{"post":{"summary":"Test a postback","description":"Call the postback once now with a made-up conversion; nothing is recorded.","operationId":"test_postback_v1_smart_link_postbacks__postback_id__test_post","parameters":[{"name":"postback_id","in":"path","required":true,"schema":{"type":"string","maxLength":32,"pattern":"^[0-9a-f]{1,32}$","title":"Postback Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Smart link postbacks"]}}}}
