1KEY Developers
API reference

Members

Base URL https://api.1keyplatform.dev/v1. Every endpoint below is generated from the OpenAPI contract, which you can download as openapi.yaml.

Log in to send these requests to your organization from this page.

Members

People in your organization, and invitations to join it.

GET /invitations

List pending invitations

Needs the members:read scope.

Invitations not yet accepted, revoked or expired, newest first.

Only an owner or admin may: a key whose creator is a member gets 403 forbidden.

Responses

200 All pending invitations.

Errors

401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
POST /invitations

Invite someone

Needs the members:write scope.

Emails the address a link to join your organization, valid for 7 days. Accepting it adds them to your organization, creating their account if they have none; they then log in with a link sent to that address.

Body

email string · required
role "admin" | "member" · optional

Responses

201 The invitation. · returns a Invitation

Errors

400 invalid_request The request is malformed or a field is invalid.
401 unauthenticated Missing, malformed, revoked or unknown API key.
403 forbidden The key lacks the operation's scope (insufficient_scope), or acts with its creator's role (forbidden): only owners' and admins' keys manage members and invitations, and no key changes, removes or makes an owner.
500 A 1key fault. Retry with backoff.
DELETE /invitations/{invitation_id}

Revoke an invitation

Needs the members:write scope.

Parameters

Name In Type Description
invitation_id required path string

Responses

204 Revoked; the link no longer works.

Errors

401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
404 not_found No such resource, or it is not your organization's.
DELETE /members/{member_id}

Remove a member

Needs the members:write scope.

API keys cannot remove owners.

Parameters

Name In Type Description
member_id required path string

Responses

204 Removed.

Errors

401 unauthenticated Missing, malformed, revoked or unknown API key.
403 forbidden The key lacks the operation's scope (insufficient_scope), or acts with its creator's role (forbidden): only owners' and admins' keys manage members and invitations, and no key changes, removes or makes an owner.
404 not_found No such resource, or it is not your organization's.
GET /members/{member_id}

Get a member

Needs the members:read scope.

One member. A member's key gets only its creator; anyone else is 404.

Parameters

Name In Type Description
member_id required path string

Responses

200 The member. · returns a Member

Errors

401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
404 not_found No such resource, or it is not your organization's.
PATCH /members/{member_id}

Change a member's role

Needs the members:write scope.

Between admin and member. API keys cannot change owners or make owners.

Parameters

Name In Type Description
member_id required path string

Body

role "admin" | "member" · required

Responses

200 The member. · returns a Member

Errors

400 invalid_request The request is malformed or a field is invalid.
401 unauthenticated Missing, malformed, revoked or unknown API key.
403 forbidden The key lacks the operation's scope (insufficient_scope), or acts with its creator's role (forbidden): only owners' and admins' keys manage members and invitations, and no key changes, removes or makes an owner.
404 not_found No such resource, or it is not your organization's.
GET /members

List members

Needs the members:read scope.

Everyone in your organization, owners first. A member's key lists only its creator.

Parameters

Name In Type Description
role optional query "owner" | "admin" | "member" Only members with this role.

Responses

200 All members.

Errors

401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.