{"componentChunkName":"component---src-templates-api-js","path":"/api/users/","result":{"data":{"allApiBlueprint":{"edges":[{"node":{"meta":{"title":"Bounce Domains API","label":null},"fields":{"path":"/api/bounce-domains/","file":"bounce-domains.apib"}}},{"node":{"meta":{"title":"Account API","label":null},"fields":{"path":"/api/account/","file":"account.apib"}}},{"node":{"meta":{"title":"A/B Testing API","label":null},"fields":{"path":"/api/ab-testing/","file":"ab-testing.apib"}}},{"node":{"meta":{"title":"Data Privacy API","label":null},"fields":{"path":"/api/data-privacy/","file":"data-privacy.apib"}}},{"node":{"meta":{"title":"Ingest API","label":"Private Access"},"fields":{"path":"/api/events-ingest/","file":"events-ingest.apib"}}},{"node":{"meta":{"title":"Events API","label":null},"fields":{"path":"/api/events/","file":"events.apib"}}},{"node":{"meta":{"title":"Inbound Domains API","label":null},"fields":{"path":"/api/inbound-domains/","file":"inbound-domains.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":"IP Pools API","label":null},"fields":{"path":"/api/ip-pools/","file":"ip-pools.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 Lists API","label":null},"fields":{"path":"/api/recipient-lists/","file":"recipient-lists.apib"}}},{"node":{"meta":{"title":"Recipient Validation API","label":null},"fields":{"path":"/api/recipient-validation/","file":"recipient-validation.apib"}}},{"node":{"meta":{"title":"Seed List API","label":"Deliverability"},"fields":{"path":"/api/seed-list/","file":"seed-list.apib"}}},{"node":{"meta":{"title":"Relay Webhooks API","label":null},"fields":{"path":"/api/relay-webhooks/","file":"relay-webhooks.apib"}}},{"node":{"meta":{"title":"Sending IPs API","label":null},"fields":{"path":"/api/sending-ips/","file":"sending-ips.apib"}}},{"node":{"meta":{"title":"SMTP API","label":null},"fields":{"path":"/api/smtp/","file":"smtp.apib"}}},{"node":{"meta":{"title":"Snippets API","label":null},"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":"Templates API","label":null},"fields":{"path":"/api/templates/","file":"templates.apib"}}},{"node":{"meta":{"title":"Tracking Domains API","label":null},"fields":{"path":"/api/tracking-domains/","file":"tracking-domains.apib"}}},{"node":{"meta":{"title":"Usage API","label":null},"fields":{"path":"/api/usage/","file":"usage.apib"}}},{"node":{"meta":{"title":"Transmissions API","label":null},"fields":{"path":"/api/transmissions/","file":"transmissions.apib"}}},{"node":{"meta":{"title":"Users API","label":"New"},"fields":{"path":"/api/users/","file":"users.apib"}}},{"node":{"meta":{"title":"Event Webhooks API","label":null},"fields":{"path":"/api/webhooks/","file":"webhooks.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":"Users API"}}},{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"description"},"value":{"element":"string","content":"Manage the users on your SparkPost account, the roles they hold, and the subaccounts they can access."}}},{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"label"},"value":{"element":"string","content":"New"}}}]}},"content":[{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"resourceGroup"}]},"title":{"element":"string","content":"Users"}},"content":[{"element":"copy","content":"A user is a person who signs in to your SparkPost account. Every user is scoped either to the primary account, where a single [role](#header-roles) sets what they can do, or to one or more subaccounts, where they hold a role on each. Use this API to list users, invite new ones, change their roles, and remove them.\n\n### Roles\n\nThe `access_level` field sets a user's role when you invite or update them. The primary-account roles are:\n\n| Role        | Description                                                               |\n| ----------- | ------------------------------------------------------------------------- |\n| `admin`     | Full access to the account, including user and billing management.        |\n| `developer` | Access to sending and configuration APIs, without account administration. |\n| `reporting` | Read-only access to reporting and analytics.                              |\n| `templates` | Access limited to managing templates.                                     |\n| `custom`    | A role whose permissions are defined by the `access_policies` you supply. |\n\nSubaccount-scoped users take `subaccount_reporting` or `subaccount_developer` instead.\n\n### Access policies\n\nA user with the `custom` role gets exactly the policies you list in `access_policies`. The field is valid only when `access_level` is `custom`.\n\n| Policy                      | Grants                                                                                                                                       |\n| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `alerts/full`               | View and manage alerts.                                                                                                                      |\n| `api_keys/full`             | Manage API keys.                                                                                                                             |\n| `ab_testing/full`           | View and manage A/B tests of email templates.                                                                                                |\n| `domains/full`              | View and manage sending, bounce, and tracking domains.                                                                                       |\n| `events/read`               | View and search message events.                                                                                                              |\n| `ip_pools/full`             | View and manage IP pools.                                                                                                                    |\n| `recipient_lists/full`      | View and manage recipient lists.                                                                                                             |\n| `recipient_validation/full` | Validate email addresses and view recent validations.                                                                                        |\n| `seeds/full`                | View seeding activity and manage seed list settings.                                                                                         |\n| `signals_analytics/full`    | View and manage analytics metrics, dashboards, and reports, including health score, spam traps, engagement recency, and blocklist incidents. |\n| `subaccounts/full`          | Manage subaccounts.                                                                                                                          |\n| `suppressions/full`         | View and manage suppressions.                                                                                                                |\n| `templates/full`            | View, manage, and preview email templates and snippets.                                                                                      |\n| `users/full`                | View and manage users.                                                                                                                       |\n| `webhooks/full`             | View, manage, and test webhooks.                                                                                                             |\n\n### User object\n\nReturned by [List Users](#header-list-users) and [Retrieve a User](#header-retrieve-a-user).\n\nA primary-account user has an `access_level`. A subaccount-scoped user has none, and holds a role on each subaccount instead.\n\n<DataStructure id=\"3a589c30d180e27f4dcee4c9e3e6cd8f\"  title=\"Attributes\"  sample=\"%7B%0A%20%20%20%20%22username%22%3A%20%22grace%22%2C%0A%20%20%20%20%22first_name%22%3A%20%22Grace%22%2C%0A%20%20%20%20%22last_name%22%3A%20%22Hopper%22%2C%0A%20%20%20%20%22email%22%3A%20%22grace@example.com%22%2C%0A%20%20%20%20%22access_level%22%3A%20%22reporting%22%2C%0A%20%20%20%20%22is_sso%22%3A%20false%2C%0A%20%20%20%20%22email_verified%22%3A%20true%2C%0A%20%20%20%20%22tfa_enabled%22%3A%20true%2C%0A%20%20%20%20%22last_login%22%3A%20%222026-08-02T09%3A14%3A05.000Z%22%2C%0A%20%20%20%20%22created%22%3A%20%222015-01-11T08%3A00%3A00.000Z%22%2C%0A%20%20%20%20%22updated%22%3A%20%222018-04-11T08%3A00%3A00.000Z%22%2C%0A%20%20%20%20%22subaccounts%22%3A%20%5B%5D%0A%7D\"></DataStructure>\n\n### Subaccount access object\n\nEach object in a user's `subaccounts` array describes one subaccount the user has access to, and the user's role on it.\n\n<DataStructure id=\"8b58884cf33d0043ad6f878ca4d8bcfa\"  title=\"Attributes\"  sample=\"%7B%0A%20%20%20%20%22subaccount_id%22%3A%20123%2C%0A%20%20%20%20%22subaccount_name%22%3A%20%22Joe%27s%20Garage%22%2C%0A%20%20%20%20%22access_level%22%3A%20%22subaccount_reporting%22%2C%0A%20%20%20%20%22status%22%3A%20%22active%22%0A%7D\"></DataStructure>\n\n### Invite object\n\nReturned by [List Pending Invites](#header-list-pending-invites).\n\n<DataStructure id=\"ea21769480293689d808732c7422837a\"  title=\"Attributes\"  sample=\"%7B%0A%20%20%20%20%22id%22%3A%20%223f2504e0-4f89-41d3-9a0c-0305e82c3301%22%2C%0A%20%20%20%20%22email%22%3A%20%22newuser@example.com%22%2C%0A%20%20%20%20%22from%22%3A%20%22ada@example.com%22%2C%0A%20%20%20%20%22access_level%22%3A%20%22reporting%22%2C%0A%20%20%20%20%22expires%22%3A%20%222024-07-11T00%3A00%3A00.000Z%22%0A%7D\"></DataStructure>\n\n### Subaccount invite object\n\nEach object in the `subaccounts` array of an [Invite a User](#header-invite-a-user) request grants the invitee access to one subaccount, with the role you set.\n\n<DataStructure id=\"98b4991649c849aa0be5db05fc3b3ded\"  title=\"Attributes\"  sample=\"%7B%0A%20%20%20%20%22subaccount_id%22%3A%20123%2C%0A%20%20%20%20%22access_level%22%3A%20%22subaccount_reporting%22%0A%7D\"></DataStructure>\n\n### Invite lifecycle\n\nAn invite expires three days after you create it. The registration link then stops working, and the invite drops off [List Pending Invites](#header-list-pending-invites).\n\nTo give someone another chance to register, [invite the same email address again](#header-invite-a-user). That creates a second, independent invite with its own expiry. The first one keeps working until it expires or you [revoke it](#header-revoke-a-pending-invite)."},{"element":"resource","meta":{"title":{"element":"string","content":"Invite a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/invite"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Invite a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/invite"}},"content":[{"element":"copy","content":"Creates an invite and emails a registration link to the address you supply. The invitee follows the link, sets their own password, and gets the role you set in `access_level`. The response carries the invite `id`, which you use to [list](#header-list-pending-invites) and [revoke](#header-revoke-a-pending-invite) the invite.\n\nSend `access_level` to invite a primary-account user, or `subaccounts` to invite a subaccount-scoped one.\n\nOn an account with SAML single sign-on enabled, there is no password to set, so this endpoint skips the invite and creates the user immediately with `is_sso` true. The email tells the user to sign in through your identity provider. The single sign-on path differs in three ways:\n\n-   The response carries the new `username` instead of an invite `id`.\n\n-   Nothing appears in [List Pending Invites](#header-list-pending-invites), so there is nothing to revoke. To take the access back, [delete the user](#header-delete-a-user).\n\n-   Inviting an address that already belongs to a user returns `200` with that user's `username`.\n\nTo give a password login to someone outside your identity provider, such as a client who needs only a subaccount, send `bypass_sso: true` together with `subaccounts`. The call then creates a regular invite with a registration link. `bypass_sso` is rejected on a primary-account invite.\n\n<DataStructure id=\"cf5a0c954a3e5a0692a2da694a37c654\"  ></DataStructure>"},{"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      \"email\": \"newuser@example.com\",\n      \"access_level\": \"reporting\"\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          \"id\": \"3f2504e0-4f89-41d3-9a0c-0305e82c3301\"\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      \"email\": \"newuser@example.com\",\n      \"access_level\": \"reporting\"\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          \"username\": \"newuser\"\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      \"email\": \"newuser@example.com\",\n      \"access_level\": \"reporting\"\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\": \"email is a required parameter\",\n              \"param\": \"email\",\n              \"value\": null\n          }\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      \"email\": \"newuser@example.com\",\n      \"access_level\": \"reporting\"\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"403"},"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\": \"An admin-level user cannot be invited through the API.\"\n          }\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      \"email\": \"newuser@example.com\",\n      \"access_level\": \"reporting\"\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"429"},"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\": \"Too many invite requests. Please try again later.\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"List Pending Invites"}},"attributes":{"href":{"element":"string","content":"/v1/users/pending-invites"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"List Pending Invites"}},"attributes":{"href":{"element":"string","content":"/v1/users/pending-invites"}},"content":[{"element":"copy","content":"Returns the invites on your account that nobody has accepted yet, each in the [Invite object](#header-invite-object) shape. Expired invites do not appear."},{"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\": \"3f2504e0-4f89-41d3-9a0c-0305e82c3301\",\n              \"email\": \"newuser@example.com\",\n              \"from\": \"ada@example.com\",\n              \"access_level\": \"reporting\",\n              \"expires\": \"2024-07-11T00:00:00.000Z\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Revoke a Pending Invite"}},"attributes":{"href":{"element":"string","content":"/v1/users/pending-invites/{id}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Revoke a Pending Invite"}},"attributes":{"href":{"element":"string","content":"/v1/users/pending-invites/{id}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"3f2504e0-4f89-41d3-9a0c-0305e82c3301"}}}]}},"content":[{"element":"copy","content":"Revokes a pending invite. Its registration link stops working immediately."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"204"}}}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"404"},"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\": \"Resource could not be found\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"List Users"}},"attributes":{"href":{"element":"string","content":"/v1/users"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"List Users"}},"attributes":{"href":{"element":"string","content":"/v1/users"}},"content":[{"element":"copy","content":"Returns the users on your account, each in the [User object](#header-user-object) shape."},{"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              \"username\": \"ada\",\n              \"first_name\": \"Ada\",\n              \"last_name\": \"Lovelace\",\n              \"email\": \"ada@example.com\",\n              \"access_level\": \"admin\",\n              \"is_sso\": false,\n              \"email_verified\": true,\n              \"tfa_enabled\": false,\n              \"last_login\": \"2026-07-28T14:22:31.000Z\"\n          },\n          {\n              \"username\": \"katherine\",\n              \"first_name\": \"Katherine\",\n              \"last_name\": \"Johnson\",\n              \"email\": \"katherine@example.com\",\n              \"access_level\": \"custom\",\n              \"access_policies\": [\n                  \"templates/full\",\n                  \"events/read\",\n                  \"signals_analytics/full\"\n              ],\n              \"is_sso\": false,\n              \"email_verified\": true,\n              \"tfa_enabled\": true,\n              \"last_login\": null\n          }\n      ]\n  }\n"}]}]},{"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":"403"},"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\": \"Forbidden\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Retrieve a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Retrieve a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"username"},"value":{"element":"string","content":"grace"}}}]}},"content":[{"element":"copy","content":"Returns one user by username, in the [User object](#header-user-object) shape."},{"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          \"username\": \"grace\",\n          \"first_name\": \"Grace\",\n          \"last_name\": \"Hopper\",\n          \"email\": \"grace@example.com\",\n          \"access_level\": \"reporting\",\n          \"is_sso\": false,\n          \"email_verified\": true,\n          \"tfa_enabled\": true,\n          \"last_login\": \"2026-08-02T09:14:05.000Z\",\n          \"created\": \"2015-01-11T08:00:00.000Z\",\n          \"updated\": \"2018-04-11T08:00:00.000Z\",\n          \"subaccounts\": []\n      }\n  }\n"}]}]},{"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":"  A subaccount-scoped user.\n\n  {\n      \"results\": {\n          \"username\": \"joe\",\n          \"first_name\": \"Joe\",\n          \"last_name\": \"Mechanic\",\n          \"email\": \"joe@example.com\",\n          \"is_sso\": false,\n          \"email_verified\": true,\n          \"tfa_enabled\": false,\n          \"last_login\": null,\n          \"created\": \"2015-01-11T08:00:00.000Z\",\n          \"updated\": \"2018-04-11T08:00:00.000Z\",\n          \"subaccounts\": [\n              {\n                  \"subaccount_id\": 123,\n                  \"subaccount_name\": \"Joe's Garage\",\n                  \"access_level\": \"subaccount_reporting\",\n                  \"status\": \"active\"\n              }\n          ]\n      }\n  }\n"}]}]},{"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":"404"},"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\": \"Resource could not be found\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Update a User's Role"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Update a User's Role"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"username"},"value":{"element":"string","content":"grace"}}}]}},"content":[{"element":"copy","content":"Changes a primary-account user's [role](#header-roles), and the [access policies](#header-access-policies) that go with a `custom` role. No other field on a user can be changed through the API.\n\n<DataStructure id=\"6dbe757013d26232c7fd859246992a36\"  ></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      \"access_level\": \"developer\"\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 modified user grace\"\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      \"access_level\": \"developer\"\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\": \"Cannot change the access level of the last admin user on the account.\"\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      \"access_level\": \"developer\"\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"403"},"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\": \"Only access_level and access_policies can be modified through the API.\"\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      \"access_level\": \"developer\"\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"403"},"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\": \"Admin-level access cannot be granted through the API.\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Delete a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Delete a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"username"},"value":{"element":"string","content":"grace"}}}]}},"content":[{"element":"copy","content":"Deletes a user from your account."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"204"}}}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"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\": \"Cannot delete the last admin user on the account.\"\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"403"},"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\": \"Cannot delete current user.\"\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"404"},"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\": \"Resource could not be found\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Grant Subaccount Access"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}/subaccounts"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Grant Subaccount Access"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}/subaccounts"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"username"},"value":{"element":"string","content":"grace"}}}]}},"content":[{"element":"copy","content":"Grants a user access to a subaccount with the role you set. If the user already has access to that subaccount, the call changes their role instead.\n\nThe user must already have access to at least one subaccount. This endpoint returns `400` for a primary-account user. To give a new person subaccount access, [invite them](#header-invite-a-user) with a `subaccounts` array.\n\n<DataStructure id=\"f3bdd45304a69ace4439b763c20b944d\"  ></DataStructure>"},{"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      \"subaccount_id\": 123,\n      \"access_level\": \"subaccount_reporting\"\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\": \"Subaccount access granted\"\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      \"subaccount_id\": 123,\n      \"access_level\": \"subaccount_reporting\"\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\": \"access_level must be one of: subaccount_reporting, subaccount_developer\"\n          }\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      \"subaccount_id\": 123,\n      \"access_level\": \"subaccount_reporting\"\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":"  The user is not subaccount-scoped.\n\n  {\n      \"errors\": [\n          {\n              \"message\": \"User is not subaccount-scoped\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Revoke Subaccount Access"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}/subaccounts/{subaccountId}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Revoke Subaccount Access"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}/subaccounts/{subaccountId}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"username"},"value":{"element":"string","content":"grace"}}},{"element":"member","meta":{"title":{"element":"string","content":"number"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"subaccountId"},"value":{"element":"string","content":"123"}}}]}},"content":[{"element":"copy","content":"Removes a user's access to a subaccount.\n\nA subaccount-scoped user must keep access to at least one subaccount. Revoking the last one returns `400`. To remove the user from the account entirely, [delete the user](#header-delete-a-user)."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"204"}}}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"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\": \"Cannot delete last subaccount for user\"\n          }\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":"3a589c30d180e27f4dcee4c9e3e6cd8f"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Unique username that identifies the user."}},"content":{"key":{"element":"string","content":"username"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's first name. Only present when the user has set it."}},"content":{"key":{"element":"string","content":"first_name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's last name. Only present when the user has set it."}},"content":{"key":{"element":"string","content":"last_name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's email address."}},"content":{"key":{"element":"string","content":"email"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's [role](#header-roles) on the primary account. Absent for subaccount-scoped users."}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"admin"},{"element":"string","content":"developer"},{"element":"string","content":"reporting"},{"element":"string","content":"templates"},{"element":"string","content":"custom"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"The [access policies](#header-access-policies) granted to the user. Only present when `access_level` is `custom`."}},"content":{"key":{"element":"string","content":"access_policies"},"value":{"element":"array","content":[{"element":"string"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Whether the user signs in through single sign-on."}},"content":{"key":{"element":"string","content":"is_sso"},"value":{"element":"boolean"}}},{"element":"member","meta":{"description":{"element":"string","content":"Whether the user has verified their email address. Always `true` for a single sign-on user, because the identity provider confirms the address."}},"content":{"key":{"element":"string","content":"email_verified"},"value":{"element":"boolean"}}},{"element":"member","meta":{"description":{"element":"string","content":"Whether the user has two-factor authentication enabled."}},"content":{"key":{"element":"string","content":"tfa_enabled"},"value":{"element":"boolean"}}},{"element":"member","meta":{"description":{"element":"string","content":"ISO 8601 timestamp of the user's last sign-in, or `null` if they have never signed in."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"nullable"}]}},"content":{"key":{"element":"string","content":"last_login"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccounts the user has access to, and the user's role on each. See [Subaccount access object](#header-subaccount-access-object). Returned only by [Retrieve a User](#header-retrieve-a-user), and empty for a primary-account user."}},"content":{"key":{"element":"string","content":"subaccounts"},"value":{"element":"array","content":[{"element":"object"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"ISO 8601 timestamp of when the user was created. Returned only by [Retrieve a User](#header-retrieve-a-user)."}},"content":{"key":{"element":"string","content":"created"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"ISO 8601 timestamp of when the user was last updated. Returned only by [Retrieve a User](#header-retrieve-a-user)."}},"content":{"key":{"element":"string","content":"updated"},"value":{"element":"string"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"8b58884cf33d0043ad6f878ca4d8bcfa"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"The subaccount ID."}},"content":{"key":{"element":"string","content":"subaccount_id"},"value":{"element":"number"}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccount's display name."}},"content":{"key":{"element":"string","content":"subaccount_name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's [role](#header-roles) on the subaccount."}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"subaccount_reporting"},{"element":"string","content":"subaccount_developer"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccount's status. Returned only by [Retrieve a User](#header-retrieve-a-user)."}},"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":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"ea21769480293689d808732c7422837a"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Unique ID of the pending invite."}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The email address the invite was sent to."}},"content":{"key":{"element":"string","content":"email"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The email address of the user who created the invite."}},"content":{"key":{"element":"string","content":"from"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The [role](#header-roles) the user gets when they register."}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"admin"},{"element":"string","content":"developer"},{"element":"string","content":"reporting"},{"element":"string","content":"templates"},{"element":"string","content":"custom"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"The [access policies](#header-access-policies) the user gets when they register, if `access_level` is `custom`."}},"content":{"key":{"element":"string","content":"access_policies"},"value":{"element":"array","content":[{"element":"string"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccount access the user gets when they register. See [Subaccount invite object](#header-subaccount-invite-object). Present instead of `access_level` for a subaccount-scoped invite."}},"content":{"key":{"element":"string","content":"subaccounts"},"value":{"element":"array","content":[{"element":"object"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"ISO 8601 timestamp of when the invite expires."}},"content":{"key":{"element":"string","content":"expires"},"value":{"element":"string"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"98b4991649c849aa0be5db05fc3b3ded"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"The subaccount ID."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"subaccount_id"},"value":{"element":"number"}}},{"element":"member","meta":{"description":{"element":"string","content":"The [role](#header-roles) to grant on the subaccount."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"subaccount_reporting"},{"element":"string","content":"subaccount_developer"}]}}}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"cf5a0c954a3e5a0692a2da694a37c654"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Email address of the person to invite. Maximum 512 characters."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"email"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The primary-account [role](#header-roles) to assign. Required unless `subaccounts` is supplied. `admin` cannot be set through the API."}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"developer"},{"element":"string","content":"reporting"},{"element":"string","content":"templates"},{"element":"string","content":"custom"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"The [access policies](#header-access-policies) to grant. Valid only when `access_level` is `custom`."}},"content":{"key":{"element":"string","content":"access_policies"},"value":{"element":"array","content":[{"element":"string"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Invite the user with access to one or more subaccounts instead of the primary account. Between 1 and 25 entries. For a full description, see [Subaccount invite object](#header-subaccount-invite-object)."}},"content":{"key":{"element":"string","content":"subaccounts"},"value":{"element":"array","content":[{"element":"object"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"On an account with single sign-on, create a regular invite with a registration link instead of a single sign-on user. Valid only together with `subaccounts`."}},"content":{"key":{"element":"string","content":"bypass_sso"},"value":{"element":"boolean"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"6dbe757013d26232c7fd859246992a36"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"The primary-account [role](#header-roles) to assign. `admin` cannot be set through the API."}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"developer"},{"element":"string","content":"reporting"},{"element":"string","content":"templates"},{"element":"string","content":"custom"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"The [access policies](#header-access-policies) to grant. Valid only when `access_level` is `custom`."}},"content":{"key":{"element":"string","content":"access_policies"},"value":{"element":"array","content":[{"element":"string"}]}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"f3bdd45304a69ace4439b763c20b944d"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"The subaccount to grant access to."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"subaccount_id"},"value":{"element":"number"}}},{"element":"member","meta":{"description":{"element":"string","content":"The [role](#header-roles) to grant on the subaccount."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"access_level"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"subaccount_reporting"},{"element":"string","content":"subaccount_developer"}]}}}}}]}}]}]},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":10},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":14135},{"element":"number","content":29}]}]}]}},"content":"message-body asset is expected to be a pre-formatted code block, every of its line indented by exactly 8 spaces or 2 tabs"},{"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":15112},{"element":"number","content":53}]}]}]}},"content":"the resource '/v1/users/{username}' is already defined"},{"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":16639},{"element":"number","content":49}]}]}]}},"content":"the resource '/v1/users/{username}' is already defined"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":10},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":18904},{"element":"number","content":38}]}]}]}},"content":"message-body asset is expected to be a pre-formatted code block, every of its line indented by exactly 8 spaces or 2 tabs"}]},"TableOfContents":[{"anchor":"#users","title":"Users","children":[{"anchor":"#header-roles","title":"Roles"},{"anchor":"#header-access-policies","title":"Access policies"},{"anchor":"#header-user-object","title":"User object"},{"anchor":"#header-subaccount-access-object","title":"Subaccount access object"},{"anchor":"#header-invite-object","title":"Invite object"},{"anchor":"#header-subaccount-invite-object","title":"Subaccount invite object"},{"anchor":"#header-invite-lifecycle","title":"Invite lifecycle"},{"anchor":"#users-invite-a-user","title":"Invite a User","children":[{"anchor":"#users-post-invite-a-user","title":"Invite a User"}]},{"anchor":"#users-list-pending-invites","title":"List Pending Invites","children":[{"anchor":"#users-get-list-pending-invites","title":"List Pending Invites"}]},{"anchor":"#users-revoke-a-pending-invite","title":"Revoke a Pending Invite","children":[{"anchor":"#users-delete-revoke-a-pending-invite","title":"Revoke a Pending Invite"}]},{"anchor":"#users-list-users","title":"List Users","children":[{"anchor":"#users-get-list-users","title":"List Users"}]},{"anchor":"#users-retrieve-a-user","title":"Retrieve a User","children":[{"anchor":"#users-get-retrieve-a-user","title":"Retrieve a User"}]},{"anchor":"#users-update-a-user-s-role","title":"Update a User's Role","children":[{"anchor":"#users-put-update-a-user-s-role","title":"Update a User's Role"}]},{"anchor":"#users-delete-a-user","title":"Delete a User","children":[{"anchor":"#users-delete-delete-a-user","title":"Delete a User"}]},{"anchor":"#users-grant-subaccount-access","title":"Grant Subaccount Access","children":[{"anchor":"#users-post-grant-subaccount-access","title":"Grant Subaccount Access"}]},{"anchor":"#users-revoke-subaccount-access","title":"Revoke Subaccount Access","children":[{"anchor":"#users-delete-revoke-subaccount-access","title":"Revoke Subaccount Access"}]}]}],"meta":{"title":"Users API","description":"Manage the users on your SparkPost account, the roles they hold, and the subaccounts they can access.","full":false},"fields":{"path":"/api/users/"}}},"pageContext":{"file":"users.apib"}},"staticQueryHashes":["1319884646","1428769721","3859448388"]}