{"openapi":"3.1.0","info":{"title":"Tease API","version":"1"},"tags":[{"name":"Smart links"}],"servers":[{"url":"https://app.tease.club"}],"components":{"schemas":{"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"},"SmartLinkCreate":{"properties":{"account_id":{"type":"string","maxLength":64,"title":"Account Id"},"link_type":{"type":"string","enum":["tracking_link","free_trial","mixed"],"title":"Link Type"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain"},"slug":{"type":"string","maxLength":32,"title":"Slug","default":""},"auto_links":{"type":"boolean","title":"Auto Links","default":true}},"additionalProperties":false,"type":"object","required":["account_id","link_type"],"title":"SmartLinkCreate","description":"A new smart link on one of the account's domains."},"SmartLinkTags":{"properties":{"tags":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Tags"}},"type":"object","required":["tags"],"title":"SmartLinkTags","description":"Labels to add to or remove from a smart link."},"PixelBody":{"properties":{"platform":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Platform"},"pixel_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Pixel Id"},"pixel_access_token":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Pixel Access Token"},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Label"},"event_source_url":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Event Source Url"},"event_click":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Event Click"},"event_new_subscriber":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Event New Subscriber"},"event_first_transaction":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Event First Transaction"},"event_new_transaction":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Event New Transaction"},"event_message_received_from_fan":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Event Message Received From Fan"},"event_fan_sent_3_messages":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Event Fan Sent 3 Messages"},"event_fan_sent_1_message":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Event Fan Sent 1 Message"},"supercharged_events":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supercharged Events"}},"additionalProperties":false,"type":"object","title":"PixelBody","description":"A pixel as the vendor writes it; a flag is on/off or the platform's event name."},"TestEventBody":{"properties":{"event_type":{"type":"string","maxLength":48,"title":"Event Type"},"test_event_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Test Event Code"}},"type":"object","required":["event_type"],"title":"TestEventBody","description":"Which event to fire at the pixel, and Meta's Test Events code."},"RulesBody":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/RoutingRule"},"type":"array","maxItems":200,"minItems":1,"title":"Rules"},"fallback_destination_id":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":1},{"type":"null"}],"title":"Fallback Destination Id"},"source":{"anyOf":[{"type":"string","pattern":"^[a-z_]{0,32}$"},{"type":"null"}],"title":"Source"},"ad_platform_id":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":1},{"type":"null"}],"title":"Ad Platform Id"},"auto_links":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Links"},"allow_shared":{"type":"boolean","title":"Allow Shared","default":false}},"additionalProperties":false,"type":"object","required":["rules"],"title":"RulesBody","description":"The whole routing of a smart link; an omitted fallback is cleared, as PUT replaces."},"RoutingRule":{"properties":{"countries":{"items":{"type":"string"},"type":"array","maxItems":250,"title":"Countries"},"match":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Match"},"variants":{"items":{"$ref":"#/components/schemas/RuleVariant"},"type":"array","maxItems":20,"minItems":1,"title":"Variants"}},"additionalProperties":false,"type":"object","required":["variants"],"title":"RoutingRule","description":"One row: its countries (none on the last row, All countries) and its variants."},"RuleVariant":{"properties":{"destination_id":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Destination Id"},"weight":{"type":"integer","maximum":1000,"minimum":0,"title":"Weight"},"only_with_country_link":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Only With Country Link"}},"additionalProperties":false,"type":"object","required":["destination_id","weight"],"title":"RuleVariant","description":"One weighted place a row sends its visitors to."},"DestinationBody":{"properties":{"kind":{"type":"string","enum":["of_link","fansly_link","telegram","telegram_gate","offer","url"],"title":"Kind"},"label":{"type":"string","maxLength":255,"title":"Label","default":""},"network":{"type":"string","maxLength":64,"title":"Network","default":""},"url_template":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url Template"},"native_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Native Id"},"platform_account_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Platform Account Id"},"bot_id":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":1},{"type":"null"}],"title":"Bot Id"},"wants":{"anyOf":[{"type":"string","enum":["paid","ftl"]},{"type":"null"}],"title":"Wants"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"DestinationBody","description":"A new place the smart link may send to; its key comes from destination-options."}}},"paths":{"/v1/smart-links":{"get":{"summary":"List smart links","description":"The key's smart links in id order, with their all-time counters.","operationId":"list_smart_links_v1_smart_links_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Account Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tag"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"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 links"]},"post":{"summary":"Create a smart link","description":"Create a smart link on the account's domain; 201 with its card.","operationId":"create_smart_link_v1_smart_links_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartLinkCreate"}}}},"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 links"]}},"/v1/smart-links/{smart_link_id}":{"get":{"summary":"Read a smart link","description":"One smart link with its all-time counters.","operationId":"get_smart_link_v1_smart_links__smart_link_id__get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link 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 links"]},"delete":{"summary":"Delete a smart link","description":"Turn the link off (/r/<slug> answers 404); a working link needs its slug, a link on live buttons ``confirm``.","operationId":"delete_smart_link_v1_smart_links__smart_link_id__delete","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Confirm"}},{"name":"confirm_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Confirm Slug"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"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 links"]}},"/v1/smart-links/{smart_link_id}/tags":{"get":{"summary":"List link tags","description":"The smart link's labels.","operationId":"list_tags_v1_smart_links__smart_link_id__tags_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link 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 links"]},"post":{"summary":"Add link tags","description":"Add labels to the smart link; ones already on it stay once.","operationId":"add_tags_v1_smart_links__smart_link_id__tags_post","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartLinkTags"}}}},"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 links"]},"delete":{"summary":"Remove link tags","description":"Remove labels from the smart link.","operationId":"remove_tags_v1_smart_links__smart_link_id__tags_delete","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartLinkTags"}}}},"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 links"]}},"/v1/smart-links/{smart_link_id}/stats":{"get":{"summary":"Read smart link stats","description":"Daily and monthly clicks, subscribers and net revenue, with the window's totals.","operationId":"smart_link_stats_v1_smart_links__smart_link_id__stats_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"date_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date Start"},"description":"ISO date or date-time (UTC)"},{"name":"date_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date End"},"description":"ISO date or date-time (UTC)"}],"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 links"]}},"/v1/smart-links/{smart_link_id}/cohort-arps":{"get":{"summary":"Read smart link cohorts","description":"LTV Cohorts of the link: the fans who arrived in each of the last 12 months and their net by month of life.","operationId":"smart_link_cohorts_v1_smart_links__smart_link_id__cohort_arps_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"acquisition_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Acquisition Start"},"description":"ISO date or date-time (UTC)"},{"name":"acquisition_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Acquisition End"},"description":"ISO date or date-time (UTC)"}],"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 links"]}},"/v1/smart-links/{smart_link_id}/clicks":{"get":{"summary":"List smart link clicks","description":"The link's clicks, newest first, with country, device, referrer and campaign tags.\n\nEach click says `direction`, where it went: `of:<code>`, `fansly:<code>`, `tg_dm`, `tg_bot`, `offer`, `url`, or\n`page` back to the page with no live destination. Each click says `bot` (a bot-like user agent). `fraud` stays as an alias of `bot` and `converted`\nstays as a field that is always null: a click no longer carries a conversion (since #2141).","operationId":"smart_link_clicks_v1_smart_links__smart_link_id__clicks_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"date_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date Start"},"description":"ISO date or date-time (UTC)"},{"name":"date_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date End"},"description":"ISO date or date-time (UTC)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"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 links"]}},"/v1/smart-links/{smart_link_id}/conversions":{"get":{"summary":"List smart link conversions","description":"The link's conversions (subscriptions, purchases, messages), newest first.","operationId":"smart_link_conversions_v1_smart_links__smart_link_id__conversions_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"date_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date Start"},"description":"ISO date or date-time (UTC)"},{"name":"date_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date End"},"description":"ISO date or date-time (UTC)"},{"name":"conversion_type","in":"query","required":false,"schema":{"type":"string","maxLength":32,"default":"","title":"Conversion Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"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 links"]}},"/v1/smart-links/{smart_link_id}/fans":{"get":{"summary":"List smart link fans","description":"The fans the link brought, the biggest spender first, with net revenue and tips.","operationId":"smart_link_fans_v1_smart_links__smart_link_id__fans_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"date_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date Start"},"description":"ISO date or date-time (UTC)"},{"name":"date_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"ISO date or date-time (UTC)","title":"Date End"},"description":"ISO date or date-time (UTC)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"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 links"]}},"/v1/smart-links/{smart_link_id}/spenders":{"get":{"summary":"List smart link spenders","description":"The link's fans who spent at least ``min_spend_cents`` net, the biggest first.","operationId":"smart_link_spenders_v1_smart_links__smart_link_id__spenders_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"min_spend_cents","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Min Spend Cents"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"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 links"]}},"/v1/smart-links/{smart_link_id}/pixels":{"get":{"summary":"List pixels","description":"The pixels that receive the link's clicks and conversions (all of the account's).","operationId":"list_pixels_v1_smart_links__smart_link_id__pixels_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link 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 links"]},"post":{"summary":"Connect a pixel","description":"Connect a pixel to the account (Meta, TikTok and our other networks).","operationId":"create_pixel_v1_smart_links__smart_link_id__pixels_post","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PixelBody"}}}},"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 links"]}},"/v1/smart-links/{smart_link_id}/pixels/{pixel_id}":{"patch":{"summary":"Update a pixel","description":"Change a pixel's id, token, label, source URL or event switches.","operationId":"update_pixel_v1_smart_links__smart_link_id__pixels__pixel_id__patch","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"pixel_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Pixel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PixelBody"}}}},"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 links"]},"delete":{"summary":"Disconnect a pixel","description":"Disconnect the pixel from the account.","operationId":"disconnect_pixel_v1_smart_links__smart_link_id__pixels__pixel_id__delete","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"pixel_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Pixel 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 links"]}},"/v1/smart-links/{smart_link_id}/pixels/{pixel_id}/test-event":{"post":{"summary":"Send a test event","description":"Fire one test event at a Meta pixel; it shows under Meta's Test Events only.","operationId":"send_test_event_v1_smart_links__smart_link_id__pixels__pixel_id__test_event_post","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"pixel_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Pixel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEventBody"}}}},"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 links"]}},"/v1/smart-links/{smart_link_id}/rules":{"get":{"summary":"Read link rules","description":"The rows, the fallback and every destination with its id, kind, address and live flag.","operationId":"get_rules_v1_smart_links__smart_link_id__rules_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link 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 links"]},"put":{"summary":"Replace link rules","description":"Replace the rows; the last one has no countries and a country sits in one row only.","operationId":"put_rules_v1_smart_links__smart_link_id__rules_put","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesBody"}}}},"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 links"]}},"/v1/smart-links/{smart_link_id}/destination-options":{"get":{"summary":"List destination options","description":"What the link may send to: the creator's OnlyFans and Fansly links, invites and bots; kind, q, free_only,\ntype and page narrow it; each list holds at most `limit` rows, and one asked `kind` pages on by `cursor`.\n\nA link's taken names its smart link and rows (this one's too) or the archive it was in; free says it may be taken.\n#7213 Z5: 726 OnlyFans links made the whole answer ~150 KB.","operationId":"get_destination_options_v1_smart_links__smart_link_id__destination_options_get","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Only this kind's list, e.g. of_link or telegram.","title":"Kind"},"description":"Only this kind's list, e.g. of_link or telegram."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"Only options with this text in a field (name, url, code, page).","title":"Q"},"description":"Only options with this text in a field (name, url, code, page)."},{"name":"free_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only free OnlyFans and Fansly links: in no smart link row, backup or button, unearning for 30 days.","default":false,"title":"Free Only"},"description":"Only free OnlyFans and Fansly links: in no smart link row, backup or button, unearning for 30 days."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Only links of this type, e.g. tracking or trial.","title":"Type"},"description":"Only links of this type, e.g. tracking or trial."},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"Only links of this page: its username or account id.","title":"Page"},"description":"Only links of this page: its username or account id."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"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 links"]}},"/v1/smart-links/{smart_link_id}/destinations":{"post":{"summary":"Add a destination","description":"Add a destination; 201 with its id for the rows. A link another one serves is 409.","operationId":"post_destination_v1_smart_links__smart_link_id__destinations_post","parameters":[{"name":"smart_link_id","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Smart Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationBody"}}}},"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 links"]}}}}
