{"componentChunkName":"component---src-templates-api-js","path":"/api/users/","result":{"data":{"allApiBlueprint":{"edges":[{"node":{"meta":{"title":"Data Privacy API","label":"New"},"fields":{"path":"/api/data-privacy/","file":"data-privacy.apib"}}},{"node":{"meta":{"title":"Bounce Domains API","label":null},"fields":{"path":"/api/bounce-domains/","file":"bounce-domains.apib"}}},{"node":{"meta":{"title":"Ingest API","label":"Private Access"},"fields":{"path":"/api/events-ingest/","file":"events-ingest.apib"}}},{"node":{"meta":{"title":"Account API","label":null},"fields":{"path":"/api/account/","file":"account.apib"}}},{"node":{"meta":{"title":"Events API","label":null},"fields":{"path":"/api/events/","file":"events.apib"}}},{"node":{"meta":{"title":"API Overview","label":null},"fields":{"path":"/api/","file":"index.apib"}}},{"node":{"meta":{"title":"Inbound Domains API","label":null},"fields":{"path":"/api/inbound-domains/","file":"inbound-domains.apib"}}},{"node":{"meta":{"title":"Labs APIs","label":null},"fields":{"path":"/api/labs/","file":"labs.apib"}}},{"node":{"meta":{"title":"IP Pools API","label":null},"fields":{"path":"/api/ip-pools/","file":"ip-pools.apib"}}},{"node":{"meta":{"title":"Automatic Inline Seeding","label":"Deliverability"},"fields":{"path":"/api/inline-seeds/","file":"inline-seeds.apib"}}},{"node":{"meta":{"title":"Message Events API","label":null},"fields":{"path":"/api/message-events/","file":"message-events.apib"}}},{"node":{"meta":{"title":"A/B Testing API","label":"New"},"fields":{"path":"/api/ab-testing/","file":"ab-testing.apib"}}},{"node":{"meta":{"title":"Recipient Validation API","label":"New"},"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":"Sending IPs API","label":null},"fields":{"path":"/api/sending-ips/","file":"sending-ips.apib"}}},{"node":{"meta":{"title":"Snippets API","label":"New"},"fields":{"path":"/api/snippets/","file":"snippets.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":"Suppression List API","label":null},"fields":{"path":"/api/suppression-list/","file":"suppression-list.apib"}}},{"node":{"meta":{"title":"Recipient Lists API","label":null},"fields":{"path":"/api/recipient-lists/","file":"recipient-lists.apib"}}},{"node":{"meta":{"title":"Tracking Domains API","label":null},"fields":{"path":"/api/tracking-domains/","file":"tracking-domains.apib"}}},{"node":{"meta":{"title":"Subaccounts API","label":null},"fields":{"path":"/api/subaccounts/","file":"subaccounts.apib"}}},{"node":{"meta":{"title":"Template Language","label":null},"fields":{"path":"/api/template-language/","file":"template-language.apib"}}},{"node":{"meta":{"title":"Sending Domains API","label":null},"fields":{"path":"/api/sending-domains/","file":"sending-domains.apib"}}},{"node":{"meta":{"title":"Templates API","label":null},"fields":{"path":"/api/templates/","file":"templates.apib"}}},{"node":{"meta":{"title":"Users API","label":null},"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":"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":"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":"Programmatically manage the users on your SparkPost account with an API key."}}}]}},"content":[{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"resourceGroup"}]},"title":{"element":"string","content":"Users"}},"content":[{"element":"copy","content":"The Users API lets you list, invite, update, and remove the users on your account, and manage each user's subaccount access, using an API key rather than the web app.\n\n### Prerequisites\n\nTo call the Users API, an API key must hold one of two grants, and an **admin** must attach the grant to the key through the web app's [API Keys page](https://app.sparkpost.com/account/api-keys). A grant cannot be attached by another API key. Both are `api_key`-role grants.\n\n-   **`Users: View`** — read-only access, covering the `GET` endpoints only: [List Users](#header-list-users), [Retrieve a User](#header-retrieve-a-user), and [List Pending Invites](#header-list-pending-invites).\n\n-   **`Users: Manage`** — full management. Every write endpoint (invite, update, delete, and the subaccount-mapping changes) requires this grant.\n\nRequests made with a key that holds neither grant, or that attempt a write with only `Users: View`, are rejected with `403 Forbidden`.\n\n<Banner status=\"info\">These grants are intentionally narrower than the user management available in the web app. They do <strong>not</strong> cover two-factor authentication, email verification, SCIM provisioning, or password endpoints, and they do not allow direct password-based user creation (see <a href=\"#header-invite-a-user\">Invite a User</a>).</Banner>\n\n### Roles\n\nWhen you invite or update a user you assign a **role** through the `access_level` field. 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 access levels (used only in the `subaccounts` array and in the subaccount-mapping endpoints) are `subaccount_reporting` and `subaccount_developer`.\n\n### Constraints\n\nThe following rules are enforced on every Users API request. They protect against privilege escalation and account lockout:\n\n-   **Role ceiling.** You can never create or invite a user, or raise a user to a role, more privileged than the role of the user who owns the API key. An admin-owned key can assign up to `admin`; a key owned by a less-privileged user is bounded by that user's role.\n\n-   **Last admin protection.** The last `admin` on an account cannot be deleted or demoted through the API. Such a request is rejected with `400`.\n\n-   **Key revocation on owner deletion.** If the admin user who owns a key holding the `Users: Manage` grant is deleted, that key is revoked rather than reassigned to another user.\n\n### User object\n\nReturned by [List Users](#header-list-users).\n\n<DataStructure id=\"a28889828708ebe6c5cce15e8962218e\"  title=\"User\" ></DataStructure>\n\n### Retrieved user object\n\nReturned by [Retrieve a User](#header-retrieve-a-user). This is a richer shape than the [User object](#header-user-object) returned by List Users: it has `first_name` and `last_name` in place of `name`, uses `access_level` for the primary-account role, and adds `created`, `updated`, and an always-present `subaccounts` array.\n\n<DataStructure id=\"75401962413d5e377a2aff9692172f19\"  title=\"RetrievedUser\" ></DataStructure>\n\n### Invite object\n\nReturned by [List Pending Invites](#header-list-pending-invites).\n\n<DataStructure id=\"6dc235c0755824afba96a6855f982909\"  title=\"Invite\" ></DataStructure>\n\n### Invite lifecycle\n\n-   **Invitations expire after 3 days.** Once an invitation expires, its registration link no longer works.\n\n-   **Expired invitations are removed automatically.** They stop appearing in [List Pending Invites](#header-list-pending-invites) once they expire; you do not need to clean them up.\n\n-   **There is no resend.** To give someone another chance to register, [invite the same email address again](#header-invite-a-user). This creates a new, independent invitation with its own token and expiry; the earlier invitation keeps working until it expires or you [revoke it](#header-revoke-a-pending-invite).\n\n-   **Invite creation is rate limited.** If you create invitations too quickly, requests are rejected with `429 Too Many Requests`. Wait before retrying."},{"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."},{"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              \"name\": \"Ada Lovelace\",\n              \"username\": \"ada\",\n              \"email\": \"ada@example.com\",\n              \"access\": \"admin\",\n              \"is_sso\": false,\n              \"email_verified\": true,\n              \"tfa_enabled\": false\n          },\n          {\n              \"name\": \"Grace Hopper\",\n              \"username\": \"grace\",\n              \"email\": \"grace@example.com\",\n              \"access\": \"reporting\",\n              \"is_sso\": false,\n              \"email_verified\": true,\n              \"tfa_enabled\": true\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 a single user by username. The response uses the [Retrieved user object](#header-retrieved-user-object) shape, which differs from the [User object](#header-user-object) returned by List Users."},{"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          \"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          \"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\": \"User does not exist\"\n          }\n      ]\n  }\n"}]}]}]}]},{"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":"There is no direct, password-based user creation through the API — users are created by **invitation** only. This endpoint creates an invitation and emails the invitee a registration link; the invitee completes registration through that link and sets their own password. The invited user's role is set by `access_level` and is bounded by the [role ceiling](#header-constraints).\n\nProvide `access_level` for a primary-account user, or `subaccounts` to invite a subaccount-scoped user. When `subaccounts` is supplied, a top-level `access_level` is not required.\n\nThe response contains the invite `token`.\n\n<Banner status=\"danger\"><strong>Treat the invite <code>token</code> as a credential.</strong> Anyone who holds the token can complete registration as the invited user. Invited users normally complete registration through the emailed link, so you do not need to handle the token yourself; if you do capture it, store and transmit it as securely as you would a password, and never log or share it.</Banner>\n\n-   Data Structure\n\n    -   email (string, required) - Email address of the person to invite. Max length: 512 characters.\n    -   access_level (enum) - The primary-account role to assign. Required unless `subaccounts` is supplied.\n        -   `admin`\n        -   `developer`\n        -   `reporting`\n        -   `templates`\n        -   `custom`\n    -   access_policies (array) - The policies to grant. Only valid when `access_level` is `custom`.\n    -   subaccounts (array) - Invite the user with access to one or more subaccounts instead of the primary account. Between 1 and 25 entries.\n        -   (object)\n            -   subaccount_id (number, required) - The subaccount ID.\n            -   access_level (enum, required) - The subaccount access level.\n                -   `subaccount_reporting`\n                -   `subaccount_developer`"},{"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          \"token\": \"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6\"\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\": \"Forbidden\"\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 invitations on your account that have not yet been accepted. Expired invitations are not included."},{"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\": 1720656000\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 invitation so its registration link can no longer be used."},{"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\": \"User invite ID does not exist\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Update a User"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Update 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":"Changes a user's role. The request accepts only `access_level` (and `access_policies` when `access_level` is `custom`); a request that contains any other field is rejected with `403 Forbidden`.\n\nChanging `access_level` is subject to the [role ceiling](#header-constraints), and demoting the account's last `admin` is rejected with `400`.\n\n-   Data Structure\n\n    -   access_level (enum, required) - The primary-account role to assign.\n        -   `admin`\n        -   `developer`\n        -   `reporting`\n        -   `templates`\n        -   `custom`\n    -   access_policies (array) - The policies to grant. Required when `access_level` is `custom`, and not allowed otherwise."},{"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\": \"Forbidden\"\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.\n\nYou cannot delete the user who owns the API key you are calling with, a user that belongs to a different account, or the account's last `admin`."},{"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\": \"Forbidden\"\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\": \"User does not exist\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Add a Subaccount Mapping"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}/subaccounts"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Add a Subaccount Mapping"}},"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 at the given access level. If the user already has access to the subaccount, the access level is updated.\n\n-   Data Structure\n\n    -   subaccount_id (number, required) - The subaccount to grant access to.\n    -   access_level (enum, required) - The access level to grant on the subaccount.\n        -   `subaccount_reporting`\n        -   `subaccount_developer`"},{"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":"resource","meta":{"title":{"element":"string","content":"Remove a Subaccount Mapping"}},"attributes":{"href":{"element":"string","content":"/v1/users/{username}/subaccounts/{subaccountId}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Remove a Subaccount Mapping"}},"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."},{"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":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"dataStructures"}]}},"content":[{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"a28889828708ebe6c5cce15e8962218e"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"The user's display name, derived from their first and last name."}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"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 email address."}},"content":{"key":{"element":"string","content":"email"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's primary-account role. Empty for subaccount-scoped users."}},"content":{"key":{"element":"string","content":"access"},"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 policies granted to the user when `access` is `custom`."}},"content":{"key":{"element":"string","content":"access_policies"},"value":{"element":"array"}}},{"element":"member","meta":{"description":{"element":"string","content":"Whether the user signs in via 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."}},"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":"The subaccount the user is scoped to, if any."}},"content":{"key":{"element":"string","content":"subaccount_id"},"value":{"element":"number"}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccounts a subaccount-scoped user has access to, and their access level on each. Present only for subaccount-scoped users."}},"content":{"key":{"element":"string","content":"subaccounts"},"value":{"element":"array","content":[{"element":"object","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 user's access level 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 display name."}},"content":{"key":{"element":"string","content":"subaccount_name"},"value":{"element":"string"}}}]}]}}},{"element":"member","meta":{"description":{"element":"string","content":"User-level options, present only when set."}},"content":{"key":{"element":"string","content":"options"},"value":{"element":"object"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"75401962413d5e377a2aff9692172f19"}},"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."}},"content":{"key":{"element":"string","content":"first_name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The user's last name."}},"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 primary-account role. Omitted 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","content":{"key":{"element":"string","content":"access_policies (array) - The policies granted to the user when `access_level` is `custom`."},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccount the user is scoped to, if any. Omitted when `subaccounts` is non-empty."}},"content":{"key":{"element":"string","content":"subaccount_id"},"value":{"element":"number"}}},{"element":"member","meta":{"description":{"element":"string","content":"Whether the user signs in via 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."}},"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":"User-level options, present only when set."}},"content":{"key":{"element":"string","content":"options"},"value":{"element":"object"}}},{"element":"member","meta":{"description":{"element":"string","content":"ISO 8601 timestamp of when the user was created."}},"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."}},"content":{"key":{"element":"string","content":"updated"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The subaccounts the user has access to, and their access level on each. Always present; an empty array for a user with no subaccount mappings. When it is non-empty, the top-level `access_level` and `subaccount_id` fields are omitted."}},"content":{"key":{"element":"string","content":"subaccounts"},"value":{"element":"array","content":[{"element":"object","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 access level 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."}},"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":"6dc235c0755824afba96a6855f982909"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Unique ID for the pending invite. Use it to revoke the 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 the invited user will be assigned 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":"Unix timestamp, in epoch seconds, at which the invitation expires."}},"content":{"key":{"element":"string","content":"expires"},"value":{"element":"number"}}}]}}]}]},{"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":6913},{"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":12272},{"element":"number","content":46}]}]}]}},"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":13917},{"element":"number","content":49}]}]}]}},"content":"the resource '/v1/users/{username}' is already defined"}]},"TableOfContents":[{"anchor":"#users","title":"Users","children":[{"anchor":"#header-prerequisites","title":"Prerequisites"},{"anchor":"#header-roles","title":"Roles"},{"anchor":"#header-constraints","title":"Constraints"},{"anchor":"#header-user-object","title":"User object"},{"anchor":"#header-retrieved-user-object","title":"Retrieved user object"},{"anchor":"#header-invite-object","title":"Invite object"},{"anchor":"#header-invite-lifecycle","title":"Invite lifecycle"},{"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-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-update-a-user","title":"Update a User","children":[{"anchor":"#users-put-update-a-user","title":"Update a User"}]},{"anchor":"#users-delete-a-user","title":"Delete a User","children":[{"anchor":"#users-delete-delete-a-user","title":"Delete a User"}]},{"anchor":"#users-add-a-subaccount-mapping","title":"Add a Subaccount Mapping","children":[{"anchor":"#users-post-add-a-subaccount-mapping","title":"Add a Subaccount Mapping"}]},{"anchor":"#users-remove-a-subaccount-mapping","title":"Remove a Subaccount Mapping","children":[{"anchor":"#users-delete-remove-a-subaccount-mapping","title":"Remove a Subaccount Mapping"}]}]}],"meta":{"title":"Users API","description":"Programmatically manage the users on your SparkPost account with an API key.","full":false},"fields":{"path":"/api/users/"}}},"pageContext":{"file":"users.apib"}},"staticQueryHashes":["1319884646","1428769721","3859448388"]}