Docs

account

The authenticated user's own account and organization memberships.

Amfelt REST API · v1.13.0 · https://api.amfelt.com


GET /v1/me/archived-organizations  

List the caller's archived organizations.

Organizations the caller is an active member of that have been disabled (archived). Used to re-enable them.

Responses  

200 The caller's archived organizations.

application/json

PropertyTypeRequiredDescription
dataArchivedOrg []Yes
401 The request lacks valid credentials.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.

Security  

bearer_jwt


GET /v1/me  

Get the current account.

Returns the authenticated user’s account profile and the organizations they are an active member of.

Responses  

200 The current account and its memberships.

application/json

PropertyTypeRequiredDescription
accountAccountProfileYes
membershipsMembership []YesThe organizations the account is an active member of.
The organizations the account is an active member of.
401 The request lacks valid credentials.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.

Security  

bearer_jwt


PATCH /v1/me  

Update the current account.

Updates the authenticated user’s profile fields. Only the supplied fields are changed.

Request body (required)  

application/json

PropertyTypeRequiredDescription
avatar_urlstringNoURL of the account holder’s avatar image.
URL of the account holder’s avatar image.
country_codestringNoISO country code of the account holder.
ISO country code of the account holder.
first_namestringNoGiven name of the account holder.
Given name of the account holder.
last_namestringNoFamily name of the account holder.
Family name of the account holder.
last_name_prefixstringNoFamily-name prefix (e.g. ‘van’, ‘de’).
Family-name prefix (e.g. ‘van’, ‘de’).
phone_country_codestringNoDialling country code for the phone number.
Dialling country code for the phone number.
phone_numberstringNoPhone number of the account holder.
Phone number of the account holder.

Responses  

200 The updated account profile.

application/json

PropertyTypeRequiredDescription
avatar_urlstringNoURL of the account holder’s avatar image.
URL of the account holder’s avatar image.
country_codestringNoISO country code of the account holder.
ISO country code of the account holder.
emailstringYesEmail address of the account.
Email address of the account.
first_namestringNoGiven name of the account holder.
Given name of the account holder.
hanko_subjectstringNoHanko subject identifier bound to the account.
Hanko subject identifier bound to the account.
idstringYesUnique identifier of the account.
Unique identifier of the account.
is_phone_verifiedbooleanYesWhether the phone number has been verified.
Whether the phone number has been verified.
last_namestringNoFamily name of the account holder.
Family name of the account holder.
last_name_prefixstringNoFamily-name prefix (e.g. ‘van’, ‘de’).
Family-name prefix (e.g. ‘van’, ‘de’).
phone_country_codestringNoDialling country code for the phone number.
Dialling country code for the phone number.
phone_numberstringNoPhone number of the account holder.
Phone number of the account holder.
400 The request was malformed or failed validation.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.
401 The request lacks valid credentials.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.

Security  

bearer_jwt


DELETE /v1/me  

Erase the current account.

Permanently erases the authenticated user’s personal data (GDPR Art. 17): scrubs all PII from the account, removes the user from every organization, and best-effort deprovisions the external auth identity. Irreversible. Blocked (409) if the caller is the sole owner of a live organization.

Request body (required)  

application/json

PropertyTypeRequiredDescription
confirm_emailstringYesThe caller’s current email, echoed to confirm the irreversible erasure (type-to-confirm guard).
The caller’s current email, echoed to confirm the irreversible erasure (type-to-confirm guard).

Responses  

204 The account was erased.
400 The request was malformed or failed validation.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.
401 The request lacks valid credentials.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.
409 The request conflicts with the current state of the resource.

application/json

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.

Security  

bearer_jwt


Schemas  

Archived Org List  

type: ArchivedOrgList

A list of the caller’s archived organizations.

PropertyTypeRequiredDescription
dataArchivedOrg []Yes

Archived Org  

type: ArchivedOrg

An organization the caller belongs to that has been disabled (archived).

