Account Management
Managing Sub-Accounts
Create Sub-Accounts API
8 min
overview the sub accounts api allows you to programmatically create and configure sub accounts under your primary momentscience account, when creating a sub account, you can define login credentials and basic profile details copy campaigns, snippets, and behavior settings from the parent account apply default configurations such as timezone, test mode, or delivery preferences this api is authenticated with a bearer token and requires the accounts permission scope prerequisites before you start, make sure you have an api key generated from the momentscience dashboard the api key must include the accounts permission scope getting your api key endpoint post https //api adspostx com/native/account json request headers header type description authorization string this endpoint requires a bearer token with accounts permission enabled requests without the correct scope will be rejected bearer \<api key> content type string must be application/json query parameters use query parameters to inherit configurations from the parent account when creating a sub account parameter type description copyparentcampaigns boolean set to true to copy campaigns from the parent account copyparentsnippets boolean set to true to copy momentperks and perkswall themes setdefaultsnippetasparent boolean set to true to use the parentβs default theme for the sub account copyparentbehaviorsettings boolean set to true to copy parent behavior settings into the sub account request body field type required description email string yes sub account login email firstname string conditional required if lastname or organization is not provided lastname string conditional required if firstname or organization is not provided organization string conditional required if firstname or lastname is not provided password string yes must be at least 8 characters, including uppercase, lowercase, and a number confirmpassword string yes must match the password mobile string optional mobile number of the sub account holder country string optional country code (e g , us ) zipcode string optional zip/postal code awin advertiser id string optional awin advertiser id internalnotes string optional internal notes visible only within your organization settings object optional custom account settings (for example, timezone "america/chicago" ) example request example request curl x post "https //api adspostx com/native/account json?copyparentcampaigns=true\©parentsnippets=true" \\ h "authorization bearer \<your api key>" \\ h "content type application/json" \\ d '{ "email" "newuser\@example com", "password" "example123!", "confirmpassword" "example123!", "firstname" "jane", "lastname" "doe", "country" "us", "zipcode" "10001", "internalnotes" "partner onboarding", "settings" { "timezone" "america/new york" } }' api response once the success response 200 ok the api response includes data account contains the newly created sub account details, including fields provided in the request data settings contains the full configuration object for the sub account, including all default platform settings and feature flags { "status" "success", "data" { "account" { "id" 5074, "firstname" "jon", "lastname" "peter", "username" "newuser\@example com", "email" "newuser\@example com", "sdk id" "605590e3bc3863ca", "organization" "acme corp" }, "settings" { "no of ads" 3, "is active" true, "timezone" "america/los angeles", "delivery options" { "platform" { "mobile" 100, "tablet" 100, "desktop" 100, "unknown" 100 } } } } } π’ if you're running into any issues while going through the integration process, feel free to contact us at help\@momentscience com