{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/accounts/:account_id/subaccounts","auth":"required","results":{"codes":[{"language":"json","code":"{\n    \"id\": 883,\n    \"name\": \"Teddy\",\n    \"master_account\": {\n        \"id\": 133532,\n        \"name\": \"Bobby Smith\",\n    },\n    \"contact\": {\n        \"name\": \"Teddy\",\n        \"company\": \"Acme, Inc.\",\n        \"address\": {\n            \"line_1\": \"14282 Danielson Street\",\n            \"line_2\": \"box 2\",\n            \"city\": \"Poway\",\n            \"province\": \"CA\",\n            \"postal_code\": \"92064\",\n            \"country\": \"US\"\n        },\n        \"phone\": \"+18585551111\",\n        \"fax\": \"+18585552222\",\n        \"email_1\": \"test:::at:::phone.com\",\n        \"email_2\": \"[email protected]\"\n    },\n    \"billing_contact\": {\n        \"name\": \"Bobby\",\n        \"company\": \"xyz co\",\n        \"address\": {\n            \"line_1\": \"100 Main St\",\n            \"line_2\": \"#4\",\n            \"city\": \"San Diego\",\n            \"province\": \"CA\",\n            \"postal_code\": \"92129\",\n            \"country\": \"US\"\n        },\n        \"phone\": \"+18585553333\",\n        \"fax\": \"+18585554444\",\n        \"email_1\": \"[email protected]\",\n        \"email_2\": \"[email protected]\"\n    }\n}","name":"","status":200}]},"settings":"","examples":{"codes":[{"code":"<?php\n$client = new \\GuzzleHttp\\Client([\n    'base_uri' => 'https://api.phone.com/v4/',\n    'headers' => ['Authorization' => \"Bearer $token\"]\n]);\n$response = $client->post('accounts/1/subaccounts', ['json' => [\n  \t\"usernae\": \"myAccount\",\n  \t\"password\": \"[email protected]$^*)\",\n    \"contact\": [\n        \"name\": \"Teddy\",\n        \"company\": \"Acme, Inc.\",\n        \"address\": {\n            \"line_1\": \"14282 Danielson Street\",\n            \"line_2\": \"box 2\",\n            \"city\": \"Poway\",\n            \"province\": \"CA\",\n            \"postal_code\": \"92064\",\n            \"country\": \"US\"\n        ],\n        \"phone\": \"+18585551111\",\n        \"fax\": \"+18585552222\",\n        \"email_1\": \"[email protected]\",\n        \"email_2\": \"[email protected]\"\n    ],\n    \"billing_contact\" : [\n        \"name\": \"Bobby\",\n        \"company\": \"xyz co\",\n        \"address\": [\n            \"line_1\": \"100 Main St\",\n            \"line_2\": \"#4\",\n            \"city\": \"San Diego\",\n            \"province\": \"CA\",\n            \"postal_code\": \"92129\",\n            \"country\": \"US\"\n        ],\n        \"phone\": \"+18585553333\",\n        \"fax\": \"+18585554444\",\n        \"email_1\": \"[email protected]\",\n        \"email_2\": \"[email protected]\"\n    ]\n]]);","language":"php"}]},"method":"post","params":[{"name":"account_id","type":"int","default":"","desc":"Account ID","required":true,"in":"path","ref":"","_id":"56f9bd91303b34320094b8f6"},{"name":"username","type":"string","default":"","desc":"Sub account user name","required":true,"in":"body","ref":"","_id":"57d9ac553916800e003ddf3c"},{"name":"password","type":"string","default":"","desc":"Sub account password","required":true,"in":"body","ref":"","_id":"57d9ac553916800e003ddf3b"},{"name":"contact.name","type":"string","default":"","desc":"Contact name","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e15"},{"name":"contact.address.line_1","type":"string","default":"","desc":"Contact street address","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e13"},{"name":"contact.address.line_2","type":"string","default":"","desc":"Contact street address 2","required":false,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e12"},{"name":"contact.address.city","type":"string","default":"","desc":"Contact city","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e18"},{"name":"contact.address.province","type":"string","default":"","desc":"Contact province","required":false,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e10"},{"name":"contact.address.postal_code","type":"string","default":"","desc":"Contact postal code","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e0f"},{"name":"contact.address.country","type":"string","default":"","desc":"Contact country","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e0e"},{"name":"contact.primary_email","type":"string","default":"","desc":"Contact email","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e0a"},{"name":"contact.alternate_email","type":"string","default":"","desc":"Contact alternate email","required":false,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e09"},{"name":"contact.company","type":"string","default":"","desc":"Company","required":false,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e14"},{"name":"contact.phone","type":"string","default":"","desc":"Contact phone","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e0c"},{"name":"contact.fax","type":"string","default":"","desc":"Contact fax","required":false,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e0b"},{"name":"billing_contact.name","type":"string","default":"","desc":"Billing contact name","required":true,"in":"body","ref":"","_id":"5791402f180e233400f70ee9"},{"name":"billing_contact.address.line_1","type":"string","default":"","desc":"Billing contact street address","required":true,"in":"body","ref":"","_id":"57913f2514b5b32b00b79e0d"},{"name":"billing_contact.address.line_2","type":"string","default":"","desc":"Billing contact street address 2","required":false,"in":"body","ref":"","_id":"57913f56f0c7242b005a7049"},{"name":"billing_contact.address.city","type":"string","default":"","desc":"Billing contact city","required":true,"in":"body","ref":"","_id":"5791402f180e233400f70eec"},{"name":"billing_contact.address.province","type":"string","default":"","desc":"Billing contact province","required":false,"in":"body","ref":"","_id":"5791402f180e233400f70eea"},{"name":"billing_contact.company","type":"string","default":"","desc":"Billing contact company","required":false,"in":"body","ref":"","_id":"5791402f180e233400f70ee3"},{"name":"billing_contact.address.postal_code","type":"string","default":"","desc":"Billing contact postal code","required":true,"in":"body","ref":"","_id":"5791402f180e233400f70eeb"},{"name":"billing_contact.address.country","type":"string","default":"","desc":"Billing contact country","required":true,"in":"body","ref":"","_id":"5791402f180e233400f70ee8"},{"name":"billing_contact.phone","type":"string","default":"","desc":"Billing contact phone","required":true,"in":"body","ref":"","_id":"5791402f180e233400f70ee7"},{"name":"billing_contact.fax","type":"string","default":"","desc":"Billing contact fax","required":false,"in":"body","ref":"","_id":"5791402f180e233400f70ee6"},{"name":"billing_contact.primary_email","type":"string","default":"","desc":"Billing contact email","required":true,"in":"body","ref":"","_id":"5791402f180e233400f70ee5"},{"name":"billing_contact.alternate_email","type":"string","default":"","desc":"Billing contact alternate email","required":false,"in":"body","ref":"","_id":"5791402f180e233400f70ee4"}]},"next":{"description":"","pages":[]},"title":"Create Subaccount","type":"endpoint","slug":"create-account-subaccount","excerpt":"Add a subaccount for the authenticated user or client","body":"This service shows the details of an individual [Subaccount](doc:subaccounts).","updates":[],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5797d3e4e8e2090e003b848b","parentDoc":null,"user":"571fcfeea0acd42000af95be","version":{"version":"4","version_clean":"4.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["57624356653c2d2200fec79d","57624356653c2d2200fec79e","57624356653c2d2200fec79f","57624356653c2d2200fec7a0","57624356653c2d2200fec7a1","57624356653c2d2200fec7a2","57624356653c2d2200fec7a3","57624356653c2d2200fec7a4","57624356653c2d2200fec7a5","57624356653c2d2200fec7a6","57624356653c2d2200fec7a7","57624356653c2d2200fec7a8","57624356653c2d2200fec7a9","57624356653c2d2200fec7aa","5779ca1b99b40b0e005abb3a","5779d198aea88b0e00f63277","5797d3ab17ced017003c4be4","57ac170ef1cdae0e0053cdfc","57dbfc723ed3450e00dc9e6d","5804d12d16161c0f0077df9b","5841064b652e5b0f0015a7c8","588b5e5f2966b2230009cbf9","58a68ebf3239fa0f00857619","58c23c8b4922930f0050ac91","58fd1460809fc30f00f2ee07","5934eaf5328680002d77de6a","594bf91601cfe6000f40f4c5","595c4ed696b447001ba0cf6d","596524495cee50001575f5be","5970d4f1313162004dd303b5","59780fac24dbd1001a1fa057","59a8cfd3ead78a002d63cafe","59e0323d93da1f001c9ec170","5b0c16f2be9fcb0003e28222","5ba8fd1a4c8c220003a08f0f","5ede526e75bc22005d0adecc"],"_id":"57624356653c2d2200fec79c","createdAt":"2016-06-16T06:12:38.244Z","releaseDate":"2016-06-16T06:12:38.244Z","__v":23,"project":"55c8cff571d7580d0063a5e5"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Account Subaccounts","slug":"account-subaccounts","order":27,"from_sync":false,"reference":true,"_id":"5797d3ab17ced017003c4be4","project":"55c8cff571d7580d0063a5e5","createdAt":"2016-07-26T21:18:35.003Z","version":"57624356653c2d2200fec79c","__v":0},"githubsync":"","project":"55c8cff571d7580d0063a5e5","__v":33,"createdAt":"2016-07-26T21:19:32.202Z"}

postCreate Subaccount

Add a subaccount for the authenticated user or client

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

account_id:
required
integer
Account ID

Body Params

username:
required
string
Sub account user name
password:
required
string
Sub account password
contact.name:
required
string
Contact name
contact.address.line_1:
required
string
Contact street address
contact.address.line_2:
string
Contact street address 2
contact.address.city:
required
string
Contact city
contact.address.province:
string
Contact province
contact.address.postal_code:
required
string
Contact postal code
contact.address.country:
required
string
Contact country
contact.primary_email:
required
string
Contact email
contact.alternate_email:
string
Contact alternate email
contact.company:
string
Company
contact.phone:
required
string
Contact phone
contact.fax:
string
Contact fax
billing_contact.name:
required
string
Billing contact name
billing_contact.address.line_1:
required
string
Billing contact street address
billing_contact.address.line_2:
string
Billing contact street address 2
billing_contact.address.city:
required
string
Billing contact city
billing_contact.address.province:
string
Billing contact province
billing_contact.company:
string
Billing contact company
billing_contact.address.postal_code:
required
string
Billing contact postal code
billing_contact.address.country:
required
string
Billing contact country
billing_contact.phone:
required
string
Billing contact phone
billing_contact.fax:
string
Billing contact fax
billing_contact.primary_email:
required
string
Billing contact email
billing_contact.alternate_email:
string
Billing contact alternate email

Examples


Result Format


Documentation

This service shows the details of an individual [Subaccount](doc:subaccounts).

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}