PropertyTypeRequiredDescription
archived_atstringYesWhen the organization was disabled.
When the organization was disabled.
display_namestringYesOrganization display name.
Organization display name.
purge_after[string null]NoWhen the organization will be permanently purged, if it is scheduled for deletion. Null for a plain archived org.
When the organization will be permanently purged, if it is scheduled for deletion. Null for a plain archived org.
slugstringYesOrganization slug.
Organization slug.
tenant_idstringYesOrganization (tenant) identifier.
Organization (tenant) identifier.

Error  

type: Error

The standard error envelope returned by every non-2xx response.

PropertyTypeRequiredDescription
codestringYesStable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
Stable, snake_case token identifying the error condition. See ErrorCode for the api’s canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: invalid_argument.
fieldstringNoOptional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
Optional hint identifying the request field the error refers to, in snake_case (e.g. “slug”, “display_name”, “token”). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: slug.
messagestringYesHuman-readable description of the error. Examples: limit must be between 1 and 100.
Human-readable description of the error. Examples: limit must be between 1 and 100.

Current Account  

type: CurrentAccount

The authenticated user’s account profile and memberships.

PropertyTypeRequiredDescription
accountAccountProfileYes
membershipsMembership []YesThe organizations the account is an active member of.
The organizations the account is an active member of.

Account Profile  

type: AccountProfile

The authenticated user’s account profile.

PropertyTypeRequiredDescription
avatar_urlstringNoURL of the account holder’s avatar image.
URL of the account holder’s avatar image.
country_codestringNoISO country code of the account holder.
ISO country code of the account holder.
emailstringYesEmail address of the account.
Email address of the account.
first_namestringNoGiven name of the account holder.
Given name of the account holder.
hanko_subjectstringNoHanko subject identifier bound to the account.
Hanko subject identifier bound to the account.
idstringYesUnique identifier of the account.
Unique identifier of the account.
is_phone_verifiedbooleanYesWhether the phone number has been verified.
Whether the phone number has been verified.
last_namestringNoFamily name of the account holder.
Family name of the account holder.
last_name_prefixstringNoFamily-name prefix (e.g. ‘van’, ‘de’).
Family-name prefix (e.g. ‘van’, ‘de’).
phone_country_codestringNoDialling country code for the phone number.
Dialling country code for the phone number.
phone_numberstringNoPhone number of the account holder.
Phone number of the account holder.

Membership  

type: Membership

An account’s membership in an organization.

PropertyTypeRequiredDescription
display_namestringYesHuman-readable name of the organization.
Human-readable name of the organization.
joined_atstringYesTimestamp the account joined the organization.
Timestamp the account joined the organization.
permissionsstring[]NoThe permissions this membership’s role grants, as evaluated by the policy engine. A client renders action controls against this set; it is advisory, and the api enforces independently on every request.
The permissions this membership’s role grants, as evaluated by the policy engine. A client renders action controls against this set; it is advisory, and the api enforces independently on every request.
roleMembershipRoleYes
slugstringYesSlug of the organization.
Slug of the organization.
statusstringYesStatus of the membership. Examples: active.
Status of the membership. Examples: active.
tenant_idstringYesIdentifier of the organization.
Identifier of the organization.

Membership Role  

type: MembershipRole

Role of an account within an organization.

Account Profile Update  

type: AccountProfileUpdate

A partial account-profile update; only the supplied fields are changed. Email and Hanko subject are immutable here.

PropertyTypeRequiredDescription
avatar_urlstringNoURL of the account holder’s avatar image.
URL of the account holder’s avatar image.
country_codestringNoISO country code of the account holder.
ISO country code of the account holder.
first_namestringNoGiven name of the account holder.
Given name of the account holder.
last_namestringNoFamily name of the account holder.
Family name of the account holder.
last_name_prefixstringNoFamily-name prefix (e.g. ‘van’, ‘de’).
Family-name prefix (e.g. ‘van’, ‘de’).
phone_country_codestringNoDialling country code for the phone number.
Dialling country code for the phone number.
phone_numberstringNoPhone number of the account holder.
Phone number of the account holder.

Account Erasure Request  

type: AccountErasureRequest

PropertyTypeRequiredDescription
confirm_emailstringYesThe caller’s current email, echoed to confirm the irreversible erasure (type-to-confirm guard).
The caller’s current email, echoed to confirm the irreversible erasure (type-to-confirm guard).

Last updated on October 31, 2026