Account, keys and webhooks ›
Export account
GET
/v1/me/exportEverything kept about the account and you, as one JSON document.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const account = await agental.exportAccount();
Answer200 OK · AccountExport
- {
- "exportedAt": string,
- "account": {
- "id": string,
- "email": string | null,
- "name": string,
- "role": string,
- "emailVerified": boolean,
- "createdAt": string | null,
- … 4 more
- },
- "signupSource": {
- "referrer": string | null,
- "utmSource": string | null,
- "utmMedium": string | null,
- "utmCampaign": string | null,
- "landingPage": string | null,
- "heard": string | null,
- },
- "closed": object,
- "sessions": [{
- "id": string,
- "createdAt": string,
- "expiresAt": string,
- "ipAddress": string | null,
- "userAgent": string | null,
- "current": boolean,
- }],
- "organizations": [{
- "id": string,
- "createdAt": string,
- "name": string,
- "personal": boolean,
- }],
- "apiKeys": [{
- "id": string,
- "name": string,
- "prefix": string | null,
- "createdAt": string,
- "preset": "read-only" | "full-sandbox" | "ci" | "admin" | "null" | null,
- "actions": string[],
- … 8 more
- }],
- "invitesSent": [{
- "email": string,
- "createdAt": string,
- }],
- "billing": {
- "customerId": string | null,
- "subscriptionId": string | null,
- "planId": string | null,
- "status": string,
- "periodStart": string | null,
- "periodEnd": string | null,
- … 1 more
- },
- … 8 more
- }
Everything kept about the account and the person behind it: the account, its sessions with the address and browser each began from, keys, billing, payments, usage, and what it has made.
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 Everything kept about the account and the person behind it: the account, its sessions with the address and browser each began from, keys, billing, payments, usage, and what it has made. Secrets are named, never given. What is in sandboxes is read through the rest of the API.
AccountExport17 fields
exportedAtstring
accountobject10 fields
idstring
emailstringnull
namestring
rolestring
emailVerifiedboolean
createdAtstringnull
imagestringnull
The picture GitHub or Google gave, as an address.
signInMethodsstring[]
password, github or google.
More
A code sent by email keeps nothing of its own.twoFactorboolean
Whether two-factor sign-in is on.
More
Its secret and backup codes are kept sealed and are not given.passkeysobject[]3 fields
The passkeys it signs in with.
More
Only each one's public key is kept, which is of no use to anyone else.idstring
namestringnull
createdAtstring
signupSourceobjectnull6 fields
Where the account came from, as its browser said when it signed up: the referring address without its query, the utm_ words of the first link, the first page, and the answer to "How did you hear about agental?".
More
Null where none was kept.referrerstringnull
utmSourcestringnull
utmMediumstringnull
utmCampaignstringnull
landingPagestringnull
heardstringnull
closedobject
sessionsobject[]6 fields
idstring
createdAtstring
expiresAtstring
ipAddressstringnull
The address the session was started from.
userAgentstringnull
The browser or program it was started from, as it named itself.
currentboolean
Whether it is the session this export was asked for with.
organizationsobject[]4 fields
idstring
createdAtstring
namestring
personalboolean
apiKeysobject[]14 fields
The account's keys, by name and first characters, with what each may do and where.
More
A key itself is never kept, so it cannot be given.idstring
namestring
prefixstringnull
The first characters of the secret, to tell keys apart by.
More
Null for a key from before they were kept.createdAtstring
presetread-onlyfull-sandboxciadminnullnull
The preset the key was made with.
More
Null for one made with its actions named.actionsstring[]
What the key may do, as it was made: a preset is written out into its actions then, so a preset that grows later does not widen it.
More
* is everything.sandboxIdsstring[]
The sandboxes the key is limited to, with templateIds.
More
Empty, with templateIds empty too, is every sandbox of the account.templateIdsstring[]
The templates the key is limited to: it reaches them and every sandbox on them.
More
Empty is every template, and, with sandboxIds empty too, every sandbox.expiresAtstringnull
When the key stops working.
More
Null is never.allowFromstring[]
The addresses and ranges the key may be used from.
More
Empty is anywhere.lastUsedAtstringnull
When the key was last used, to the minute: it is written once a minute at most.
More
Null if never.lastUsedFromstringnull
The address it was last used from.
organizationIdstringnull
The organization the key acts in: the one it was made in, for good.
More
Null for a key of whoever runs the service.createdBystringnull
The account that made it.
More
In a team, its owners and admins see every key of the team, and a member only those they made.invitesSentobject[]2 fields
emailstring
createdAtstring
billingobjectnull7 fields
Null for an account that has never bought anything.
customerIdstringnull
The account's id at the payment provider.
subscriptionIdstringnull
planIdstringnull
statusstring
periodStartstringnull
periodEndstringnull
cardSavedAtstringnull
When a card was first saved on the free plan, or null.
paymentsobject[]6 fields
idstring
kindstring
microsinteger
testboolean
referencestring
receivedAtstring
creditobject[]5 fields
idstring
microsinteger
kindstring
referencestring
createdAtstring
usageobject[]5 fields
sandboxIdstring
sizestring
microsPerHourinteger
startedAtstring
endedAtstringnull
sandboxesobject[]5 fields
idstring
createdAtstring
namestring
sizestring
statusstring
snapshotsobject[]4 fields
idstring
createdAtstring
sandboxIdstring
namestring
templatesobject[]3 fields
idstring
createdAtstring
namestring
webhooksobject[]5 fields
Without their signing secrets.
idstring
createdAtstring
urlstring
eventsstring[]
descriptionstring
telemetryobjectnull6 fields
endpointstring
headersstring[]
The names of the headers sent with each export.
More
Their values are not given.lastExportAtstringnull
lastErrorstringnull
createdAtstring
updatedAtstring
Errors and other answers
| 400 | no_account the key belongs to no account. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.