The affiliate’s email address. Must be a valid email format. Creates or resolves an affiliate Account and a durable program contact for this email. Does not create a merchant User.
Custom tracking ID for the affiliate. Must contain only lowercase letters, numbers, and hyphens. Maximum 100 characters. If not provided, a tracking ID will be automatically generated from the affiliate’s name. Must be unique within your team.
Partnership status at create time. No follow-up update call is required. Valid values: pending, approved, rejected. Omit to keep the existing auto-approve behavior (approved).
Your external user ID for linking referral users to your own user system. Useful for matching affiliates back to users in your application. Maximum 255 characters.
Custom key-value data for storing additional information about the affiliate. You can store any JSON-serializable data here (e.g., {"plan": "pro", "signup_source": "landing_page"}).
Unique tracking ID for the affiliate. If a custom tracking_id was provided in the request, it will be used. Otherwise, it’s automatically generated from the name (with a random suffix if needed for uniqueness).
Partnership status with the program. Uppercase: "PENDING", "APPROVED", "REJECTED", or null. Matches the status you sent. Defaults to "APPROVED" when status is omitted.
Creates an affiliate Account and durable program contact. Existing program IDs, tracking, and financial relations stay intact. Does not create a customer/merchant User.
Set status on create when the affiliate should start as pending or rejected. You do not need a second PATCH to change status after create.
To retrieve related data like promo codes, commission overrides, invoice details, and payout methods, use GET /v1/affiliates/{id}?expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod.
If you provide a custom tracking_id that is already in use by another affiliate in your team, the API will return a 409 Conflict error with the code DUPLICATE_ERROR.
The tracking_id must contain only lowercase letters (a-z), numbers (0-9), and hyphens (-). Any other characters will result in a 400 Bad Request validation error.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Affonso Docs","colors":{"primary":"#881337","light":"#881337","dark":"#881337"},"logo":{"light":"https://mintcdn.com/affonso-20c7dee8/nWO6r2CUpJ-o-z8l/logo/affonso_logo_small.png?fit=max\u0026auto=format\u0026n=nWO6r2CUpJ-o-z8l\u0026q=85\u0026s=4b239574262c42f95697481e8b29adce","dark":"https://mintcdn.com/affonso-20c7dee8/nWO6r2CUpJ-o-z8l/logo/affonso_logo_small.png?fit=max\u0026auto=format\u0026n=nWO6r2CUpJ-o-z8l\u0026q=85\u0026s=4b239574262c42f95697481e8b29adce"},"favicon":"https://mintcdn.com/affonso-20c7dee8/kkGMCXH0kqsXT8_K/favicon.ico?fit=max\u0026auto=format\u0026n=kkGMCXH0kqsXT8_K\u0026q=85\u0026s=fd253ea2af2c3136159ed21ad7b444e3","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"}}},"navbar":{"links":[{"href":"mailto:hello@affonso.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://affonso.io/app"}},"footer":{"socials":{"x":"https://x.com/useAffonso","linkedin":"https://www.linkedin.com/company/affiliate-software"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"home","href":"https://affonso.io"},{"anchor":"Blog","icon":"newspaper","href":"https://affonso.io/blog"},{"anchor":"Help Center","icon":"book-open-cover","href":"https://affonso.io/help"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"affonso-20c7dee8","hasAudioNarration":false,"actualSubdomain":"affonso-20c7dee8","customDomains":["docs.affonso.io"],"gitSource":{"type":"github","owner":"affonso-io","repo":"affonso-developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6aedd9eaf09614e584b8380c","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":111},{"language":"default","tag":"Program Management","count":54},{"language":"default","tag":"Core Resources","count":43},{"language":"default","tag":"Program Settings","count":33},{"language":"default","tag":"MCP","count":17},{"language":"default","tag":"Campaigns","count":15},{"language":"default","tag":"Webhooks","count":11},{"language":"default","tag":"Tools","count":9},{"language":"default","tag":"Getting Started","count":8},{"language":"default","tag":"Affiliates","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api/endpoint/affiliates/create","slug":"/api/endpoint/affiliates/create","pageMetadata":{"title":"Create Affiliate","api":"POST https://api.affonso.io/v1/affiliates","description":"Create a new affiliate Account and program contact","href":"/api/endpoint/affiliates/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a new affiliate Account and program contact\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The affiliate’s full display name. Must be between 1 and 100 characters.`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`The affiliate’s email address. Must be a valid email format. Creates or resolves an affiliate Account and a durable program contact for this email. Does not create a merchant User.`})}),`\n`,_jsx(ParamField,{body:`tracking_id`,type:`string`,id:`param-tracking-id`,children:_jsx(_components.p,{children:`Custom tracking ID for the affiliate. Must contain only lowercase letters, numbers, and hyphens. Maximum 100 characters. If not provided, a tracking ID will be automatically generated from the affiliate’s name. Must be unique within your team.`})}),`\n`,_jsx(ParamField,{body:`group_id`,type:`string`,id:`param-group-id`,children:_jsx(_components.p,{children:`Optional affiliate group ID.`})}),`\n`,_jsx(ParamField,{body:`status`,type:`string`,default:`approved`,id:`param-status`,children:_jsxs(_components.p,{children:[`Partnership status at create time. No follow-up update call is required. Valid values: `,_jsx(_components.code,{children:`pending`}),`, `,_jsx(_components.code,{children:`approved`}),`, `,_jsx(_components.code,{children:`rejected`}),`. Omit to keep the existing auto-approve behavior (`,_jsx(_components.code,{children:`approved`}),`).`]})}),`\n`,_jsx(ParamField,{body:`company_name`,type:`string`,id:`param-company-name`,children:_jsx(_components.p,{children:`Company name for invoice. Maximum 100 characters.`})}),`\n`,_jsx(ParamField,{body:`country_code`,type:`string`,id:`param-country-code`,children:_jsx(_components.p,{children:`2-letter ISO country code.`})}),`\n`,_jsx(ParamField,{body:`payout_method`,type:`string`,id:`param-payout-method`,children:_jsxs(_components.p,{children:[`Payout method (lowercase with underscores). Valid values: `,_jsx(_components.code,{children:`paypal`}),`, `,_jsx(_components.code,{children:`wise`}),`, `,_jsx(_components.code,{children:`payoneer`}),`, `,_jsx(_components.code,{children:`paxum`}),`, `,_jsx(_components.code,{children:`webmoney`}),`, `,_jsx(_components.code,{children:`skrill`}),`, `,_jsx(_components.code,{children:`wire_transfer`}),`, `,_jsx(_components.code,{children:`bitcoin`}),`, `,_jsx(_components.code,{children:`ethereum`}),`, `,_jsx(_components.code,{children:`alipay`}),`, `,_jsx(_components.code,{children:`wechat`}),`, `,_jsx(_components.code,{children:`manual`}),`, `,_jsx(_components.code,{children:`none`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`payout_details`,type:`object`,id:`param-payout-details`,children:[_jsxs(_components.p,{children:[`Payout details (fields vary by method, all snake_case). The required fields depend on the `,_jsx(_components.code,{children:`payout_method`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Email-based methods`}),` (`,_jsx(_components.code,{children:`paypal`}),`, `,_jsx(_components.code,{children:`wise`}),`, `,_jsx(_components.code,{children:`payoneer`}),`, `,_jsx(_components.code,{children:`paxum`}),`, `,_jsx(_components.code,{children:`skrill`}),`): `,_jsx(_components.code,{children:`email`}),` (string, valid email)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ID-based methods`}),` (`,_jsx(_components.code,{children:`webmoney`}),`, `,_jsx(_components.code,{children:`alipay`}),`, `,_jsx(_components.code,{children:`wechat`}),`): `,_jsx(_components.code,{children:`account_id`}),` (string)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Crypto methods`}),` (`,_jsx(_components.code,{children:`bitcoin`}),`, `,_jsx(_components.code,{children:`ethereum`}),`): `,_jsx(_components.code,{children:`address`}),` (string, wallet address)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Wire transfer`}),` (`,_jsx(_components.code,{children:`wire_transfer`}),`): `,_jsx(_components.code,{children:`bank_name`}),`, `,_jsx(_components.code,{children:`account_number`}),`, `,_jsx(_components.code,{children:`swift_code`}),`, `,_jsx(_components.code,{children:`iban`}),`, `,_jsx(_components.code,{children:`routing_number`}),`, `,_jsx(_components.code,{children:`account_name`}),` (all strings)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manual`}),` (`,_jsx(_components.code,{children:`manual`}),`): No details required`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`external_user_id`,type:`string`,id:`param-external-user-id`,children:_jsx(_components.p,{children:`Your external user ID for linking referral users to your own user system. Useful for matching affiliates back to users in your application. Maximum 255 characters.`})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsxs(_components.p,{children:[`Custom key-value data for storing additional information about the affiliate. You can store any JSON-serializable data here (e.g., `,_jsx(_components.code,{children:`{\"plan\": \"pro\", \"signup_source\": \"landing_page\"}`}),`).`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`The response includes the created affiliate object with the following fields:`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`true`}),` for successful responses`]})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`The created affiliate object.`}),_jsxs(Expandable,{title:`Data Object Properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Unique identifier for the affiliate`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The affiliate’s display name`})}),_jsx(ResponseField,{name:`email`,type:`string`,id:`param-email-1`,children:_jsx(_components.p,{children:`The affiliate’s email address`})}),_jsx(ResponseField,{name:`tracking_id`,type:`string`,id:`param-tracking-id-1`,children:_jsxs(_components.p,{children:[`Unique tracking ID for the affiliate. If a custom `,_jsx(_components.code,{children:`tracking_id`}),` was provided in the request, it will be used. Otherwise, it’s automatically generated from the name (with a random suffix if needed for uniqueness).`]})}),_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source`,children:_jsxs(_components.p,{children:[`Source of the affiliate creation, always `,_jsx(_components.code,{children:`\"api\"`}),` for API-created affiliates`]})}),_jsx(ResponseField,{name:`partnership_status`,type:`string`,id:`param-partnership-status`,children:_jsxs(_components.p,{children:[`Partnership status with the program. Uppercase: `,_jsx(_components.code,{children:`\"PENDING\"`}),`, `,_jsx(_components.code,{children:`\"APPROVED\"`}),`, `,_jsx(_components.code,{children:`\"REJECTED\"`}),`, or `,_jsx(_components.code,{children:`null`}),`. Matches the `,_jsx(_components.code,{children:`status`}),` you sent. Defaults to `,_jsx(_components.code,{children:`\"APPROVED\"`}),` when `,_jsx(_components.code,{children:`status`}),` is omitted.`]})}),_jsx(ResponseField,{name:`onboarding_completed`,type:`boolean`,id:`param-onboarding-completed`,children:_jsxs(_components.p,{children:[`Whether the affiliate has completed their onboarding process. Always `,_jsx(_components.code,{children:`false`}),` for newly created affiliates.`]})}),_jsx(ResponseField,{name:`group_id`,type:`string | null`,id:`param-group-id-1`,children:_jsxs(_components.p,{children:[`The affiliate group ID if assigned, otherwise `,_jsx(_components.code,{children:`null`})]})}),_jsx(ResponseField,{name:`external_user_id`,type:`string | null`,id:`param-external-user-id-1`,children:_jsxs(_components.p,{children:[`Your external user ID if provided, otherwise `,_jsx(_components.code,{children:`null`})]})}),_jsx(ResponseField,{name:`metadata`,type:`object | null`,id:`param-metadata-1`,children:_jsxs(_components.p,{children:[`Custom key-value data if provided, otherwise `,_jsx(_components.code,{children:`null`})]})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of when the affiliate was created`})})]})]}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Creates an affiliate Account and durable program contact. Existing program IDs, tracking, and financial relations stay intact. Does not create a customer/merchant User.`}),`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`status`}),` on create when the affiliate should start as `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`rejected`}),`. You do not need a second `,_jsx(_components.code,{children:`PATCH`}),` to change status after create.`]}),`\n`,_jsxs(_components.li,{children:[`To retrieve related data like promo codes, commission overrides, invoice details, and payout methods, use `,_jsx(_components.code,{children:`GET /v1/affiliates/{id}?expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If you provide a custom `,_jsx(_components.code,{children:`tracking_id`}),` that is already in use by another affiliate in your team, the API will return a `,_jsx(_components.code,{children:`409 Conflict`}),` error with the code `,_jsx(_components.code,{children:`DUPLICATE_ERROR`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`tracking_id`}),` must contain only lowercase letters (a-z), numbers (0-9), and hyphens (-). Any other characters will result in a `,_jsx(_components.code,{children:`400 Bad Request`}),` validation error.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Affiliate","api":"POST https://api.affonso.io/v1/affiliates","description":"Create a new affiliate Account and program contact","href":"/api/endpoint/affiliates/create"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The affiliate’s full display name. Must be between 1 and 100 characters.`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`The affiliate’s email address. Must be a valid email format. Creates or resolves an affiliate Account and a durable program contact for this email. Does not create a merchant User.`})}),`\n`,_jsx(ParamField,{body:`tracking_id`,type:`string`,id:`param-tracking-id`,children:_jsx(_components.p,{children:`Custom tracking ID for the affiliate. Must contain only lowercase letters, numbers, and hyphens. Maximum 100 characters. If not provided, a tracking ID will be automatically generated from the affiliate’s name. Must be unique within your team.`})}),`\n`,_jsx(ParamField,{body:`group_id`,type:`string`,id:`param-group-id`,children:_jsx(_components.p,{children:`Optional affiliate group ID.`})}),`\n`,_jsx(ParamField,{body:`status`,type:`string`,default:`approved`,id:`param-status`,children:_jsxs(_components.p,{children:[`Partnership status at create time. No follow-up update call is required. Valid values: `,_jsx(_components.code,{children:`pending`}),`, `,_jsx(_components.code,{children:`approved`}),`, `,_jsx(_components.code,{children:`rejected`}),`. Omit to keep the existing auto-approve behavior (`,_jsx(_components.code,{children:`approved`}),`).`]})}),`\n`,_jsx(ParamField,{body:`company_name`,type:`string`,id:`param-company-name`,children:_jsx(_components.p,{children:`Company name for invoice. Maximum 100 characters.`})}),`\n`,_jsx(ParamField,{body:`country_code`,type:`string`,id:`param-country-code`,children:_jsx(_components.p,{children:`2-letter ISO country code.`})}),`\n`,_jsx(ParamField,{body:`payout_method`,type:`string`,id:`param-payout-method`,children:_jsxs(_components.p,{children:[`Payout method (lowercase with underscores). Valid values: `,_jsx(_components.code,{children:`paypal`}),`, `,_jsx(_components.code,{children:`wise`}),`, `,_jsx(_components.code,{children:`payoneer`}),`, `,_jsx(_components.code,{children:`paxum`}),`, `,_jsx(_components.code,{children:`webmoney`}),`, `,_jsx(_components.code,{children:`skrill`}),`, `,_jsx(_components.code,{children:`wire_transfer`}),`, `,_jsx(_components.code,{children:`bitcoin`}),`, `,_jsx(_components.code,{children:`ethereum`}),`, `,_jsx(_components.code,{children:`alipay`}),`, `,_jsx(_components.code,{children:`wechat`}),`, `,_jsx(_components.code,{children:`manual`}),`, `,_jsx(_components.code,{children:`none`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`payout_details`,type:`object`,id:`param-payout-details`,children:[_jsxs(_components.p,{children:[`Payout details (fields vary by method, all snake_case). The required fields depend on the `,_jsx(_components.code,{children:`payout_method`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Email-based methods`}),` (`,_jsx(_components.code,{children:`paypal`}),`, `,_jsx(_components.code,{children:`wise`}),`, `,_jsx(_components.code,{children:`payoneer`}),`, `,_jsx(_components.code,{children:`paxum`}),`, `,_jsx(_components.code,{children:`skrill`}),`): `,_jsx(_components.code,{children:`email`}),` (string, valid email)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ID-based methods`}),` (`,_jsx(_components.code,{children:`webmoney`}),`, `,_jsx(_components.code,{children:`alipay`}),`, `,_jsx(_components.code,{children:`wechat`}),`): `,_jsx(_components.code,{children:`account_id`}),` (string)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Crypto methods`}),` (`,_jsx(_components.code,{children:`bitcoin`}),`, `,_jsx(_components.code,{children:`ethereum`}),`): `,_jsx(_components.code,{children:`address`}),` (string, wallet address)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Wire transfer`}),` (`,_jsx(_components.code,{children:`wire_transfer`}),`): `,_jsx(_components.code,{children:`bank_name`}),`, `,_jsx(_components.code,{children:`account_number`}),`, `,_jsx(_components.code,{children:`swift_code`}),`, `,_jsx(_components.code,{children:`iban`}),`, `,_jsx(_components.code,{children:`routing_number`}),`, `,_jsx(_components.code,{children:`account_name`}),` (all strings)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manual`}),` (`,_jsx(_components.code,{children:`manual`}),`): No details required`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`external_user_id`,type:`string`,id:`param-external-user-id`,children:_jsx(_components.p,{children:`Your external user ID for linking referral users to your own user system. Useful for matching affiliates back to users in your application. Maximum 255 characters.`})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsxs(_components.p,{children:[`Custom key-value data for storing additional information about the affiliate. You can store any JSON-serializable data here (e.g., `,_jsx(_components.code,{children:`{\"plan\": \"pro\", \"signup_source\": \"landing_page\"}`}),`).`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`The response includes the created affiliate object with the following fields:`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`true`}),` for successful responses`]})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`The created affiliate object.`}),_jsxs(Expandable,{title:`Data Object Properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Unique identifier for the affiliate`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The affiliate’s display name`})}),_jsx(ResponseField,{name:`email`,type:`string`,id:`param-email-1`,children:_jsx(_components.p,{children:`The affiliate’s email address`})}),_jsx(ResponseField,{name:`tracking_id`,type:`string`,id:`param-tracking-id-1`,children:_jsxs(_components.p,{children:[`Unique tracking ID for the affiliate. If a custom `,_jsx(_components.code,{children:`tracking_id`}),` was provided in the request, it will be used. Otherwise, it’s automatically generated from the name (with a random suffix if needed for uniqueness).`]})}),_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source`,children:_jsxs(_components.p,{children:[`Source of the affiliate creation, always `,_jsx(_components.code,{children:`\"api\"`}),` for API-created affiliates`]})}),_jsx(ResponseField,{name:`partnership_status`,type:`string`,id:`param-partnership-status`,children:_jsxs(_components.p,{children:[`Partnership status with the program. Uppercase: `,_jsx(_components.code,{children:`\"PENDING\"`}),`, `,_jsx(_components.code,{children:`\"APPROVED\"`}),`, `,_jsx(_components.code,{children:`\"REJECTED\"`}),`, or `,_jsx(_components.code,{children:`null`}),`. Matches the `,_jsx(_components.code,{children:`status`}),` you sent. Defaults to `,_jsx(_components.code,{children:`\"APPROVED\"`}),` when `,_jsx(_components.code,{children:`status`}),` is omitted.`]})}),_jsx(ResponseField,{name:`onboarding_completed`,type:`boolean`,id:`param-onboarding-completed`,children:_jsxs(_components.p,{children:[`Whether the affiliate has completed their onboarding process. Always `,_jsx(_components.code,{children:`false`}),` for newly created affiliates.`]})}),_jsx(ResponseField,{name:`group_id`,type:`string | null`,id:`param-group-id-1`,children:_jsxs(_components.p,{children:[`The affiliate group ID if assigned, otherwise `,_jsx(_components.code,{children:`null`})]})}),_jsx(ResponseField,{name:`external_user_id`,type:`string | null`,id:`param-external-user-id-1`,children:_jsxs(_components.p,{children:[`Your external user ID if provided, otherwise `,_jsx(_components.code,{children:`null`})]})}),_jsx(ResponseField,{name:`metadata`,type:`object | null`,id:`param-metadata-1`,children:_jsxs(_components.p,{children:[`Custom key-value data if provided, otherwise `,_jsx(_components.code,{children:`null`})]})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of when the affiliate was created`})})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`18`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.affonso.io/v1/affiliates\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_live_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Jane Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"jane@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"company_name\": \"Jane LLC\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country_code\": \"US\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payout_method\": \"paypal\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payout_details\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"jane@example.com\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"external_user_id\": \"user_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"plan\": \"pro\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signup_source\": \"landing_page\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL (pending status)`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.affonso.io/v1/affiliates\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_live_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Alex Rivera\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"alex@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"status\": \"pending\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL (with custom tracking_id)`,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.affonso.io/v1/affiliates\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_live_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Jane Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"jane@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tracking_id\": \"janesmith-2024\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payout_method\": \"paypal\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payout_details\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"jane@example.com\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`Response`,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cmj8q1wau0003sb01lpvka478\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jane Smith\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jane@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tracking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jane-smith\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"partnership_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"APPROVED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"onboarding_completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"group_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_user_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"plan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signup_source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"landing_page\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-25T09:15:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Response (with custom tracking_id)`,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cmj8q1wau0003sb01lpvka478\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jane Smith\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jane@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tracking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"janesmith-2024\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"partnership_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"APPROVED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"onboarding_completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"group_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_user_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-25T09:15:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Creates an affiliate Account and durable program contact. Existing program IDs, tracking, and financial relations stay intact. Does not create a customer/merchant User.`}),`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`status`}),` on create when the affiliate should start as `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`rejected`}),`. You do not need a second `,_jsx(_components.code,{children:`PATCH`}),` to change status after create.`]}),`\n`,_jsxs(_components.li,{children:[`To retrieve related data like promo codes, commission overrides, invoice details, and payout methods, use `,_jsx(_components.code,{children:`GET /v1/affiliates/{id}?expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If you provide a custom `,_jsx(_components.code,{children:`tracking_id`}),` that is already in use by another affiliate in your team, the API will return a `,_jsx(_components.code,{children:`409 Conflict`}),` error with the code `,_jsx(_components.code,{children:`DUPLICATE_ERROR`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`tracking_id`}),` must contain only lowercase letters (a-z), numbers (0-9), and hyphens (-). Any other characters will result in a `,_jsx(_components.code,{children:`400 Bad Request`}),` validation error.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Affiliate","api":"POST https://api.affonso.io/v1/affiliates","description":"Create a new affiliate Account and program contact","href":"/api/endpoint/affiliates/create"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Body Parameters","slug":"body-parameters","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Notes","slug":"notes","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.affonso.io/v1/affiliates\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer sk_live_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"Jane Smith\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"jane@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"company_name\": \"Jane LLC\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country_code\": \"US\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"payout_method\": \"paypal\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"payout_details\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"jane@example.com\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"external_user_id\": \"user_123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"plan\": \"pro\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"signup_source\": \"landing_page\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL (pending status)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.affonso.io/v1/affiliates\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer sk_live_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"Alex Rivera\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"alex@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"status\": \"pending\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL (with custom tracking_id)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.affonso.io/v1/affiliates\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer sk_live_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"Jane Smith\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"jane@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"tracking_id\": \"janesmith-2024\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"payout_method\": \"paypal\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"payout_details\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"jane@example.com\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"19\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cmj8q1wau0003sb01lpvka478\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Jane Smith\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"jane@example.com\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"tracking_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"jane-smith\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"source\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"api\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"partnership_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"APPROVED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"onboarding_completed\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"group_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"external_user_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"user_123\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"metadata\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"plan\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pro\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"signup_source\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"landing_page\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-01-25T09:15:00Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Response (with custom tracking_id)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cmj8q1wau0003sb01lpvka478\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Jane Smith\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"jane@example.com\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"tracking_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"janesmith-2024\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"source\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"api\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"partnership_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"APPROVED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"onboarding_completed\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"group_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"external_user_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"metadata\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-01-25T09:15:00Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Affiliate","path":"/v1/affiliates","servers":[{"url":"https://api.affonso.io"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"The affiliate’s full display name. Must be between 1 and 100 characters.","required":true}],"email":[{"type":"string","description":"The affiliate’s email address. Must be a valid email format. Creates or resolves an affiliate Account and a durable program contact for this email. Does not create a merchant User.","required":true}],"tracking_id":[{"type":"string","description":"Custom tracking ID for the affiliate. Must contain only lowercase letters, numbers, and hyphens. Maximum 100 characters. If not provided, a tracking ID will be automatically generated from the affiliate’s name. Must be unique within your team."}],"group_id":[{"type":"string","description":"Optional affiliate group ID."}],"status":[{"type":"string","description":"Partnership status at create time. No follow-up update call is required. Valid values: `pending` , `approved` , `rejected` . Omit to keep the existing auto-approve behavior ( `approved` )."}],"company_name":[{"type":"string","description":"Company name for invoice. Maximum 100 characters."}],"country_code":[{"type":"string","description":"2-letter ISO country code."}],"payout_method":[{"type":"string","description":"Payout method (lowercase with underscores). Valid values: `paypal` , `wise` , `payoneer` , `paxum` , `webmoney` , `skrill` , `wire_transfer` , `bitcoin` , `ethereum` , `alipay` , `wechat` , `manual` , `none` ."}],"payout_details":[{"type":"object","properties":{},"description":"Payout details (fields vary by method, all snake_case). The required fields depend on the `payout_method` : Email-based methods ( `paypal` , `wise` , `payoneer` , `paxum` , `skrill` ): `email` (string, valid email) ID-based methods ( `webmoney` , `alipay` , `wechat` ): `account_id` (string) Crypto methods ( `bitcoin` , `ethereum` ): `address` (string, wallet address) Wire transfer ( `wire_transfer` ): `bank_name` , `account_number` , `swift_code` , `iban` , `routing_number` , `account_name` (all strings) Manual ( `manual` ): No details required"}],"external_user_id":[{"type":"string","description":"Your external user ID for linking referral users to your own user system. Useful for matching affiliates back to users in your application. Maximum 255 characters."}],"metadata":[{"type":"object","properties":{},"description":"Custom key-value data for storing additional information about the affiliate. You can store any JSON-serializable data here (e.g., `{\"plan\": \"pro\", \"signup_source\": \"landing_page\"}` )."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","email":"\u003cstring>","tracking_id":"\u003cstring>","group_id":"\u003cstring>","status":"\u003cstring>","company_name":"\u003cstring>","country_code":"\u003cstring>","payout_method":"\u003cstring>","payout_details":{},"external_user_id":"\u003cstring>","metadata":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"Always `true` for successful responses"}],"data":[{"type":"object","properties":{"id":[{"type":"string","description":"Unique identifier for the affiliate"}],"name":[{"type":"string","description":"The affiliate’s display name"}],"email":[{"type":"string","description":"The affiliate’s email address"}],"tracking_id":[{"type":"string","description":"Unique tracking ID for the affiliate. If a custom `tracking_id` was provided in the request, it will be used. Otherwise, it’s automatically generated from the name (with a random suffix if needed for uniqueness)."}],"source":[{"type":"string","description":"Source of the affiliate creation, always `\"api\"` for API-created affiliates"}],"partnership_status":[{"type":"string","description":"Partnership status with the program. Uppercase: `\"PENDING\"` , `\"APPROVED\"` , `\"REJECTED\"` , or `null` . Matches the `status` you sent. Defaults to `\"APPROVED\"` when `status` is omitted."}],"onboarding_completed":[{"type":"boolean","description":"Whether the affiliate has completed their onboarding process. Always `false` for newly created affiliates."}],"group_id":[{"type":"object","properties":{},"description":"The affiliate group ID if assigned, otherwise `null`"}],"external_user_id":[{"type":"object","properties":{},"description":"Your external user ID if provided, otherwise `null`"}],"metadata":[{"type":"object","properties":{},"description":"Custom key-value data if provided, otherwise `null`"}],"created_at":[{"type":"string","description":"ISO 8601 timestamp of when the affiliate was created"}]},"description":"The created affiliate object."}]}}],"examples":{"example":{"value":{"success":true,"data":{"id":"\u003cstring>","name":"\u003cstring>","email":"\u003cstring>","tracking_id":"\u003cstring>","source":"\u003cstring>","partnership_status":"\u003cstring>","onboarding_completed":true,"group_id":{},"external_user_id":{},"metadata":{},"created_at":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"affonso-20c7dee8","siteName":"Affonso Docs","title":"Create Affiliate - Affonso Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-29T20:05:36.436Z","originalFileLocation":"api/endpoint/affiliates/create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a new affiliate Account and program contact\">\u003cmeta data-mint-head name=\"application-name\" content=\"Affonso Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Affiliate - Affonso Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new affiliate Account and program contact\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Affonso Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.affonso.io/api/endpoint/affiliates/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://affonso-20c7dee8.mintlify.site/_mintlify/api/og/v2?division=Affiliates\u0026amp;title=Create+Affiliate\u0026amp;description=Create+a+new+affiliate+Account+and+program+contact\u0026amp;theme=bbdaa51877c05a503c14f1e9\u0026amp;signature=1bc0a128d03f7973a51961867b5e2877a443beef40f5100b230366f09b135b00\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Affiliate - Affonso Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new affiliate Account and program contact\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://affonso-20c7dee8.mintlify.site/_mintlify/api/og/v2?division=Affiliates\u0026amp;title=Create+Affiliate\u0026amp;description=Create+a+new+affiliate+Account+and+program+contact\u0026amp;theme=bbdaa51877c05a503c14f1e9\u0026amp;signature=1bc0a128d03f7973a51961867b5e2877a443beef40f5100b230366f09b135b00\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/affonso-20c7dee8/o8Zy3ftrGGF8u7vC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Affonso Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#881337\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.affonso.io/api/endpoint/affiliates/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/endpoint/affiliates/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.affonso.io/#organization\",\"name\":\"Affonso Docs\",\"url\":\"https://docs.affonso.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/affonso-20c7dee8/nWO6r2CUpJ-o-z8l/logo/affonso_logo_small.png?fit=max\u0026auto=format\u0026n=nWO6r2CUpJ-o-z8l\u0026q=85\u0026s=4b239574262c42f95697481e8b29adce\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.affonso.io#website\",\"name\":\"Affonso Docs\",\"url\":\"https://docs.affonso.io\",\"publisher\":{\"@id\":\"https://docs.affonso.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.affonso.io/api/endpoint/affiliates/create#webpage\",\"url\":\"https://docs.affonso.io/api/endpoint/affiliates/create\",\"name\":\"Create Affiliate\",\"description\":\"Create a new affiliate Account and program contact\",\"dateModified\":\"2026-09-29T20:05:36.436Z\",\"isPartOf\":{\"@id\":\"https://docs.affonso.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.affonso.io/api/endpoint/affiliates/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.affonso.io/api/endpoint/affiliates/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Core Resources\",\"item\":\"https://docs.affonso.io/api/endpoint/clicks/create\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Affiliates\",\"item\":\"https://docs.affonso.io/api/endpoint/affiliates/list\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create Affiliate\",\"item\":\"https://docs.affonso.io/api/endpoint/affiliates/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.affonso.io/api/endpoint/affiliates/create#apireference\",\"headline\":\"Create Affiliate\",\"name\":\"Create Affiliate\",\"description\":\"Create a new affiliate Account and program contact\",\"url\":\"https://docs.affonso.io/api/endpoint/affiliates/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.affonso.io/api/endpoint/affiliates/create#webpage\"},\"dateModified\":\"2026-09-29T20:05:36.436Z\",\"publisher\":{\"@id\":\"https://docs.affonso.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.affonso.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Affonso Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Affonso Docs","nav":{"global":{"anchors":[{"anchor":"Home","icon":"home","href":"https://affonso.io"},{"anchor":"Blog","icon":"newspaper","href":"https://affonso.io/blog"},{"anchor":"Help Center","icon":"book-open-cover","href":"https://affonso.io/help"}]},"tabs":[{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"API Introduction","href":"/api/introduction"},{"title":"Authentication","href":"/api/authentication"},{"title":"Rate Limits","href":"/api/rate-limits"},{"title":"TypeScript SDK","href":"/api/sdk/typescript"}]},{"group":"Guide","pages":[{"title":"Track With Tracking Pixel","href":"/api/with-tracking-pixel"},{"title":"Track Without Tracking Pixel","href":"/api/without-tracking-pixel"},{"title":"Proxy Setup (Optional)","href":"/api/proxy-setup"},{"title":"Server-Side Tracking","href":"/api/server-side-tracking"},{"title":"Embedded Referral Dashboard","href":"/api/embedded-dashboard"},{"title":"Segment Track Events","href":"/api/segment-track-events"}]},{"group":"Core Resources","pages":[{"group":"Clicks","pages":[{"title":"Track Click","api":"POST https://api.affonso.io/v1/clicks","href":"/api/endpoint/clicks/create"}]},{"group":"Signups","pages":[{"title":"Record Lead Signup","api":"POST /v1/signups","href":"/api/endpoint/signups/create"}]},{"group":"Conversions","pages":[{"title":"Create Conversion","api":"POST https://api.affonso.io/v1/conversions","href":"/api/endpoint/conversions/create"},{"title":"Refund Conversion","api":"POST https://api.affonso.io/v1/conversions/{id}/refund","href":"/api/endpoint/conversions/refund"}]},{"group":"Events","pages":[{"title":"Create Event","api":"POST https://api.affonso.io/v1/events","href":"/api/endpoint/events/create"}]},{"group":"Affiliates","pages":[{"title":"List Affiliates","api":"GET https://api.affonso.io/v1/affiliates","href":"/api/endpoint/affiliates/list"},{"title":"Get Affiliate","api":"GET https://api.affonso.io/v1/affiliates/{id}","href":"/api/endpoint/affiliates/get"},{"title":"Get Affiliate Analytics","api":"GET https://api.affonso.io/v1/affiliates/{id}/analytics","description":"Retrieve performance analytics for a single affiliate","href":"/api/endpoint/affiliates/analytics"},{"title":"Create Affiliate","api":"POST https://api.affonso.io/v1/affiliates","href":"/api/endpoint/affiliates/create"},{"title":"Update Affiliate","api":"PUT https://api.affonso.io/v1/affiliates/{id}","description":"Update an existing affiliate","href":"/api/endpoint/affiliates/update"},{"title":"Delete Affiliate","api":"DELETE https://api.affonso.io/v1/affiliates/{id}","href":"/api/endpoint/affiliates/delete"},{"title":"Generate Portal Login Token","api":"POST https://api.affonso.io/v1/affiliates/{id}/portal-token","href":"/api/endpoint/affiliates/portal-token"}]},{"group":"Fraud Events","pages":[{"title":"List Fraud Events","api":"GET https://api.affonso.io/v1/fraud-events","href":"/api/endpoint/fraud-events/list"},{"title":"Confirm Fraud Events","api":"POST https://api.affonso.io/v1/fraud-events/confirm","href":"/api/endpoint/fraud-events/confirm"},{"title":"Resolve Fraud Events","api":"POST https://api.affonso.io/v1/fraud-events/resolve","href":"/api/endpoint/fraud-events/resolve"}]},{"group":"Referrals","pages":[{"title":"List Referrals","api":"GET https://api.affonso.io/v1/referrals","href":"/api/endpoint/referrals/list"},{"title":"Get Referral","api":"GET https://api.affonso.io/v1/referrals/{id}","href":"/api/endpoint/referrals/get"},{"title":"Create Referral","api":"POST https://api.affonso.io/v1/referrals","href":"/api/endpoint/referrals/create"},{"title":"Update Referral","api":"PUT https://api.affonso.io/v1/referrals/{id}","href":"/api/endpoint/referrals/update"},{"title":"Delete Referral","api":"DELETE https://api.affonso.io/v1/referrals/{id}","href":"/api/endpoint/referrals/delete"}]},{"group":"Commissions","pages":[{"title":"List Commissions","api":"GET https://api.affonso.io/v1/commissions","href":"/api/endpoint/commissions/list"},{"title":"Get Commission","api":"GET https://api.affonso.io/v1/commissions/{id}","href":"/api/endpoint/commissions/get"},{"title":"Create Commission","api":"POST https://api.affonso.io/v1/commissions","href":"/api/endpoint/commissions/create"},{"title":"Create Bonus","api":"POST https://api.affonso.io/v1/commissions/bonus","href":"/api/endpoint/commissions/bonus"},{"title":"Update Commission","api":"PUT https://api.affonso.io/v1/commissions/{id}","href":"/api/endpoint/commissions/update"},{"title":"Delete Commission","api":"DELETE https://api.affonso.io/v1/commissions/{id}","href":"/api/endpoint/commissions/delete"}]},{"group":"Payouts","pages":[{"title":"List Payouts","api":"GET https://api.affonso.io/v1/payouts","href":"/api/endpoint/payouts/list"},{"title":"Get Payout","api":"GET https://api.affonso.io/v1/payouts/{id}","href":"/api/endpoint/payouts/get"},{"title":"Update Payout","api":"PUT https://api.affonso.io/v1/payouts/{id}","href":"/api/endpoint/payouts/update"}]},{"group":"Coupons","pages":[{"title":"List Coupons","api":"GET https://api.affonso.io/v1/coupons","href":"/api/endpoint/coupons/list"},{"title":"Get Coupon","api":"GET https://api.affonso.io/v1/coupons/{id}","href":"/api/endpoint/coupons/get"},{"title":"Create Coupon","api":"POST https://api.affonso.io/v1/coupons","href":"/api/endpoint/coupons/create"},{"title":"Delete Coupon","api":"DELETE https://api.affonso.io/v1/coupons/{id}","href":"/api/endpoint/coupons/delete"}]},{"group":"Embed","pages":[{"title":"Create Embed Token","api":"POST https://api.affonso.io/v1/embed/token","href":"/api/endpoint/embed/create-token"},{"title":"Get Embed Data","api":"GET https://api.affonso.io/v1/embed/data","href":"/api/endpoint/embed/get-data"},{"title":"Create Self-Service Coupon","api":"POST https://api.affonso.io/v1/embed/coupon","href":"/api/endpoint/embed/create-coupon"}]},{"group":"Affiliate Finder","pages":[{"title":"Start Finder Search","api":"POST https://api.affonso.io/v1/finder/searches","href":"/api/endpoint/finder/start-search"},{"title":"List Finder Searches","api":"GET https://api.affonso.io/v1/finder/searches","href":"/api/endpoint/finder/list-searches"},{"title":"List Finder Results","api":"GET https://api.affonso.io/v1/finder/searches/{id}/results","href":"/api/endpoint/finder/list-results"},{"title":"List Finder Shortlist","api":"GET https://api.affonso.io/v1/finder/shortlist","href":"/api/endpoint/finder/list-shortlist"},{"title":"Add Finder Result to Shortlist","api":"POST https://api.affonso.io/v1/finder/shortlist","href":"/api/endpoint/finder/add-shortlist"},{"title":"Update Finder Shortlist Item","api":"PATCH https://api.affonso.io/v1/finder/shortlist/{id}","href":"/api/endpoint/finder/update-shortlist"},{"title":"Delete Finder Shortlist Item","api":"DELETE https://api.affonso.io/v1/finder/shortlist/{id}","href":"/api/endpoint/finder/delete-shortlist"}]}]},{"group":"Program Management","pages":[{"group":"Program Settings","pages":[{"group":"Info","pages":[{"title":"Get Program Info","api":"GET https://api.affonso.io/v1/program","href":"/api/endpoint/program/get-info"},{"title":"Update Program Info","api":"PATCH https://api.affonso.io/v1/program","href":"/api/endpoint/program/update-info"}]},{"group":"Brand Profile","pages":[{"title":"Get Brand Profile","api":"GET https://api.affonso.io/v1/program/brand","href":"/api/endpoint/program/get-brand-profile"},{"title":"Update Brand Profile","api":"PATCH https://api.affonso.io/v1/program/brand","href":"/api/endpoint/program/update-brand-profile"}]},{"group":"Payment Terms","pages":[{"title":"Get Payment Terms","api":"GET https://api.affonso.io/v1/program/payment-terms","href":"/api/endpoint/program/get-payment-terms"},{"title":"Update Payment Terms","api":"PATCH https://api.affonso.io/v1/program/payment-terms","href":"/api/endpoint/program/update-payment-terms"}]},{"group":"Tracking","pages":[{"title":"Get Tracking Settings","api":"GET https://api.affonso.io/v1/program/tracking","href":"/api/endpoint/program/get-tracking"},{"title":"Update Tracking Settings","api":"PATCH https://api.affonso.io/v1/program/tracking","href":"/api/endpoint/program/update-tracking"}]},{"group":"Restrictions","pages":[{"title":"Get Restrictions","api":"GET https://api.affonso.io/v1/program/restrictions","href":"/api/endpoint/program/get-restrictions"},{"title":"Update Restrictions","api":"PATCH https://api.affonso.io/v1/program/restrictions","href":"/api/endpoint/program/update-restrictions"}]},{"group":"Portal","pages":[{"title":"Get Portal Settings","api":"GET https://api.affonso.io/v1/program/portal","href":"/api/endpoint/program/get-portal"},{"title":"Update Portal Settings","api":"PATCH https://api.affonso.io/v1/program/portal","href":"/api/endpoint/program/update-portal"}]},{"group":"Fraud Rules","pages":[{"title":"Get Fraud Rules","api":"GET https://api.affonso.io/v1/program/fraud-rules","href":"/api/endpoint/program/get-fraud-rules"},{"title":"Update Fraud Rules","api":"PATCH https://api.affonso.io/v1/program/fraud-rules","href":"/api/endpoint/program/update-fraud-rules"}]},{"group":"Notifications","pages":[{"title":"List Notification Settings","api":"GET https://api.affonso.io/v1/program/notifications","href":"/api/endpoint/program/list-notifications"},{"title":"Update Notification Setting","api":"PATCH https://api.affonso.io/v1/program/notifications/{emailTypeId}","href":"/api/endpoint/program/update-notification"}]},{"group":"Affiliate Groups","pages":[{"title":"List Groups","api":"GET https://api.affonso.io/v1/program/groups","href":"/api/endpoint/program/list-groups"},{"title":"Get Group","api":"GET https://api.affonso.io/v1/program/groups/{id}","href":"/api/endpoint/program/get-group"},{"title":"Create Group","api":"POST https://api.affonso.io/v1/program/groups","href":"/api/endpoint/program/create-group"},{"title":"Update Group","api":"PATCH https://api.affonso.io/v1/program/groups/{id}","href":"/api/endpoint/program/update-group"},{"title":"Delete Group","api":"DELETE https://api.affonso.io/v1/program/groups/{id}","href":"/api/endpoint/program/delete-group"}]},{"group":"Promotion URLs","pages":[{"title":"List Promotion URLs","api":"GET https://api.affonso.io/v1/program/promotion-urls","href":"/api/endpoint/program/list-promotion-urls"},{"title":"Create Promotion URL","api":"POST https://api.affonso.io/v1/program/promotion-urls","href":"/api/endpoint/program/create-promotion-url"},{"title":"Get Promotion URL","api":"GET https://api.affonso.io/v1/program/promotion-urls/{id}","href":"/api/endpoint/program/get-promotion-url"},{"title":"Update Promotion URL","api":"PATCH https://api.affonso.io/v1/program/promotion-urls/{id}","href":"/api/endpoint/program/update-promotion-url"},{"title":"Delete Promotion URL","api":"DELETE https://api.affonso.io/v1/program/promotion-urls/{id}","href":"/api/endpoint/program/delete-promotion-url"},{"title":"Set Program Default Promotion URL","api":"PUT https://api.affonso.io/v1/program/promotion-urls/default","href":"/api/endpoint/program/set-promotion-url-default"},{"title":"Set Group Default Promotion URL","api":"PUT https://api.affonso.io/v1/program/groups/{groupId}/promotion-url-default","href":"/api/endpoint/program/set-group-promotion-url-default"}]},{"group":"Creatives","pages":[{"title":"List Creatives","api":"GET https://api.affonso.io/v1/program/creatives","href":"/api/endpoint/program/list-creatives"},{"title":"Get Creative","api":"GET https://api.affonso.io/v1/program/creatives/{id}","href":"/api/endpoint/program/get-creative"},{"title":"Create Creative","api":"POST https://api.affonso.io/v1/program/creatives","href":"/api/endpoint/program/create-creative"},{"title":"Update Creative","api":"PATCH https://api.affonso.io/v1/program/creatives/{id}","href":"/api/endpoint/program/update-creative"},{"title":"Delete Creative","api":"DELETE https://api.affonso.io/v1/program/creatives/{id}","href":"/api/endpoint/program/delete-creative"}]}]},{"group":"Campaigns","pages":[{"title":"List Campaigns","api":"GET https://api.affonso.io/v1/program/campaigns","href":"/api/endpoint/campaigns/list"},{"title":"Get Campaign","api":"GET https://api.affonso.io/v1/program/campaigns/{id}","href":"/api/endpoint/campaigns/get"},{"title":"Create Campaign","api":"POST https://api.affonso.io/v1/program/campaigns","href":"/api/endpoint/campaigns/create"},{"title":"Update Campaign","api":"PATCH https://api.affonso.io/v1/program/campaigns/{id}","href":"/api/endpoint/campaigns/update"},{"title":"List Campaign Applications","api":"GET https://api.affonso.io/v1/program/campaigns/{id}/applications","href":"/api/endpoint/campaigns/list-applications"},{"title":"Apply to Campaign","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/applications","href":"/api/endpoint/campaigns/apply"},{"title":"Accept Campaign Application","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/applications/{applicationId}/accept","href":"/api/endpoint/campaigns/accept-application"},{"title":"Reject Campaign Application","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/applications/{applicationId}/reject","href":"/api/endpoint/campaigns/reject-application"},{"title":"Approve Campaign Submission","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/submissions/{submissionId}/approve","href":"/api/endpoint/campaigns/approve-submission"},{"title":"Update Retainer Condition","api":"PATCH https://api.affonso.io/v1/program/campaigns/{id}/applications/{applicationId}/condition","href":"/api/endpoint/campaigns/update-retainer-condition"},{"title":"End Partner Retainer","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/applications/{applicationId}/end-retainer","href":"/api/endpoint/campaigns/end-retainer"},{"title":"Resume Partner Retainer","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/applications/{applicationId}/resume-retainer","href":"/api/endpoint/campaigns/resume-retainer"},{"title":"List Retainer Periods","api":"GET https://api.affonso.io/v1/program/campaigns/{id}/retainer-periods","href":"/api/endpoint/campaigns/list-retainer-periods"},{"title":"Approve Retainer Period","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/retainer-periods/{periodId}/approve","href":"/api/endpoint/campaigns/approve-retainer-period"},{"title":"Reject Retainer Period","api":"POST https://api.affonso.io/v1/program/campaigns/{id}/retainer-periods/{periodId}/reject","href":"/api/endpoint/campaigns/reject-retainer-period"}]},{"group":"Affiliate Onboarding","pages":[{"title":"Get Onboarding Form","api":"GET https://api.affonso.io/v1/onboarding-form","href":"/api/endpoint/onboarding/get-form"},{"title":"Create Onboarding Form","api":"POST https://api.affonso.io/v1/onboarding-form","href":"/api/endpoint/onboarding/create-form"},{"title":"Update Onboarding Form","api":"PATCH https://api.affonso.io/v1/onboarding-form","href":"/api/endpoint/onboarding/update-form"},{"title":"Delete Onboarding Form","api":"DELETE https://api.affonso.io/v1/onboarding-form","href":"/api/endpoint/onboarding/delete-form"},{"title":"Get Affiliate Onboarding Responses","api":"GET https://api.affonso.io/v1/affiliates/{id}/onboarding-responses","href":"/api/endpoint/onboarding/get-responses"},{"title":"Submit Onboarding Responses","api":"POST https://api.affonso.io/v1/affiliates/{id}/onboarding-responses","href":"/api/endpoint/onboarding/submit-responses"}]}]},{"group":"Marketplace","pages":[{"title":"List Marketplace Programs","api":"GET https://api.affonso.io/v1/marketplace","href":"/api/endpoint/marketplace/list"},{"title":"Get Marketplace Program","api":"GET https://api.affonso.io/v1/marketplace/{id}","href":"/api/endpoint/marketplace/get"},{"title":"List Marketplace Campaigns","api":"GET https://api.affonso.io/v1/marketplace/campaigns","href":"/api/endpoint/marketplace/list-campaigns"},{"title":"Get Marketplace Campaign","api":"GET https://api.affonso.io/v1/marketplace/campaigns/{id}","href":"/api/endpoint/marketplace/get-campaign"}]}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/introduction"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/introduction"}]},{"tab":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks/introduction"}]}]},"basePath":"","title":"Create Affiliate - Affonso Docs","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js"]}