{"componentChunkName":"component---src-templates-api-js","path":"/api/subaccounts/","result":{"data":{"allApiBlueprint":{"edges":[{"node":{"meta":{"title":"A/B Testing API","label":"New"},"fields":{"path":"/api/ab-testing/","file":"ab-testing.apib"}}},{"node":{"meta":{"title":"Data Privacy API","label":"New"},"fields":{"path":"/api/data-privacy/","file":"data-privacy.apib"}}},{"node":{"meta":{"title":"Events API","label":null},"fields":{"path":"/api/events/","file":"events.apib"}}},{"node":{"meta":{"title":"Ingest API","label":"Private Access"},"fields":{"path":"/api/events-ingest/","file":"events-ingest.apib"}}},{"node":{"meta":{"title":"Inbound Domains API","label":null},"fields":{"path":"/api/inbound-domains/","file":"inbound-domains.apib"}}},{"node":{"meta":{"title":"Account API","label":null},"fields":{"path":"/api/account/","file":"account.apib"}}},{"node":{"meta":{"title":"API Overview","label":null},"fields":{"path":"/api/","file":"index.apib"}}},{"node":{"meta":{"title":"Automatic Inline Seeding","label":"Deliverability"},"fields":{"path":"/api/inline-seeds/","file":"inline-seeds.apib"}}},{"node":{"meta":{"title":"Labs APIs","label":null},"fields":{"path":"/api/labs/","file":"labs.apib"}}},{"node":{"meta":{"title":"Message Events API","label":null},"fields":{"path":"/api/message-events/","file":"message-events.apib"}}},{"node":{"meta":{"title":"Recipient Validation API","label":"New"},"fields":{"path":"/api/recipient-validation/","file":"recipient-validation.apib"}}},{"node":{"meta":{"title":"IP Pools API","label":null},"fields":{"path":"/api/ip-pools/","file":"ip-pools.apib"}}},{"node":{"meta":{"title":"Seed List API","label":"Deliverability"},"fields":{"path":"/api/seed-list/","file":"seed-list.apib"}}},{"node":{"meta":{"title":"Bounce Domains API","label":null},"fields":{"path":"/api/bounce-domains/","file":"bounce-domains.apib"}}},{"node":{"meta":{"title":"Recipient Lists API","label":null},"fields":{"path":"/api/recipient-lists/","file":"recipient-lists.apib"}}},{"node":{"meta":{"title":"Sending IPs API","label":null},"fields":{"path":"/api/sending-ips/","file":"sending-ips.apib"}}},{"node":{"meta":{"title":"Relay Webhooks API","label":null},"fields":{"path":"/api/relay-webhooks/","file":"relay-webhooks.apib"}}},{"node":{"meta":{"title":"SMTP API","label":null},"fields":{"path":"/api/smtp/","file":"smtp.apib"}}},{"node":{"meta":{"title":"Snippets API","label":"New"},"fields":{"path":"/api/snippets/","file":"snippets.apib"}}},{"node":{"meta":{"title":"Subaccounts API","label":null},"fields":{"path":"/api/subaccounts/","file":"subaccounts.apib"}}},{"node":{"meta":{"title":"Sending Domains API","label":null},"fields":{"path":"/api/sending-domains/","file":"sending-domains.apib"}}},{"node":{"meta":{"title":"Suppression List API","label":null},"fields":{"path":"/api/suppression-list/","file":"suppression-list.apib"}}},{"node":{"meta":{"title":"Template Language","label":null},"fields":{"path":"/api/template-language/","file":"template-language.apib"}}},{"node":{"meta":{"title":"Tracking Domains API","label":null},"fields":{"path":"/api/tracking-domains/","file":"tracking-domains.apib"}}},{"node":{"meta":{"title":"Templates API","label":null},"fields":{"path":"/api/templates/","file":"templates.apib"}}},{"node":{"meta":{"title":"Transmissions API","label":null},"fields":{"path":"/api/transmissions/","file":"transmissions.apib"}}},{"node":{"meta":{"title":"Event Webhooks API","label":null},"fields":{"path":"/api/webhooks/","file":"webhooks.apib"}}},{"node":{"meta":{"title":"Usage API","label":null},"fields":{"path":"/api/usage/","file":"usage.apib"}}},{"node":{"meta":{"title":"Metrics API","label":null},"fields":{"path":"/api/metrics/","file":"metrics.apib"}}}]},"apiBlueprint":{"ast":{"element":"parseResult","content":[{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"api"}]},"title":{"element":"string","content":""}},"attributes":{"meta":{"element":"array","content":[{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"FORMAT"},"value":{"element":"string","content":"1A"}}},{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"title"},"value":{"element":"string","content":"Subaccounts API"}}},{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"description"},"value":{"element":"string","content":"Manage subaccounts, a way for service providers to provision and manage customers."}}}]}},"content":[{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"resourceGroup"}]},"title":{"element":"string","content":"Subaccounts"}},"content":[{"element":"copy","content":"Subaccounts are a way for you to provision and manage senders separately from each other, and to provide assets and reporting data for each of them. This is useful for service providers who send on behalf of others or for a business that wants to separate their different streams of traffic. Learn more in our [subaccount guide](https://www.sparkpost.com/docs/user-guide/subaccounts/).\n\nThe following APIs have subaccount support:\n\n-   [A/B Testing](/api/ab-testing/)\n\n-   [Data Privacy](/api/data-privacy/)\n\n-   [Events](/api/events/)\n\n-   [Inline Seeds](/api/inline-seeds/)\n\n-   [Message Events](/api/message-events/)\n\n-   [Metrics](/api/metrics/)\n\n-   [Sending Domains](/api/sending-domains/)\n\n-   [SMTP API](/api/smtp/)\n\n-   [Suppression List](/api/suppression-list/)\n\n-   [Templates](/api/templates/)\n\n-   [Tracking Domains](/api/tracking-domains/)\n\n-   [Transmissions](/api/transmissions/)\n\n-   [Webhooks](/api/webhooks/)\n\n<Banner status=\"info\"><strong>Note</strong>: all subaccount-level transmissions must use <code>inline</code> recipients. Stored recipient lists are not supported for subaccounts.</Banner>\n\n### Terminology\n\n|                     |                                                                         |\n| ------------------- | ----------------------------------------------------------------------- |\n| **Primary account** | This refers to a Service Provider and their data.                       |\n| **Subaccounts**     | This refers to a Service Provider's customers, and the customers' data. |\n\n### The `X-MSYS-SUBACCOUNT` header\n\nTo manage a subaccount from the primary account, you can set the `X-MSYS-SUBACCOUNT` header to a subaccount ID. This will retrieve or modify only that subaccount's data. The exceptions are the Metrics and Message Events APIs which do not use the `X-MSYS-SUBACCOUNT` header. Instead, you can set the query parameter `subaccounts` for the same result.\n\nFor example, setting `X-MSYS-SUBACCOUNT` to `123` on a POST request to `/api/v1/sending-domains` will create a sending domain that belongs to subaccount 123. And similarly setting `X-MSYS-SUBACCOUNT` to `123`  on a GET request to `/api/v1/sending-domains`, will return sending domains which belong to subaccount 123.\n\nYou can also use the header to filter out subaccount data. By default, when you make GET requests, the API returns both the primary account and subaccount data. When you set the `X-MSYS-SUBACCOUNT` header to `0`, it will return _only_ the primary account data.\n\nWhen making POST, PUT, or DELETE requests without the `X-MSYS-SUBACCOUNT` header, only primary account is affected by default, so setting the header to `0` makes no difference. The exception here is webhooks. They act like GET requests, where if you omit the header, they will be sent both the primary account and subaccount data, but if you set the `X-MSYS-SUBACCOUNT` header to `0`, they will only receive the primary account data.\n\n<Banner status=\"info\">`X-MSYS-SUBACCOUNT` is not required, but if provided, must be a number.</Banner>\n\n### Pagination\n\nThe Subaccounts API supports pagination for queries with larger result sets. Pagination is done through the use of the `cursor` and `per_page` query parameters.\nThe `per_page` query parameter sets the number of subaccounts to return in a single request, and supports a maximum value of 100.\n\nOnce you have the response, you then can use `links` to retrieve the URL for your next page, which will be prefilled with the appropriate value for the `cursor` query parameter,\nas well as any other filters you supplied with the original request.\n\nIf your result set is less than one page of data, then the `links` object will not have a `next` key.\n\n<DataStructure id=\"72f915567854ea5cdf73b9bca02288af\"  title=\"Paginated Response\"  sample=\"%7B%0A%20%20%20%20%20%20%22results%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22Joe%27s%20Garage%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ip_pool%22%3A%20%22my_ip_pool%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22compliance_status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22deliverability%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%202%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22SharkPost%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22compliance_status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22deliverability%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22id%22%3A%203%2C%0A%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22Dev%20Avocado%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22status%22%3A%20%22suspended%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22compliance_status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22deliverability%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%5D%2C%0A%20%20%22total_count%22%3A%20350%2C%0A%20%20%22links%22%3A%7B%0A%20%20%20%20%20%20%22next%22%3A%20%22/api/v1/subaccounts%3Fcursor%3DWzIxMCwyMTBd%26per_page%3D3%26sort_by%3Did%22%0A%20%20%7D%0A%20%20%7D\"></DataStructure>\n\n### Subaccount object\n\n<DataStructure id=\"8078a9d77ae944a444246101be33506e\"  title=\"Attributes\"  sample=\"%7B%0A%20%20%20%20%22results%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22id%22%3A%20123%2C%0A%20%20%20%20%20%20%20%20%22name%22%3A%20%22Joes%20Garage%22%2C%0A%20%20%20%20%20%20%20%20%22status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%22compliance_status%22%3A%20%22active%22%2C%0A%20%20%20%20%20%20%20%20%22ip_pool%22%3A%20%22assigned_ip_pool%22%2C%0A%20%20%20%20%20%20%20%20%22options%22%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22deliverability%22%3A%20false%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D\"></DataStructure>"},{"element":"resource","meta":{"title":{"element":"string","content":"Create a Subaccount"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Create a Subaccount"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts"}},"content":[{"element":"copy","content":"Creates a new subaccount and an initial subaccount API key. Subaccount API keys are only allowed very specific grants.\n\nSubaccounts are allowed to send mail using the SMTP protocol or Transmissions API, retrieve sending statistics via the Message Events API, manage their Sending Domains, manage their Suppression List, and manage their Templates.\n\n<DataStructure id=\"dadf32cd8832727ef8f1be2c1a15b7a1\"  ></DataStructure>\n\nReturns the subaccount's ID, along with the API key and API key label, if one was created.\n\n<Banner status=\"info\">Stored recipients lists and stored templates are currently not supported for subaccounts sending mail using the Transmissions API.</Banner>"},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Sparkle Ponies\",\n      \"key_label\": \"API Key for Sparkle Ponies Subaccount\",\n      \"key_grants\": [\"smtp/inject\", \"sending_domains/manage\", \"message_events/view\", \"suppression_lists/manage\", \"tracking_domains/view\", \"tracking_domains/manage\", \"webhooks/modify\", \"webhooks/view\"],\n      \"key_valid_ips\": [],\n      \"ip_pool\": \"\",\n      \"options\": {\n          \"deliverability\": true\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"subaccount_id\": 888,\n          \"key\": \"cf806c8c472562ab98ad5acac1d1b06cbd1fb438\",\n          \"label\": \"API Key for Sparkle Ponies Subaccount\",\n          \"short_key\": \"cf80\"\n      }\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Sparkle Ponies\",\n      \"key_label\": \"API Key for Sparkle Ponies Subaccount\",\n      \"key_grants\": [\"smtp/inject\", \"sending_domains/manage\", \"message_events/view\", \"suppression_lists/manage\", \"tracking_domains/view\", \"tracking_domains/manage\", \"webhooks/modify\", \"webhooks/view\"],\n      \"key_valid_ips\": [],\n      \"ip_pool\": \"\",\n      \"options\": {\n          \"deliverability\": true\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"400"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"`name` is a required field\",\n              \"param\": \"name\",\n              \"value\": null\n          },\n          {\n              \"message\": \"`key_label` is a required field\",\n              \"param\": \"key_label\",\n              \"value\": null\n          },\n          {\n              \"message\": \"`key_grants` is a required field\",\n              \"param\": \"key_grants\",\n              \"value\": null\n          },\n          {\n              \"message\": \"Invalid `key_grants value`. Supported values are: 'smtp/inject', 'sending_domains/manage', 'message_events/view', 'suppression_lists/manage'\",\n              \"param\": \"key_grants\",\n              \"value\": null\n          },\n          {\n              \"message\": \"`key_valid_ips` must be an Array\",\n              \"param\": \"key_valid_ips\",\n              \"value\": null\n          },\n          {\n              \"message\": \"`key_valid_ips` must have valid netmask values\",\n              \"param\": \"key_valid_ips\",\n              \"value\": null\n          },\n          {\n              \"message\": \"ip_pool must be 20 characters or less\",\n              \"param\": \"ip_pool\",\n              \"value\": \"an_ip_pool_name_that_is_too_long\"\n          },\n          {\n              \"message\": \"ip_pool must be alphanumeric and underscore\",\n              \"param\": \"ip_pool\",\n              \"value\": \"$invalid chars\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Retrieve a Subaccount"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts/{id}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Retrieve a Subaccount"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts/{id}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"integer"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"123"}}}]}},"content":[{"element":"copy","content":"This endpoint only returns information about the subaccount, not the resources associated with it."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"id\": 123,\n          \"name\": \"Joes Garage\",\n          \"status\": \"active\",\n          \"compliance_status\": \"active\",\n          \"ip_pool\": \"assigned_ip_pool\",\n          \"options\": {\n              \"deliverability\": false\n          }\n      }\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Update a subaccount"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts/{id}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Update a subaccount"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts/{id}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"integer"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"123"}}}]}},"content":[{"element":"copy","content":"<DataStructure id=\"0d4073b5c4d3a8c388255052fa0a4d14\"  ></DataStructure>"},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Hey Joe! Garage and Parts\",\n      \"status\": \"suspended\",\n      \"ip_pool\": \"\"\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"message\": \"Successfully updated subaccount information\"\n      }\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Hey Joe! Garage and Parts\",\n      \"status\": \"suspended\",\n      \"ip_pool\": \"\"\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"400"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"ip_pool must be 20 characters or less\",\n              \"param\": \"ip_pool\",\n              \"value\": \"an_ip_pool_name_that_is_too_long\"\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"options\": {\n          \"deliverability\": true\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"message\": \"Successfully updated subaccount information\"\n      }\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"List Subaccounts"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"List Subaccounts"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"description":{"element":"string","content":"Filters subaccounts to those with the option enabled."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"option"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"deliverability"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"A cursor provided in the `links` object of a page of results, used to get the next page of results. Set this parameter to `initial` to retrieve the first page of results. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"cursor"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Limits the number of subaccounts that are returned in the `results` object. The maximum allowed value is 100. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"number"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"per_page"},"value":{"element":"string","attributes":{"default":{"element":"string","content":"25"}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Sorts results by the specified property. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"sort_by"},"value":{"element":"enum","attributes":{"default":{"element":"enum","content":{"element":"string","content":"created_at"}},"enumerations":{"element":"array","content":[{"element":"string","content":"created_at"},{"element":"string","content":"updated_at"},{"element":"string","content":"id"},{"element":"string","content":"name"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Returns subaccounts in the specified order based on the `sort_by` parameter. `asc` returns results in ascending order, `desc` returns results in descending order. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"order"},"value":{"element":"enum","attributes":{"default":{"element":"enum","content":{"element":"string","content":"desc"}},"enumerations":{"element":"array","content":[{"element":"string","content":"asc"},{"element":"string","content":"desc"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Returns only subaccounts that are assigned to the IP pool with the ID passed in this parameter. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"ip_pool"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Returns only subaccounts with the specified status. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"status"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"active"},{"element":"string","content":"suspended"},{"element":"string","content":"terminated"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Returns subaccounts whose name includes the string passed in the parameter. May return false positives. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Returns only subaccounts with the IDs included in the comma separated list in the parameter. Passing this parameter will cause results to be [paginated](#header-pagination)."},"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"optional"}]}},"content":{"key":{"element":"string","content":"ids"},"value":{"element":"string","content":"1,2,3,4"}}}]}},"content":[{"element":"copy","content":"Returns a list of your subaccounts. Passing certain query parameters will cause results to be [paginated](#header-pagination)."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": [\n          {\n              \"id\": 123,\n              \"name\": \"Joe's Garage\",\n              \"status\": \"active\",\n              \"ip_pool\": \"my_ip_pool\",\n              \"compliance_status\": \"active\",\n              \"options\": {\n                  \"deliverability\": true\n              }\n          },\n          {\n              \"id\": 456,\n              \"name\": \"SharkPost\",\n              \"status\": \"active\",\n              \"compliance_status\": \"active\",\n              \"options\": {\n                  \"deliverability\": true\n              }\n\n          },\n          {\n              \"id\": 789,\n              \"name\": \"Dev Avocado\",\n              \"status\": \"suspended\",\n              \"compliance_status\": \"active\",\n              \"options\": {\n                  \"deliverability\": true\n              }\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Retrieve Subaccounts Summary"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts/summary"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Retrieve Subaccounts Summary"}},"attributes":{"href":{"element":"string","content":"/v1/subaccounts/summary"}},"content":[{"element":"copy","content":"Returns the total number of subaccounts."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"total\": 46\n      }\n  }\n"}]}]}]}]}]},{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"dataStructures"}]}},"content":[{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"72f915567854ea5cdf73b9bca02288af"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"A page of subaccount objects that match the search parameters."}},"content":{"key":{"element":"string","content":"results"},"value":{"element":"array"}}},{"element":"member","meta":{"description":{"element":"string","content":"The total number of subaccounts that match the search parameters."}},"content":{"key":{"element":"string","content":"total_count"},"value":{"element":"number"}}},{"element":"member","content":{"key":{"element":"string","content":"links"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"  A URL that can be used to retrieve the next page of results. Will be prefilled with the appropriate value for the `cursor` query parameter, as well as any other filters supplied with the original request."}},"content":{"key":{"element":"string","content":"next"},"value":{"element":"string"}}}]}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"8078a9d77ae944a444246101be33506e"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Unique ID for the subaccount."}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"number"}}},{"element":"member","meta":{"description":{"element":"string","content":"Subaccount display name. <br />Max length: 64 characters"}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Status of the subaccount. Learn about the affects of each status in our [subaccount guide](https://www.sparkpost.com/docs/user-guide/subaccounts/#primary-account-managing-subaccounts)."}},"content":{"key":{"element":"string","content":"status"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"active"},{"element":"string","content":"suspended"},{"element":"string","content":"terminated"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Compliance status of the subaccount."}},"content":{"key":{"element":"string","content":"compliance_status"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  The ID of an IP Pool in which to restrict this subaccount's mail deliveries. If the supplied `ip_pool` is a empty or not present, this subaccount may use any of the account's IP Pools.\n  <br/><a href=\"https://www.sparkpost.com/enterprise-email/\"><span class=\"label label-warning\"><strong>Enterprise</strong></span></a></strong> customers: please consult with your TAM on IP management."}},"content":{"key":{"element":"string","content":"ip_pool"},"value":{"element":"string"}}},{"element":"member","content":{"key":{"element":"string","content":"options"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"  <a href=\"https://www.sparkpost.com/features/email-deliverability/\"><span class=\"label label-warning\">Deliverability Add-On</span></a> Whether the subaccount has access to deliverability features."}},"content":{"key":{"element":"string","content":"deliverability"},"value":{"element":"boolean"}}}]}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"dadf32cd8832727ef8f1be2c1a15b7a1"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Subaccount display name. <br />Max length: 64 characters"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  The ID of an IP Pool in which to restrict this subaccount's mail deliveries. If the supplied `ip_pool` is a empty or not present, this subaccount may use any of the account's IP Pools.\n  <br/><a href=\"https://www.sparkpost.com/enterprise-email/\"><span class=\"label label-warning\"><strong>Enterprise</strong></span></a></strong> customers: please consult with your TAM on IP management."}},"content":{"key":{"element":"string","content":"ip_pool"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Whether or not to create an API key for the subaccount. An API key can be created a later time."}},"content":{"key":{"element":"string","content":"setup_api_key"},"value":{"element":"boolean","attributes":{"default":{"element":"boolean","content":true}}}}},{"element":"member","meta":{"description":{"element":"string","content":"  User friendly identifier for the initial subaccount api key. Required if `setup_api_key` is true."}},"content":{"key":{"element":"string","content":"key_label"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  List of grants to give to the initial subaccount api key. Required if `setup_api_key` is true.\n\nValid values are: `smtp/inject`, `sending_domains/manage`, `tracking_domains/view`, `tracking_domains/manage`, `message_events/view`, `suppression_lists/manage`, `transmissions/view`, `transmissions/modify`, `webhooks/view`, `webhooks/modify`"}},"content":{"key":{"element":"string","content":"key_grants"},"value":{"element":"array","content":[{"element":"string"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"  List of IP's that the initial subaccount API key can be used from. If not supplied, the API key will be usable from any IP address."}},"content":{"key":{"element":"string","content":"key_valid_ips"},"value":{"element":"array"}}},{"element":"member","meta":{"description":{"element":"string","content":"subaccount-level options."}},"content":{"key":{"element":"string","content":"options"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"  <a href=\"https://www.sparkpost.com/features/email-deliverability/\"><span class=\"label label-warning\">Deliverability Add-On</span></a> Whether the subaccount has access to deliverability features."}},"content":{"key":{"element":"string","content":"deliverability"},"value":{"element":"boolean"}}}]}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"0d4073b5c4d3a8c388255052fa0a4d14"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Subaccount display name. <br />Max length: 64 characters"}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Status of the subaccount. Learn about the affects of each status in our [subaccount guide](https://www.sparkpost.com/docs/user-guide/subaccounts/#primary-account-managing-subaccounts)."}},"content":{"key":{"element":"string","content":"status"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"active"},{"element":"string","content":"suspended"},{"element":"string","content":"terminated"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"  The ID of an IP Pool in which to restrict this subaccount's mail deliveries. To unassign the current IP Pool, provide an empty string.\n  <br/><a href=\"https://www.sparkpost.com/enterprise-email/\"><span class=\"label label-warning\"><strong>Enterprise</strong></span></a></strong> customers: please consult with your TAM on IP management."}},"content":{"key":{"element":"string","content":"ip_pool"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"subaccount-level options."}},"content":{"key":{"element":"string","content":"options"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"  <a href=\"https://www.sparkpost.com/features/email-deliverability/\"><span class=\"label label-warning\">Deliverability Add-On</span></a> Whether the subaccount has access to deliverability features."}},"content":{"key":{"element":"string","content":"deliverability"},"value":{"element":"boolean"}}}]}}}]}}]}]},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":10667},{"element":"number","content":52}]}]}]}},"content":"the resource '/v1/subaccounts/{id}' is already defined"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'option' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'cursor' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'per_page' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'sort_by' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'order' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'ip_pool' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'status' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'name' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"parameter 'ids' is not found within the URI template '/v1/subaccounts' for 'List Subaccounts' "},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12111},{"element":"number","content":44}]}]}]}},"content":"the resource '/v1/subaccounts' is already defined"}]},"TableOfContents":[{"anchor":"#subaccounts","title":"Subaccounts","children":[{"anchor":"#header-terminology","title":"Terminology"},{"anchor":"#header-the-x-msys-subaccount-header","title":"The X-MSYS-SUBACCOUNT header"},{"anchor":"#header-pagination","title":"Pagination"},{"anchor":"#header-subaccount-object","title":"Subaccount object"},{"anchor":"#subaccounts-create-a-subaccount","title":"Create a Subaccount","children":[{"anchor":"#subaccounts-post-create-a-subaccount","title":"Create a Subaccount"}]},{"anchor":"#subaccounts-retrieve-a-subaccount","title":"Retrieve a Subaccount","children":[{"anchor":"#subaccounts-get-retrieve-a-subaccount","title":"Retrieve a Subaccount"}]},{"anchor":"#subaccounts-update-a-subaccount","title":"Update a subaccount","children":[{"anchor":"#subaccounts-put-update-a-subaccount","title":"Update a subaccount"}]},{"anchor":"#subaccounts-list-subaccounts","title":"List Subaccounts","children":[{"anchor":"#subaccounts-get-list-subaccounts","title":"List Subaccounts"}]},{"anchor":"#subaccounts-retrieve-subaccounts-summary","title":"Retrieve Subaccounts Summary","children":[{"anchor":"#subaccounts-get-retrieve-subaccounts-summary","title":"Retrieve Subaccounts Summary"}]}]}],"meta":{"title":"Subaccounts API","description":"Manage subaccounts, a way for service providers to provision and manage customers.","full":false},"fields":{"path":"/api/subaccounts/"}}},"pageContext":{"file":"subaccounts.apib"}},"staticQueryHashes":["1319884646","1428769721","3859448388"]}