{"openapi":"3.2.0","info":{"title":"CreatorsJet Public API","version":"1.0.0","description":"Server-to-server API for creator and agency campaigns, agency rosters and pitch decks, and creator or agency media kits.\nAPI keys are created in CreatorsJet settings, shown once, and must never be exposed in browser code.\n"},"servers":[{"url":"https://api.creatorsjet.com/public/v1","description":"Production"},{"url":"http://localhost:3000/public/v1","description":"Local development"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Identity"},{"name":"Creators"},{"name":"Imports"},{"name":"Media kits"},{"name":"Link in bio"},{"name":"Decks"},{"name":"Campaigns"},{"name":"Analytics"}],"paths":{"/me":{"get":{"operationId":"getCurrentSubject","tags":["Identity"],"summary":"Retrieve the authenticated API subject","responses":{"200":{"description":"Authenticated subject and granted scopes","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Subject"}}}]},"examples":{"agency":{"value":{"data":{"subject_type":"agency","subject_id":"66b0f51d46071dc43b2db101","user_id":"66b0f51d46071dc43b2db102","scopes":["roster:read","roster:write"],"entitlement":"active"},"request_id":"50c20a47-bf9a-4dfa-98ae-54fd89a172e1"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/creators":{"post":{"operationId":"createCreator","tags":["Creators"],"summary":"Add one creator to an agency roster","x-required-scopes":["roster:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatorInput"},"example":{"display_name":"Maria Lopez","email":"maria@example.com","country":"France","languages":["en","fr"],"tags":["fashion","lifestyle"],"socials":[{"platform":"instagram","handle_or_url":"@maria"}]}}}},"responses":{"201":{"description":"Creator and default agency media kit created","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatorCreateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"operationId":"listCreators","tags":["Creators"],"summary":"List an agency roster","x-required-scopes":["roster:read"],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Cursor-paginated roster","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Creator"}},"meta":{"$ref":"#/components/schemas/CursorMeta"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/creators/{creator_id}":{"get":{"operationId":"getCreator","tags":["Creators"],"summary":"Retrieve creator profile and summary metrics","description":"Agencies require roster:read and can retrieve roster members. Creator keys require profile:read and can retrieve only themselves.","x-required-scopes":["roster:read","profile:read"],"parameters":[{"name":"creator_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"}}],"responses":{"200":{"description":"Creator data","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Creator"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/creator-imports":{"post":{"operationId":"createCreatorImport","tags":["Imports"],"summary":"Queue a creator roster CSV import","description":"Maximum 2 MB and 500 data rows. Remote avatar_url values are not accepted. Successful rows automatically receive an agency media kit.","x-required-scopes":["roster:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}},"encoding":{"file":{"contentType":"text/csv"}}}}},"responses":{"202":{"description":"Import queued","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreatorImport"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/creator-imports/{import_id}":{"get":{"operationId":"getCreatorImport","tags":["Imports"],"summary":"Retrieve an import and its row results","x-required-scopes":["roster:read"],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"}}],"responses":{"200":{"description":"Import progress and row results","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreatorImport"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/media-kits":{"post":{"operationId":"ensureMediaKit","tags":["Media kits"],"summary":"Ensure a default media kit exists","description":"Agency keys supply creator_id. Creator keys infer their own creator and omit creator_id. Repeated calls return the existing default kit.","x-required-scopes":["media_kits:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"creator_id":{"$ref":"#/components/schemas/ObjectId"}}},"examples":{"agency":{"value":{"creator_id":"66b0f51d46071dc43b2db103"}},"creator":{"value":{}}}}}},"responses":{"200":{"description":"Existing default media kit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaKitEnsureResponse"}}}},"201":{"description":"Default media kit created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaKitEnsureResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"operationId":"listMediaKits","tags":["Media kits"],"summary":"List visible media kits","x-required-scopes":["media_kits:read"],"parameters":[{"name":"creator_id","in":"query","description":"Optional agency-only roster filter","schema":{"$ref":"#/components/schemas/ObjectId"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Cursor-paginated media kits","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MediaKit"}},"meta":{"$ref":"#/components/schemas/CursorMeta"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/media-kits/{media_kit_id}":{"get":{"operationId":"getMediaKit","tags":["Media kits"],"summary":"Retrieve one owned media kit","x-required-scopes":["media_kits:read"],"parameters":[{"name":"media_kit_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"}}],"responses":{"200":{"description":"Media kit summary","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MediaKit"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/analytics/views":{"get":{"operationId":"getViewAnalytics","tags":["Analytics"],"summary":"Retrieve page-view analytics","description":"Returns page views, unique visitors, and a time series for an owned resource.\nOmit resource_id to aggregate every resource of the selected type visible to the authenticated subject.\nCreator keys can query media_kit, link_in_bio, and campaign. Agency keys can query media_kit, roster, deck, and campaign.\nA roster resource means visits to the agency's public roster page; a campaign resource means visits to its public campaign report.\n","x-required-scopes":["analytics:read"],"parameters":[{"name":"resource_type","in":"query","required":true,"schema":{"type":"string","enum":["media_kit","link_in_bio","roster","deck","campaign"]}},{"name":"resource_id","in":"query","description":"Optional owned resource ID. Omit it for an aggregate across all owned resources of the selected type.","schema":{"$ref":"#/components/schemas/ObjectId"}},{"name":"timeframe","in":"query","schema":{"type":"string","enum":["last24h","today","yesterday","last7d","wtd","mtd","ytd","all"],"default":"all"}},{"name":"timezone","in":"query","description":"IANA timezone used to calculate calendar boundaries and time-series buckets.","schema":{"type":"string","default":"UTC","maxLength":100}}],"responses":{"200":{"description":"Page-view analytics for the selected resource or aggregate","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ViewAnalytics"}}}]},"examples":{"creator_media_kit":{"value":{"data":{"resource_type":"media_kit","resource_scope":"aggregate","resource_count":1,"resource_ids":["66b0f51d46071dc43b2db103"],"metric":"page_views","totals":{"page_views":482,"unique_visitors":361},"timeframe":"all","timezone":"UTC","period":{"start":null,"end":"2026-08-14T10:00:00.000Z"},"granularity":"month","series":[]},"request_id":"50c20a47-bf9a-4dfa-98ae-54fd89a172e1"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/link-in-bio":{"get":{"operationId":"getLinkInBio","tags":["Link in bio"],"summary":"Retrieve the creator's link-in-bio page","description":"Creator keys can retrieve only the page owned by their creator subject.","x-required-scopes":["link_in_bio:read"],"responses":{"200":{"description":"Creator-owned link-in-bio page","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LinkInBio"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createLinkInBio","tags":["Link in bio"],"summary":"Create the creator's link-in-bio page","description":"Creates the creator subject's single link-in-bio page. This endpoint supports page copy,\nsocial profile links, and link, title, or text blocks. It does not upload remote media,\nconfigure custom domains, delete blocks, or expose the full visual designer.\nEvery new block requires a stable client_id so retries cannot create duplicates.\n","x-required-scopes":["link_in_bio:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInBioCreateInput"},"example":{"slug":"maria-links","username":"Maria","bio":"Fashion creator and stylist","social_links":[{"platform":"instagram","handle_or_url":"@maria"}],"blocks":[{"client_id":"portfolio","type":"link","title":"My portfolio","url":"https://maria.example.com","visible":true,"order":0}]}}}},"responses":{"201":{"description":"Link-in-bio page created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LinkInBio"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateLinkInBio","tags":["Link in bio"],"summary":"Update the creator's link-in-bio page","description":"Updates supplied page fields and adds or edits supplied blocks. Existing blocks use id;\nnew blocks require client_id. Fields and blocks omitted from the request are unchanged.\nThis endpoint does not delete blocks or upload image or video blocks.\n","x-required-scopes":["link_in_bio:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInBioUpdateInput"}}}},"responses":{"200":{"description":"Link-in-bio page updated","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LinkInBio"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/decks":{"get":{"operationId":"listDecks","tags":["Decks"],"summary":"List agency pitch decks","description":"Returns only decks owned by the authenticated agency subject.","x-required-scopes":["decks:read"],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Cursor-paginated agency decks","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deck"}},"meta":{"$ref":"#/components/schemas/CursorMeta"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createDeck","tags":["Decks"],"summary":"Create an agency pitch deck","description":"Creates an agency-owned deck from creators already in the authenticated agency roster.\nCreation enforces the agency plan's pitch-deck allowance. Image and cover uploads, remote\nimage ingestion, deck deletion, and creators outside the agency roster are not supported.\n","x-required-scopes":["decks:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeckCreateInput"},"example":{"slug":"summer-creators","title":"Summer creator shortlist","bio":"Creators selected for the summer launch.","contact_email":"partnerships@agency.example","creator_ids":["66b0f51d46071dc43b2db103"],"tags":["summer","fashion"],"accent_color":"#CF114F","visibility":"link"}}}},"responses":{"201":{"description":"Deck created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deck"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/decks/{deck_id}":{"parameters":[{"name":"deck_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"}}],"get":{"operationId":"getDeck","tags":["Decks"],"summary":"Retrieve one agency pitch deck","x-required-scopes":["decks:read"],"responses":{"200":{"description":"Owned deck","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deck"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateDeck","tags":["Decks"],"summary":"Update an agency pitch deck","description":"Updates only supplied fields. creator_ids replaces the deck's roster selection and every ID\nmust already belong to the authenticated agency. Passwords are accepted only as write-only\nvalues and are never returned. Image and cover uploads and deck deletion are not supported.\n","x-required-scopes":["decks:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeckUpdateInput"}}}},"responses":{"200":{"description":"Deck updated","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deck"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns":{"get":{"operationId":"listCampaigns","tags":["Campaigns"],"summary":"List owned campaigns","description":"Returns campaigns owned by the authenticated creator or agency, optionally filtered by lifecycle status.","x-required-scopes":["campaigns:read"],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"status","in":"query","schema":{"type":"string","enum":["active","completed","archived"]}}],"responses":{"200":{"description":"Cursor-paginated campaigns","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"meta":{"$ref":"#/components/schemas/CursorMeta"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createCampaign","tags":["Campaigns"],"summary":"Create a campaign","description":"Creates a campaign owned by the authenticated creator or agency and enforces the account's\nexisting active-campaign allowance. refresh_cadence defaults to on_request. Daily or every-two-day\nautomatic tracking requires a future ends_at value. The public report is created disabled.\n","x-required-scopes":["campaigns:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateInput"},"example":{"name":"Summer launch","description":"Track launch creator content.","starts_at":"2026-08-15T00:00:00Z","refresh_cadence":"on_request","cpm":{"instagram":14,"tiktok":11}}}}},"responses":{"201":{"description":"Campaign created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns/{campaign_id}":{"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"}}],"get":{"operationId":"getCampaign","tags":["Campaigns"],"summary":"Retrieve one owned campaign","x-required-scopes":["campaigns:read"],"responses":{"200":{"description":"Owned campaign","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateCampaign","tags":["Campaigns"],"summary":"Update an owned campaign","description":"Updates only supplied campaign metadata, tracking cadence or state, platform CPM values, or EMV override.\nParticipants, content, public-report settings, refresh actions, lifecycle actions, and deletion are not supported.\n","x-required-scopes":["campaigns:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdateInput"}}}},"responses":{"200":{"description":"Campaign updated","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"cj_live","description":"Public API key from creator or agency settings. The complete secret is shown once."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique value up to 128 characters. Matching requests are replayed for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":128}},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}},"headers":{"RequestId":{"description":"Request identifier for support and tracing","schema":{"type":"string"}},"RateLimitLimit":{"description":"Requests allowed in the current window","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests remaining in the current window","schema":{"type":"integer"}},"RateLimitReset":{"description":"Unix timestamp when the window resets","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Invalid request or idempotency key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"Missing, invalid, expired, or revoked API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Forbidden":{"description":"Missing scope, incompatible account type, or ineligible plan","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"Resource not found or not owned by the authenticated subject","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Conflict":{"description":"Identity, concurrency, or idempotency conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"RequestTooLarge":{"description":"JSON or CSV exceeds its size limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"UnsupportedMediaType":{"description":"Import file is not CSV","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"RateLimited":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds until another request should be attempted","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"ObjectId":{"type":"string","pattern":"^[a-fA-F0-9]{24}$"},"SuccessEnvelope":{"type":"object","required":["data","request_id"],"properties":{"data":{},"meta":{"type":"object","additionalProperties":true},"request_id":{"type":"string"}}},"Problem":{"type":"object","required":["type","title","status","code","detail","request_id"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"request_id":{"type":"string"},"errors":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"Subject":{"type":"object","required":["subject_type","subject_id","scopes","entitlement"],"properties":{"subject_type":{"type":"string","enum":["agency","creator"]},"subject_id":{"$ref":"#/components/schemas/ObjectId"},"user_id":{"anyOf":[{"$ref":"#/components/schemas/ObjectId"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string","enum":["profile:read","roster:read","roster:write","media_kits:read","media_kits:write","link_in_bio:read","link_in_bio:write","decks:read","decks:write","campaigns:read","campaigns:write","analytics:read"]}},"entitlement":{"type":"string","enum":["active"]}}},"CreatorInput":{"type":"object","additionalProperties":false,"required":["display_name","socials"],"properties":{"display_name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email","maxLength":254},"bio":{"type":"string","maxLength":2000},"location":{"type":"string","maxLength":200},"country":{"type":"string","maxLength":100},"languages":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":50}},"tags":{"type":"array","maxItems":30,"items":{"type":"string","maxLength":80}},"socials":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["platform","handle_or_url"],"properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","facebook","linkedin","twitter","x"]},"handle_or_url":{"type":"string","minLength":1,"maxLength":500}}}}}},"CreatorCreateResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"boolean"},"idempotent":{"type":"boolean"},"creator":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"username":{"type":["string","null"]},"display_name":{"type":["string","null"]}}},"media_kit":{"anyOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"slug":{"type":"string"}}},{"type":"null"}]}}}}}]},"Creator":{"type":"object","required":["id","display_name","socials","summary_metrics","data_status"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"username":{"type":["string","null"]},"display_name":{"type":"string"},"avatar_url":{"type":["string","null"],"format":"uri"},"bio":{"type":["string","null"]},"location":{"type":["string","null"]},"country":{"type":["string","null"]},"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"socials":{"type":"array","items":{"$ref":"#/components/schemas/SocialSummary"}},"summary_metrics":{"type":"object","properties":{"total_followers":{"type":["integer","null"]},"metrics_updated_at":{"type":["string","null"],"format":"date-time"}}},"data_status":{"type":"string","enum":["available","pending","unavailable"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"SocialSummary":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"platform":{"type":"string"},"username":{"type":["string","null"]},"display_name":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"status":{"type":"string"},"followers":{"type":["integer","null"]},"average_views":{"type":["number","null"]},"average_engagements":{"type":["number","null"]},"engagement_rate":{"type":["number","null"]},"metrics_updated_at":{"type":["string","null"],"format":"date-time"}}},"CursorMeta":{"type":"object","required":["next_cursor","limit"],"properties":{"next_cursor":{"type":["string","null"]},"limit":{"type":"integer"}}},"CreatorImport":{"type":"object","required":["id","status","progress","rows"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"status":{"type":"string","enum":["queued","running","completed","completed_with_errors","failed"]},"source_filename":{"type":["string","null"]},"progress":{"type":"object","properties":{"total":{"type":"integer"},"processed":{"type":"integer"},"created":{"type":"integer"},"socials_attached":{"type":"integer"},"failed":{"type":"integer"}}},"rows":{"type":"array","items":{"type":"object","properties":{"row_number":{"type":"integer"},"status":{"type":"string"},"creator_id":{"anyOf":[{"$ref":"#/components/schemas/ObjectId"},{"type":"null"}]},"media_kit_id":{"anyOf":[{"$ref":"#/components/schemas/ObjectId"},{"type":"null"}]},"social_ids":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"errors":{"type":"array","items":{"type":"string"}}}}},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"MediaKit":{"type":"object","required":["id","creator_id","name","slug","visibility","editor_url","share_url"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"creator_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"slug":{"type":"string"},"visibility":{"type":"string"},"picture_url":{"type":["string","null"]},"cover_url":{"type":["string","null"]},"editor_url":{"type":"string","format":"uri"},"share_url":{"type":"string","format":"uri"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"MediaKitEnsureResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"boolean"},"media_kit":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"creator_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"slug":{"type":"string"},"visibility":{"type":"string"}}},"editor_url":{"type":"string","format":"uri"},"share_url":{"type":"string","format":"uri"}}}}}]},"ViewAnalytics":{"type":"object","required":["resource_type","resource_scope","resource_count","resource_ids","metric","totals","timeframe","timezone","period","granularity","series"],"properties":{"resource_type":{"type":"string","enum":["media_kit","link_in_bio","roster","deck","campaign"]},"resource_scope":{"type":"string","enum":["resource","aggregate"]},"resource_count":{"type":"integer","minimum":0},"resource_ids":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"metric":{"type":"string","const":"page_views"},"totals":{"type":"object","required":["page_views","unique_visitors"],"properties":{"page_views":{"type":"integer","minimum":0},"unique_visitors":{"type":"integer","minimum":0}}},"timeframe":{"type":"string","enum":["last24h","today","yesterday","last7d","wtd","mtd","ytd","all"]},"timezone":{"type":"string"},"period":{"type":"object","required":["start","end"],"properties":{"start":{"type":["string","null"],"format":"date-time"},"end":{"type":["string","null"],"format":"date-time"}}},"granularity":{"type":"string","enum":["hour","day","month"]},"series":{"type":"array","items":{"type":"object","required":["timestamp","page_views","unique_visitors"],"properties":{"timestamp":{"type":"string","format":"date-time"},"page_views":{"type":"integer","minimum":0},"unique_visitors":{"type":"integer","minimum":0}}}}}},"LinkInBioSocialInput":{"type":"object","additionalProperties":false,"required":["platform","handle_or_url"],"properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","facebook","github","pinterest","linkedin","twitter","x","snapchat"]},"handle_or_url":{"type":"string","maxLength":500}}},"LinkInBioBlockInput":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"client_id":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["link","title","text"]},"title":{"type":"string","maxLength":200},"url":{"type":"string","format":"uri","maxLength":2000},"body":{"type":"string","maxLength":1000},"button_text":{"type":"string","maxLength":30},"visible":{"type":"boolean","default":true},"order":{"type":"integer","minimum":0,"maximum":500},"style":{"type":"string","enum":["classic","button","callout","plain"]}},"description":"New blocks require client_id. Existing blocks use an owned id. Link blocks require an HTTP or HTTPS url."},"LinkInBioInputFields":{"type":"object","properties":{"username":{"type":"string","minLength":1,"maxLength":120},"location":{"type":["string","null"],"maxLength":80},"bio":{"type":["string","null"],"maxLength":80},"section_title":{"type":["string","null"],"maxLength":120},"text_block":{"type":["string","null"],"maxLength":1000},"theme":{"type":"string","enum":["classic","pastel"]},"shape":{"type":"string","enum":["rounded","rectangle"]},"social_links":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/LinkInBioSocialInput"}},"blocks":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/LinkInBioBlockInput"}}}},"LinkInBioCreateInput":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/LinkInBioInputFields"},{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$"}}}]},"LinkInBioUpdateInput":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/LinkInBioInputFields"},{"type":"object","minProperties":1,"properties":{"slug":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$"}}}]},"LinkInBioBlock":{"type":"object","required":["id","client_id","type","visible","order","style"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"client_id":{"type":["string","null"]},"type":{"type":"string","enum":["link","title","text"]},"title":{"type":["string","null"]},"url":{"type":["string","null"],"format":"uri"},"body":{"type":["string","null"]},"button_text":{"type":["string","null"]},"visible":{"type":"boolean"},"order":{"type":"integer"},"style":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"LinkInBio":{"type":"object","required":["id","creator_id","slug","username","theme","shape","social_links","blocks","editor_url","share_url"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"creator_id":{"$ref":"#/components/schemas/ObjectId"},"slug":{"type":"string"},"username":{"type":"string"},"location":{"type":["string","null"]},"bio":{"type":["string","null"]},"section_title":{"type":["string","null"]},"text_block":{"type":["string","null"]},"avatar_url":{"type":["string","null"],"format":"uri"},"theme":{"type":"string","enum":["classic","pastel"]},"shape":{"type":"string","enum":["rounded","rectangle"]},"social_links":{"type":"array","items":{"type":"object","required":["platform","url"],"properties":{"platform":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/LinkInBioBlock"}},"editor_url":{"type":"string","format":"uri"},"share_url":{"type":"string","format":"uri"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"DeckInputFields":{"type":"object","properties":{"slug":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$"},"title":{"type":"string","minLength":1,"maxLength":120},"bio":{"type":"string","maxLength":500},"contact_email":{"type":"string","format":"email","maxLength":254},"creator_ids":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/ObjectId"}},"tags":{"type":"array","maxItems":30,"items":{"type":"string","minLength":1,"maxLength":80}},"theme":{"type":["string","null"],"enum":["i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i12","i13","i14","i15","i16","i17","i18","i19","i20","i21","i22","i23","i24","i25","i26","i27","i28","i29","i30","i31","i32","i33","i34","i35","g1","g2","g3","g4","g5","g6","g7","g8","g9","g10","g11","g12",null]},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"cta":{"type":"string","enum":["partnerWithMe","workWithMe","getInTouch","contactCollabs","letsTeamUp"]},"location":{"type":["string","null"],"maxLength":100},"background_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"visibility":{"type":"string","enum":["link","private"]},"password":{"type":["string","null"],"minLength":1,"maxLength":128,"writeOnly":true}}},"DeckCreateInput":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/DeckInputFields"},{"type":"object","required":["slug","title","bio","contact_email","creator_ids"]}]},"DeckUpdateInput":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/DeckInputFields"},{"type":"object","minProperties":1}]},"Deck":{"type":"object","required":["id","agency_id","creator_ids","slug","title","bio","contact_email","tags","cta","visibility","has_password","editor_url","share_url"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"agency_id":{"$ref":"#/components/schemas/ObjectId"},"creator_ids":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"slug":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"},"contact_email":{"type":"string","format":"email"},"tags":{"type":"array","items":{"type":"string"}},"picture_url":{"type":["string","null"],"format":"uri"},"cover_url":{"type":["string","null"],"format":"uri"},"theme":{"type":["string","null"]},"accent_color":{"type":["string","null"]},"cta":{"type":"string","enum":["partnerWithMe","workWithMe","getInTouch","contactCollabs","letsTeamUp"]},"location":{"type":["string","null"]},"background_color":{"type":["string","null"]},"visibility":{"type":"string","enum":["link","private"]},"has_password":{"type":"boolean"},"editor_url":{"type":"string","format":"uri"},"share_url":{"type":"string","format":"uri"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"CampaignInputFields":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":140},"description":{"type":["string","null"],"maxLength":4000},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"refresh_cadence":{"type":"string","enum":["daily","every_2_days","on_request"]},"refresh_state":{"type":"string","enum":["active","paused"]},"cpm":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"instagram":{"type":"number","minimum":0},"tiktok":{"type":"number","minimum":0},"youtube":{"type":"number","minimum":0},"twitter":{"type":"number","minimum":0}}},"emv_override":{"type":["number","null"],"minimum":0}}},"CampaignCreateInput":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/CampaignInputFields"},{"type":"object","required":["name"],"properties":{"refresh_cadence":{"type":"string","enum":["daily","every_2_days","on_request"],"default":"on_request"}},"not":{"required":["refresh_state"]}}]},"CampaignUpdateInput":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/CampaignInputFields"},{"type":"object","minProperties":1}]},"CampaignSummary":{"type":"object","required":["creators","content","views","impressions","engagements","engagement_rate","emv"],"properties":{"creators":{"type":"integer","minimum":0},"content":{"type":"integer","minimum":0},"views":{"type":["number","null"],"minimum":0},"impressions":{"type":["number","null"],"minimum":0},"engagements":{"type":["number","null"],"minimum":0},"engagement_rate":{"type":["number","null"],"minimum":0},"emv":{"type":["number","null"],"minimum":0}}},"Campaign":{"type":"object","required":["id","owner_type","owner_id","name","status","refresh_cadence","refresh_state","cpm","public_report","editor_url"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"owner_type":{"type":"string","enum":["creator","agency"]},"owner_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["active","completed","archived"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"refresh_cadence":{"type":"string","enum":["daily","every_2_days","on_request"]},"refresh_state":{"type":"string","enum":["active","paused","quota_paused","ended"]},"cpm":{"type":"object","required":["instagram","tiktok","youtube","twitter"],"properties":{"instagram":{"type":"number","minimum":0},"tiktok":{"type":"number","minimum":0},"youtube":{"type":"number","minimum":0},"twitter":{"type":"number","minimum":0}}},"emv_override":{"type":["number","null"],"minimum":0},"public_report":{"type":"object","required":["enabled","access_mode","slug","share_url"],"properties":{"enabled":{"type":"boolean"},"access_mode":{"type":"string","enum":["link","password"]},"slug":{"type":"string"},"share_url":{"type":["string","null"],"format":"uri"}}},"editor_url":{"type":"string","format":"uri"},"summary":{"$ref":"#/components/schemas/CampaignSummary"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}}}}}