Optional. Use this header only when the authenticated user belongs to multiple organizations. It identifies the organization to target for this action.
Array of customer objects. The required fields within these objects change based on your campaign focus.
Identifier RequirementDepending on your campaign type, you must provide either a loan_id (for Debt Collection) or a lead_id (for Lead Generation). Requests missing both will return a 400 Bad Request.
Debt Collection
Lead Generation
Use this structure if you are managing existing loans.
Validation error - required campaign fields are missing or invalid
401
Unauthorized - missing or invalid authorization header
403
Forbidden - insufficient permission to perform this action
404
The provided workflowId is invalid
500
Internal server error
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"timepay.ai","colors":{"primary":"#6D28D9","light":"#A074E7","dark":"#6D28D9"},"logo":{"light":"https://mintcdn.com/timepayai-b31ccf4d/J5_kVcxKVFreOF4q/logo/light.png?fit=max\u0026auto=format\u0026n=J5_kVcxKVFreOF4q\u0026q=85\u0026s=516b7c84a005aca528ac0345fa47137a","dark":"https://mintcdn.com/timepayai-b31ccf4d/J5_kVcxKVFreOF4q/logo/dark.png?fit=max\u0026auto=format\u0026n=J5_kVcxKVFreOF4q\u0026q=85\u0026s=983e74529cfea82de5ac1e6ebacef3cc"},"favicon":"https://mintcdn.com/timepayai-b31ccf4d/J5_kVcxKVFreOF4q/favicon.png?fit=max\u0026auto=format\u0026n=J5_kVcxKVFreOF4q\u0026q=85\u0026s=24ec1a1ca871a417cdf0a1c91738742e","api":{"playground":{"display":"none"}},"navbar":{"links":[{"href":"mailto:support@timepay.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://console.timepay.ai"}},"footer":{"socials":{"linkedin":"https://in.linkedin.com/company/timepay-ai"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"timepayai-b31ccf4d","hasAudioNarration":false,"actualSubdomain":"timepayai-b31ccf4d","customDomains":["agents.docs.timepay.ai"],"gitSource":{"type":"github","owner":"sphatate","repo":"dev-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ac9ef833288cf04bf52665b","collectionId":"86e3c485-3871-4bc1-8a40-2a4417cd1bf4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac9ef833288cf04bf52665b"},"entitlements":{},"buildId":"6ac9ef833288cf04bf52665b","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"API Reference","count":41},{"language":"default","tag":"API Documentation","count":41},{"language":"default","tag":"Dispositions Management","count":12},{"language":"default","tag":"Dispositions Group","count":7},{"language":"default","tag":"Agents","count":6},{"language":"default","tag":"Customers","count":6},{"language":"default","tag":"Campaigns","count":5},{"language":"default","tag":"Dispositions","count":5},{"language":"default","tag":"Workflows","count":4},{"language":"default","tag":"MCP Server","count":3}]},"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":"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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/agents/campaigns/create-campaign","slug":"/api-reference/agents/campaigns/create-campaign","pageMetadata":{"title":"Create Campaign","api":"POST https://api.agents.timepay.ai/api/v1/campaigns/create","description":"Create a new campaign with configuration and customer records.","href":"/api-reference/agents/campaigns/create-campaign"},"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 campaign with configuration and customer records.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Tab,Table,Tabs}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Bearer token for authentication (e.g., `,_jsx(_components.code,{children:`Bearer \u003cyour_token>`}),`).`]})}),`\n`,_jsx(ParamField,{header:`X-ORG-ID`,type:`string`,id:`param-x-org-id`,children:_jsx(_components.p,{children:`Optional. Use this header only when the authenticated user belongs to multiple organizations. It identifies the organization to target for this action.`})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The name of the campaign.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,required:true,id:`param-description`,children:_jsx(_components.p,{children:`A brief description of the campaign’s purpose.`})}),`\n`,_jsxs(ParamField,{body:`campaignType`,type:`string`,required:true,id:`param-campaign-type`,children:[_jsxs(_components.p,{children:[`The type of campaign (e.g., `,_jsx(_components.code,{children:`emi`}),`, `,_jsx(_components.code,{children:`edi`}),`, `,_jsx(_components.code,{children:`lead`}),`).`]}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`emi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`edi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`lead`})}),`\n`]})})]}),`\n`,_jsx(ParamField,{body:`workflowId`,type:`string`,id:`param-workflow-id`,children:_jsx(_components.p,{children:`The ID of the workflow to associate with this campaign.`})}),`\n`,_jsx(ParamField,{body:`startDate`,type:`string`,required:true,id:`param-start-date`,children:_jsxs(_components.p,{children:[`Start date in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format.`]})}),`\n`,_jsx(ParamField,{body:`startTime`,type:`string`,required:true,id:`param-start-time`,children:_jsxs(_components.p,{children:[`Start time in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`HH:MM`}),` 24-hour format.`]})}),`\n`,_jsx(ParamField,{body:`endDate`,type:`string`,required:true,id:`param-end-date`,children:_jsxs(_components.p,{children:[`End date in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format.`]})}),`\n`,_jsx(ParamField,{body:`endTime`,type:`string`,required:true,id:`param-end-time`,children:_jsxs(_components.p,{children:[`End time in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`HH:MM`}),` 24-hour format.`]})}),`\n`,_jsxs(ParamField,{body:`languages`,type:`string[]`,required:true,placeholder:`e.g. \"hindi\"`,id:`param-languages`,children:[_jsxs(_components.p,{children:[`List of languages supported in this campaign (e.g., `,_jsx(_components.code,{children:`[\"english\", \"hindi\"]`}),`).`]}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`hindi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`english`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`bengali`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`telugu`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`marathi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`tamil`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gujarati`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`kannada`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`malayalam`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`punjabi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`odia`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`assamese`})}),`\n`]})})]}),`\n`,_jsxs(ParamField,{body:`region`,type:`string`,required:true,id:`param-region`,children:[_jsxs(_components.p,{children:[`Target region for the campaign (e.g., `,_jsx(_components.code,{children:`north`}),`).`]}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`north`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`south`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`east`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`west`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`central`})}),`\n`]})})]}),`\n`,_jsx(ParamField,{body:`tags`,type:`string[]`,id:`param-tags`,children:_jsxs(_components.p,{children:[`Tags for categorization (e.g., `,_jsx(_components.code,{children:`[\"priority\", \"q1\"]`}),`).`]})}),`\n`,_jsxs(ParamField,{body:`jsonData`,type:`array`,required:true,id:`param-json-data`,children:[_jsx(_components.p,{children:`Array of customer objects. The required fields within these objects change based on your campaign focus.`}),_jsxs(Note,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Identifier Requirement`})}),_jsxs(_components.p,{children:[`Depending on your campaign type, you must provide either a `,_jsx(_components.code,{children:`loan_id`}),` (for Debt Collection) or a `,_jsx(_components.code,{children:`lead_id`}),` (for Lead Generation). Requests missing both will return a 400 Bad Request.`]})]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Debt Collection`,id:`debt-collection`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use this structure if you are managing existing loans.`})}),_jsxs(Expandable,{title:`item properties`,children:[_jsx(ParamField,{body:`loan_id`,type:`string`,required:true,id:`param-loan-id`,children:`Unique identifier for the loan record.`}),_jsx(ParamField,{body:`first_name`,type:`string`,required:true,id:`param-first-name`,children:`Customer’s first name as registered in the system.`}),_jsx(ParamField,{body:`last_name`,type:`string`,required:true,id:`param-last-name`,children:`Customer’s last name as registered in the system.`}),_jsx(ParamField,{body:`phone_number`,type:`string`,required:true,id:`param-phone-number`,children:`Customer’s primary contact number for payment reminders and notifications.`}),_jsx(ParamField,{body:`loan_amount`,type:`number`,required:true,id:`param-loan-amount`,children:`Total principal amount of the loan in the account currency.`}),_jsx(ParamField,{body:`emi_amount`,type:`number`,required:true,id:`param-emi-amount`,children:`Equated Monthly Installment (EMI) amount due for the current billing cycle.`}),_jsx(ParamField,{body:`loan_period`,type:`number`,required:true,id:`param-loan-period`,children:`Total loan tenure expressed as the number of monthly installments.`}),_jsx(ParamField,{body:`current_emi`,type:`number`,required:true,id:`param-current-emi`,children:`The current installment number in the repayment schedule (e.g., 5 of 12).`}),_jsxs(ParamField,{body:`emi_due_date`,type:`string`,required:true,id:`param-emi-due-date`,children:[`Due date for the current EMI payment. Format: `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]}),_jsxs(ParamField,{body:`payment_status`,type:`string`,required:true,id:`param-payment-status`,children:[_jsx(_components.p,{children:`Current status of the customer’s EMI payment.`}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`bounced`}),` — Payment was attempted but failed (e.g., insufficient funds).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`pending`}),` — Payment is due but not yet initiated.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`partial`}),` — Customer has made a partial payment.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`paid`}),` — Payment has been completed by the customer.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`received`}),` — Payment has been completed by the customer.`]}),`\n`]})})]}),_jsxs(ParamField,{body:`language`,type:`string`,id:`param-language`,children:[`Preferred language for the AI agent to use during the customer conversation (e.g., `,_jsx(_components.code,{children:`english`}),`, `,_jsx(_components.code,{children:`hindi`}),`, `,_jsx(_components.code,{children:`tamil`}),`).`]})]})]}),_jsxs(Tab,{title:`Lead Generation`,id:`lead-generation`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use this structure for new sales or lead acquisition.`})}),_jsxs(Expandable,{title:`item properties`,children:[_jsx(ParamField,{body:`lead_id`,type:`string`,id:`param-lead-id`,children:`Unique identifier for the lead record.`}),_jsx(ParamField,{body:`first_name`,type:`string`,required:true,id:`param-first-name-1`,children:`Customer’s first name as registered in the system.`}),_jsx(ParamField,{body:`last_name`,type:`string`,required:true,id:`param-last-name-1`,children:`Customer’s last name as registered in the system.`}),_jsx(ParamField,{body:`phone_number`,type:`string`,required:true,id:`param-phone-number-1`,children:`Customer’s primary contact number for outreach and follow-ups.`}),_jsxs(ParamField,{body:`lead_date`,type:`string`,required:true,id:`param-lead-date`,children:[`Date the lead was created or captured. Format: `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]}),_jsxs(ParamField,{body:`language`,type:`string`,id:`param-language-1`,children:[`Preferred language for the AI agent to use during the customer conversation (e.g., `,_jsx(_components.code,{children:`english`}),`, `,_jsx(_components.code,{children:`hindi`}),`, `,_jsx(_components.code,{children:`tamil`}),`).`]})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Indicates if the creation was successful.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`A confirmation message.`})}),`\n`,_jsx(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`The unique ID of the newly created campaign.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The name the newly created campaign.`})})]})}),`\n`,_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsx(_components.p,{children:`The error type or code (Error responses only).`})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:`Validation error - required campaign fields are missing or invalid`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Unauthorized - missing or invalid authorization header`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`Forbidden - insufficient permission to perform this action`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsxs(_components.td,{children:[`The provided `,_jsx(_components.code,{children:`workflowId`}),` is invalid`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:`Internal server error`})]})]})]})]})}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 Campaign","api":"POST https://api.agents.timepay.ai/api/v1/campaigns/create","description":"Create a new campaign with configuration and customer records.","href":"/api-reference/agents/campaigns/create-campaign"}}},"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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseExample,ResponseField,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Bearer token for authentication (e.g., `,_jsx(_components.code,{children:`Bearer \u003cyour_token>`}),`).`]})}),`\n`,_jsx(ParamField,{header:`X-ORG-ID`,type:`string`,id:`param-x-org-id`,children:_jsx(_components.p,{children:`Optional. Use this header only when the authenticated user belongs to multiple organizations. It identifies the organization to target for this action.`})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The name of the campaign.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,required:true,id:`param-description`,children:_jsx(_components.p,{children:`A brief description of the campaign’s purpose.`})}),`\n`,_jsxs(ParamField,{body:`campaignType`,type:`string`,required:true,id:`param-campaign-type`,children:[_jsxs(_components.p,{children:[`The type of campaign (e.g., `,_jsx(_components.code,{children:`emi`}),`, `,_jsx(_components.code,{children:`edi`}),`, `,_jsx(_components.code,{children:`lead`}),`).`]}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`emi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`edi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`lead`})}),`\n`]})})]}),`\n`,_jsx(ParamField,{body:`workflowId`,type:`string`,id:`param-workflow-id`,children:_jsx(_components.p,{children:`The ID of the workflow to associate with this campaign.`})}),`\n`,_jsx(ParamField,{body:`startDate`,type:`string`,required:true,id:`param-start-date`,children:_jsxs(_components.p,{children:[`Start date in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format.`]})}),`\n`,_jsx(ParamField,{body:`startTime`,type:`string`,required:true,id:`param-start-time`,children:_jsxs(_components.p,{children:[`Start time in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`HH:MM`}),` 24-hour format.`]})}),`\n`,_jsx(ParamField,{body:`endDate`,type:`string`,required:true,id:`param-end-date`,children:_jsxs(_components.p,{children:[`End date in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format.`]})}),`\n`,_jsx(ParamField,{body:`endTime`,type:`string`,required:true,id:`param-end-time`,children:_jsxs(_components.p,{children:[`End time in IST (`,_jsx(_components.code,{children:`UTC+05:30`}),`) using `,_jsx(_components.code,{children:`HH:MM`}),` 24-hour format.`]})}),`\n`,_jsxs(ParamField,{body:`languages`,type:`string[]`,required:true,placeholder:`e.g. \"hindi\"`,id:`param-languages`,children:[_jsxs(_components.p,{children:[`List of languages supported in this campaign (e.g., `,_jsx(_components.code,{children:`[\"english\", \"hindi\"]`}),`).`]}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`hindi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`english`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`bengali`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`telugu`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`marathi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`tamil`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gujarati`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`kannada`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`malayalam`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`punjabi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`odia`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`assamese`})}),`\n`]})})]}),`\n`,_jsxs(ParamField,{body:`region`,type:`string`,required:true,id:`param-region`,children:[_jsxs(_components.p,{children:[`Target region for the campaign (e.g., `,_jsx(_components.code,{children:`north`}),`).`]}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`north`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`south`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`east`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`west`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`central`})}),`\n`]})})]}),`\n`,_jsx(ParamField,{body:`tags`,type:`string[]`,id:`param-tags`,children:_jsxs(_components.p,{children:[`Tags for categorization (e.g., `,_jsx(_components.code,{children:`[\"priority\", \"q1\"]`}),`).`]})}),`\n`,_jsxs(ParamField,{body:`jsonData`,type:`array`,required:true,id:`param-json-data`,children:[_jsx(_components.p,{children:`Array of customer objects. The required fields within these objects change based on your campaign focus.`}),_jsxs(Note,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Identifier Requirement`})}),_jsxs(_components.p,{children:[`Depending on your campaign type, you must provide either a `,_jsx(_components.code,{children:`loan_id`}),` (for Debt Collection) or a `,_jsx(_components.code,{children:`lead_id`}),` (for Lead Generation). Requests missing both will return a 400 Bad Request.`]})]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Debt Collection`,id:`debt-collection`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use this structure if you are managing existing loans.`})}),_jsxs(Expandable,{title:`item properties`,children:[_jsx(ParamField,{body:`loan_id`,type:`string`,required:true,id:`param-loan-id`,children:`Unique identifier for the loan record.`}),_jsx(ParamField,{body:`first_name`,type:`string`,required:true,id:`param-first-name`,children:`Customer’s first name as registered in the system.`}),_jsx(ParamField,{body:`last_name`,type:`string`,required:true,id:`param-last-name`,children:`Customer’s last name as registered in the system.`}),_jsx(ParamField,{body:`phone_number`,type:`string`,required:true,id:`param-phone-number`,children:`Customer’s primary contact number for payment reminders and notifications.`}),_jsx(ParamField,{body:`loan_amount`,type:`number`,required:true,id:`param-loan-amount`,children:`Total principal amount of the loan in the account currency.`}),_jsx(ParamField,{body:`emi_amount`,type:`number`,required:true,id:`param-emi-amount`,children:`Equated Monthly Installment (EMI) amount due for the current billing cycle.`}),_jsx(ParamField,{body:`loan_period`,type:`number`,required:true,id:`param-loan-period`,children:`Total loan tenure expressed as the number of monthly installments.`}),_jsx(ParamField,{body:`current_emi`,type:`number`,required:true,id:`param-current-emi`,children:`The current installment number in the repayment schedule (e.g., 5 of 12).`}),_jsxs(ParamField,{body:`emi_due_date`,type:`string`,required:true,id:`param-emi-due-date`,children:[`Due date for the current EMI payment. Format: `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]}),_jsxs(ParamField,{body:`payment_status`,type:`string`,required:true,id:`param-payment-status`,children:[_jsx(_components.p,{children:`Current status of the customer’s EMI payment.`}),_jsx(Expandable,{title:`options`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`bounced`}),` — Payment was attempted but failed (e.g., insufficient funds).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`pending`}),` — Payment is due but not yet initiated.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`partial`}),` — Customer has made a partial payment.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`paid`}),` — Payment has been completed by the customer.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`received`}),` — Payment has been completed by the customer.`]}),`\n`]})})]}),_jsxs(ParamField,{body:`language`,type:`string`,id:`param-language`,children:[`Preferred language for the AI agent to use during the customer conversation (e.g., `,_jsx(_components.code,{children:`english`}),`, `,_jsx(_components.code,{children:`hindi`}),`, `,_jsx(_components.code,{children:`tamil`}),`).`]})]})]}),_jsxs(Tab,{title:`Lead Generation`,id:`lead-generation`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use this structure for new sales or lead acquisition.`})}),_jsxs(Expandable,{title:`item properties`,children:[_jsx(ParamField,{body:`lead_id`,type:`string`,id:`param-lead-id`,children:`Unique identifier for the lead record.`}),_jsx(ParamField,{body:`first_name`,type:`string`,required:true,id:`param-first-name-1`,children:`Customer’s first name as registered in the system.`}),_jsx(ParamField,{body:`last_name`,type:`string`,required:true,id:`param-last-name-1`,children:`Customer’s last name as registered in the system.`}),_jsx(ParamField,{body:`phone_number`,type:`string`,required:true,id:`param-phone-number-1`,children:`Customer’s primary contact number for outreach and follow-ups.`}),_jsxs(ParamField,{body:`lead_date`,type:`string`,required:true,id:`param-lead-date`,children:[`Date the lead was created or captured. Format: `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]}),_jsxs(ParamField,{body:`language`,type:`string`,id:`param-language-1`,children:[`Preferred language for the AI agent to use during the customer conversation (e.g., `,_jsx(_components.code,{children:`english`}),`, `,_jsx(_components.code,{children:`hindi`}),`, `,_jsx(_components.code,{children:`tamil`}),`).`]})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Indicates if the creation was successful.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`A confirmation message.`})}),`\n`,_jsx(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`The unique ID of the newly created campaign.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The name the newly created campaign.`})})]})}),`\n`,_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsx(_components.p,{children:`The error type or code (Error responses only).`})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 OK`,numberOfLines:`9`,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:`9`,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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Campaign created successfully\"`}),_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:`\"camp_abc123\"`}),_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:`\"Debt Collection Q1\"`})]}),`\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(_components.span,{className:`line`}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 Bad Request`,numberOfLines:`6`,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:`6`,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:`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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ValidationError\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing required field: startDate\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),_jsx(CodeBlock,{filename:`401 Unauthorized`,numberOfLines:`6`,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:`6`,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:`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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unauthorized\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing or invalid authorization header\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),_jsx(CodeBlock,{filename:`403 Forbidden`,numberOfLines:`5`,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:`5`,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:`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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Forbidden\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You don't have the required permission to perform this action\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404 Not Found`,numberOfLines:`5`,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:`5`,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:`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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Not Found\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The provided workflowId is invalid\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`500 Server Error`,numberOfLines:`6`,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:`6`,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:`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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"InternalServerError\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An unexpected error occurred\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:`Validation error - required campaign fields are missing or invalid`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Unauthorized - missing or invalid authorization header`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`Forbidden - insufficient permission to perform this action`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsxs(_components.td,{children:[`The provided `,_jsx(_components.code,{children:`workflowId`}),` is invalid`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:`Internal server error`})]})]})]})]})}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 Campaign","api":"POST https://api.agents.timepay.ai/api/v1/campaigns/create","description":"Create a new campaign with configuration and customer records.","href":"/api-reference/agents/campaigns/create-campaign"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Error Codes","slug":"error-codes","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200 OK","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=\"9\">\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\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Campaign created successfully\"\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\">\"camp_abc123\"\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\">\"Debt Collection Q1\"\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\u003cspan class=\"line\">\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 Bad Request","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=\"6\">\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\">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\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ValidationError\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Missing required field: startDate\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"401 Unauthorized","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=\"6\">\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\">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\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Unauthorized\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Missing or invalid authorization header\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"403 Forbidden","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=\"5\">\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\">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\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Forbidden\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"You don't have the required permission to perform this action\"\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":"404 Not Found","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=\"5\">\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\">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\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Not Found\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The provided workflowId is invalid\"\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":"500 Server Error","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=\"6\">\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\">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\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"InternalServerError\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"An unexpected error occurred\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Campaign","path":"/api/v1/campaigns/create","servers":[{"url":"https://api.agents.timepay.ai"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Bearer token for authentication (e.g., `Bearer \u003cyour_token>` ).","required":true}]},"X-ORG-ID":{"schema":[{"type":"string","description":"Optional. Use this header only when the authenticated user belongs to multiple organizations. It identifies the organization to target for this action."}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"The name of the campaign.","required":true}],"description":[{"type":"string","description":"A brief description of the campaign’s purpose.","required":true}],"campaignType":[{"type":"string","description":"The type of campaign (e.g., `emi` , `edi` , `lead` ).","required":true}],"workflowId":[{"type":"string","description":"The ID of the workflow to associate with this campaign."}],"startDate":[{"type":"string","description":"Start date in IST ( `UTC+05:30` ) using `YYYY-MM-DD` format.","required":true}],"startTime":[{"type":"string","description":"Start time in IST ( `UTC+05:30` ) using `HH:MM` 24-hour format.","required":true}],"endDate":[{"type":"string","description":"End date in IST ( `UTC+05:30` ) using `YYYY-MM-DD` format.","required":true}],"endTime":[{"type":"string","description":"End time in IST ( `UTC+05:30` ) using `HH:MM` 24-hour format.","required":true}],"languages":[{"type":"array","items":[{"type":"string"}],"description":"List of languages supported in this campaign (e.g., `[\"english\", \"hindi\"]` ).","required":true,"placeholder":"e.g. \"hindi\""}],"region":[{"type":"string","description":"Target region for the campaign (e.g., `north` ).","required":true}],"tags":[{"type":"array","items":[{"type":"string"}],"description":"Tags for categorization (e.g., `[\"priority\", \"q1\"]` )."}],"jsonData":[{"type":"array","items":[{"type":"object","properties":{"loan_id":[{"type":"string","description":"Unique identifier for the loan record.","required":true}],"first_name":[{"type":"string","description":"Customer’s first name as registered in the system.","required":true}],"last_name":[{"type":"string","description":"Customer’s last name as registered in the system.","required":true}],"phone_number":[{"type":"string","description":"Customer’s primary contact number for outreach and follow-ups.","required":true}],"loan_amount":[{"type":"number","description":"Total principal amount of the loan in the account currency.","required":true}],"emi_amount":[{"type":"number","description":"Equated Monthly Installment (EMI) amount due for the current billing cycle.","required":true}],"loan_period":[{"type":"number","description":"Total loan tenure expressed as the number of monthly installments.","required":true}],"current_emi":[{"type":"number","description":"The current installment number in the repayment schedule (e.g., 5 of 12).","required":true}],"emi_due_date":[{"type":"string","description":"Due date for the current EMI payment. Format: `YYYY-MM-DD` .","required":true}],"payment_status":[{"type":"string","description":"Current status of the customer’s EMI payment.","required":true}],"language":[{"type":"string","description":"Preferred language for the AI agent to use during the customer conversation (e.g., `english` , `hindi` , `tamil` )."}],"lead_id":[{"type":"string","description":"Unique identifier for the lead record."}],"lead_date":[{"type":"string","description":"Date the lead was created or captured. Format: `YYYY-MM-DD` .","required":true}]}}],"description":"Array of customer objects. The required fields within these objects change based on your campaign focus.","required":true}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","description":"\u003cstring>","campaignType":"\u003cstring>","workflowId":"\u003cstring>","startDate":"\u003cstring>","startTime":"\u003cstring>","endDate":"\u003cstring>","endTime":"\u003cstring>","languages":["\u003cstring>"],"region":"\u003cstring>","tags":["\u003cstring>"],"jsonData":[{"loan_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","phone_number":"\u003cstring>","loan_amount":123,"emi_amount":123,"loan_period":123,"current_emi":123,"emi_due_date":"\u003cstring>","payment_status":"\u003cstring>","language":"\u003cstring>","lead_id":"\u003cstring>","lead_date":"\u003cstring>"}]}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"Indicates if the creation was successful."}],"message":[{"type":"string","description":"A confirmation message."}],"data":[{"type":"object","properties":{"id":[{"type":"string","description":"The unique ID of the newly created campaign."}],"name":[{"type":"string","description":"The name the newly created campaign."}]}}],"error":[{"type":"string","description":"The error type or code (Error responses only)."}]}}],"examples":{"example":{"value":{"success":true,"message":"\u003cstring>","data":{"id":"\u003cstring>","name":"\u003cstring>"},"error":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"timepayai-b31ccf4d","siteName":"timepay.ai","title":"Create Campaign - timepay.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-10T07:55:51.574Z","originalFileLocation":"api-reference/agents/campaigns/create-campaign.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 campaign with configuration and customer records.\">\u003cmeta data-mint-head name=\"application-name\" content=\"timepay.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Campaign - timepay.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new campaign with configuration and customer records.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"timepay.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://timepayai-b31ccf4d.mintlify.app/_mintlify/api/og/v2?division=Campaigns\u0026amp;title=Create+Campaign\u0026amp;description=Create+a+new+campaign+with+configuration+and+customer+records.\u0026amp;theme=6ea977db2a36e9190e9fe0cb\u0026amp;signature=51e226330f419a3806a4b07980c91db145a3d9b8e5676e6e94f066ba3084d3b4\">\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 Campaign - timepay.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new campaign with configuration and customer records.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://timepayai-b31ccf4d.mintlify.app/_mintlify/api/og/v2?division=Campaigns\u0026amp;title=Create+Campaign\u0026amp;description=Create+a+new+campaign+with+configuration+and+customer+records.\u0026amp;theme=6ea977db2a36e9190e9fe0cb\u0026amp;signature=51e226330f419a3806a4b07980c91db145a3d9b8e5676e6e94f066ba3084d3b4\">\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/timepayai-b31ccf4d/V1IoD9jgxzFlVbCs/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"timepay.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6D28D9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/agents/campaigns/create-campaign.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://agents.docs.timepay.ai/#organization\",\"name\":\"timepay.ai\",\"url\":\"https://agents.docs.timepay.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/timepayai-b31ccf4d/J5_kVcxKVFreOF4q/logo/light.png?fit=max\u0026auto=format\u0026n=J5_kVcxKVFreOF4q\u0026q=85\u0026s=516b7c84a005aca528ac0345fa47137a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://agents.docs.timepay.ai#website\",\"name\":\"timepay.ai\",\"url\":\"https://agents.docs.timepay.ai\",\"publisher\":{\"@id\":\"https://agents.docs.timepay.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign#webpage\",\"url\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign\",\"name\":\"Create Campaign\",\"description\":\"Create a new campaign with configuration and customer records.\",\"dateModified\":\"2026-10-10T07:55:51.574Z\",\"isPartOf\":{\"@id\":\"https://agents.docs.timepay.ai#website\"},\"breadcrumb\":{\"@id\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Documentation\",\"item\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/list-campaigns\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Campaigns\",\"item\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/list-campaigns\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create Campaign\",\"item\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign#apireference\",\"headline\":\"Create Campaign\",\"name\":\"Create Campaign\",\"description\":\"Create a new campaign with configuration and customer records.\",\"url\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign\",\"mainEntityOfPage\":{\"@id\":\"https://agents.docs.timepay.ai/api-reference/agents/campaigns/create-campaign#webpage\"},\"dateModified\":\"2026-10-10T07:55:51.574Z\",\"publisher\":{\"@id\":\"https://agents.docs.timepay.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://agents.docs.timepay.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"timepay.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"timepay.ai","nav":{"global":null,"tabs":[{"tab":"Agents","icon":"robot","pages":[{"title":"Agents","href":"/agents/integrations/whatsapp"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"API Documentation","pages":[{"group":"Campaigns","icon":"bullseye","pages":[{"title":"List Campaigns","api":"GET https://api.agents.timepay.ai/api/v1/campaigns","description":"Get a paginated list of campaigns for the organization.","href":"/api-reference/agents/campaigns/list-campaigns"},{"title":"Create Campaign","api":"POST https://api.agents.timepay.ai/api/v1/campaigns/create","href":"/api-reference/agents/campaigns/create-campaign"},{"title":"Get Campaign","api":"GET https://api.agents.timepay.ai/api/v1/campaigns/{id}","description":"Retrieve detailed information about a specific campaign by its ID.","href":"/api-reference/agents/campaigns/get-campaign"},{"title":"Update Campaign","api":"PUT https://api.agents.timepay.ai/api/v1/campaigns/update/{id}","href":"/api-reference/agents/campaigns/update-campaign"},{"title":"Delete Campaign","api":"DELETE https://api.agents.timepay.ai/api/v1/campaigns/{id}","href":"/api-reference/agents/campaigns/delete-campaign"}]},{"group":"Workflows","icon":"diagram-project","pages":[{"title":"List Workflow Templates","api":"GET https://api.agents.timepay.ai/api/v1/workflows/templates","href":"/api-reference/agents/workflows/list-workflow-templates"},{"title":"Resume Workflow","api":"POST https://api.agents.timepay.ai/api/v1/workflows/action/resume","href":"/api-reference/agents/workflows/resume-workflow"},{"title":"Pause Workflow","api":"POST https://api.agents.timepay.ai/api/v1/workflows/action/pause","href":"/api-reference/agents/workflows/pause-workflow"},{"title":"Delete Workflow Template","api":"DELETE https://api.agents.timepay.ai/api/v1/workflows/templates/{id}","href":"/api-reference/agents/workflows/delete-workflow-template"}]},{"group":"AI Agents","icon":"user-robot","pages":[{"title":"List Agents","api":"GET https://api.agents.timepay.ai/api/v1/agents","href":"/api-reference/agents/agents/list"},{"title":"Delete Agent","api":"DELETE https://api.agents.timepay.ai/api/v1/agents/{id}","href":"/api-reference/agents/agents/delete"}]},{"group":"Dispositions Management","icon":"tags","pages":[{"group":"Dispositions","pages":[{"title":"List Dispositions","api":"GET https://api.agents.timepay.ai/api/v1/dispositions","href":"/api-reference/agents/dispositions/list-disposition"},{"title":"Create Disposition","api":"POST https://api.agents.timepay.ai/api/v1/dispositions/create","href":"/api-reference/agents/dispositions/create-disposition"},{"title":"Get Disposition","api":"GET https://api.agents.timepay.ai/api/v1/dispositions/{id}","href":"/api-reference/agents/dispositions/get-disposition"},{"title":"Update Disposition","api":"PUT https://api.agents.timepay.ai/api/v1/dispositions/{id}","href":"/api-reference/agents/dispositions/update-disposition"},{"title":"Delete Disposition","api":"DELETE https://api.agents.timepay.ai/api/v1/dispositions/{id}","href":"/api-reference/agents/dispositions/delete-disposition"}]},{"group":"Dispositions Group","pages":[{"title":"List Disposition Groups","api":"GET https://api.agents.timepay.ai/api/v1/dispositions/groups/list","href":"/api-reference/agents/dispositions/list-disposition-group"},{"title":"Create Disposition Group","api":"POST https://api.agents.timepay.ai/api/v1/dispositions/groups/create","href":"/api-reference/agents/dispositions/create-disposition-group"},{"title":"Get Disposition Group","api":"GET https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}","href":"/api-reference/agents/dispositions/get-disposition-group"},{"title":"Update Disposition Group","api":"PUT https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}","href":"/api-reference/agents/dispositions/update-disposition-group"},{"title":"Delete Disposition Group","api":"DELETE https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}","href":"/api-reference/agents/dispositions/delete-disposition-group"},{"title":"Add Dispositions to Group","api":"POST https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}/dispositions","href":"/api-reference/agents/dispositions/add-disposition-in-group"},{"title":"Remove Dispositions from Group","api":"DELETE https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}/dispositions","href":"/api-reference/agents/dispositions/remove-disposition-from-group"}]}]},{"group":"Customers","icon":"users","pages":[{"title":"List Customers","api":"POST https://api.agents.timepay.ai/api/v1/customers/list","href":"/api-reference/agents/customer-data/list-customers"},{"title":"Check Customer Exists","api":"POST https://api.agents.timepay.ai/api/v1/customers/exists","href":"/api-reference/agents/customer-data/customer-exists"},{"title":"Update Customer","api":"PUT https://api.agents.timepay.ai/api/v1/customers/update","href":"/api-reference/agents/customer-data/update-customer-data"},{"title":"Bulk Update Customer","api":"PUT https://api.agents.timepay.ai/api/v1/customers/update/bulk","href":"/api-reference/agents/customer-data/bulk-update-customer-data"},{"title":"Add Customer","api":"POST https://api.agents.timepay.ai/api/v1/customers/add","href":"/api-reference/agents/customer-data/add-customer"},{"title":"Bulk Add Customers","api":"POST https://api.agents.timepay.ai/api/v1/customers/add/bulk","href":"/api-reference/agents/customer-data/bulk-add-customer"}]},{"group":"Manual Initiations","icon":"bullhorn","pages":[{"title":"Initiate Call(s)","api":"POST https://api.agents.timepay.ai/api/v1/initiate/{campaignId}/calls","href":"/api-reference/agents/manual-initiations/initiate-call"},{"title":"Initiate WhatsApp","api":"POST https://api.agents.timepay.ai/api/v1/initiate/{campaignId}/whatsapp","href":"/api-reference/agents/manual-initiations/initiate-whatsapp"},{"title":"Initiate SMS","api":"POST https://api.agents.timepay.ai/api/v1/initiate/{campaignId}/sms","href":"/api-reference/agents/manual-initiations/initiate-sms"}]},{"group":"Details","icon":"align-justify","pages":[{"title":"Get Call Details","api":"GET https://api.agents.timepay.ai/api/v1/communication/call/{call_id}","href":"/api-reference/agents/details/call"},{"title":"Get WhatsApp Details","api":"GET https://api.agents.timepay.ai/api/v1/communication/whatsapp/{message_id}","href":"/api-reference/agents/details/whatsapp"},{"title":"Get Logs","api":"GET https://api.agents.timepay.ai/api/v1/logs","href":"/api-reference/agents/details/logs"}]},{"group":"Media","icon":"file","pages":[{"title":"Get Recording","api":"GET https://api.agents.timepay.ai/api/v1/recording/{recording_id}","href":"/api-reference/agents/media/getRecording"},{"title":"Get Transcript","api":"GET https://api.agents.timepay.ai/api/v1/transcript/{transcript_id}","href":"/api-reference/agents/media/getTranscript"}]},{"group":"Blacklist","icon":"shield-slash","pages":[{"title":"Add to Blacklist","api":"POST https://api.agents.timepay.ai/api/v1/blacklist/bulk/add","href":"/api-reference/agents/blacklist/add"},{"title":"Remove from Blacklist","api":"DELETE https://api.agents.timepay.ai/api/v1/blacklist/bulk/remove","href":"/api-reference/agents/blacklist/remove"}]},{"group":"Numbers Management","icon":"phone","pages":[{"title":"List Numbers","api":"GET https://api.agents.timepay.ai/api/v1/numbers/searchNumbers","href":"/api-reference/agents/numbers/list-numbers"},{"title":"Buy Numbers","api":"POST https://api.agents.timepay.ai/api/v1/numbers/buyNumbers","href":"/api-reference/agents/numbers/buy-numbers"}]}]}]}]},"title":"Create Campaign - timepay.ai","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-26-lDe7V.js","utils-CWQmgYtH.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-4-Aw3rSD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C2zjXYA5.js","snippetPresets-DFmpFA7C.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-FJpQavWq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D_GvPF7k.js","shallow-Bs2ZB0NO.js","getApiPlaygroundDisplay-DCcqJJk-.js","CodeSnippet-DzDxawVe.js","CodeSnippets-aUr7fU-7.js","Page-CT9uE8Ip.js","getPastedJson-Y1fKsj_I.js","icon-DI4zTsDr.js","MethodPill-C0nDlmSQ.js","DuplicateIcon-NUXbx2nQ.js","createIcon-BdTHrPAi.js","DynamicMarkdown-CtpgKJwj.js","SectionHeading-B3x35tOt.js","axios-vUo_bRtp.js"]}