docs
Get startedTroubleshootingPaymentsWebhooksAgent paymentsSwop MCPOviIdentity (swop.id)SwivyRPC (preview)API reference
API reference

Control plane

Organizations, projects, environments, credentials, policy, RPC targets, webhooks, OIDC clients and audit logs.

Preview: not generally available

Swivy runs in staging only. Paths and fields can change before general availability. There is no public base URL yet; preview partners get theirs with their credentials.

Server-to-server administration. Authenticate with an organization admin credential in x-swivy-admin-key. Never call these routes from a browser or app.

31 endpoints, generated from Swivy's OpenAPI document (apps/api/src/openapi.ts).

Create an organization

POST/v1/control/organizations

Auth: x-admin-token (deployment admin)

Request body: Organization payload

namestringRequired

Responses: 200 Created organization and issued its initial owner credential · 401 Invalid or missing admin token

Create a project

POST/v1/control/organizations/{organizationId}/projects

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Request body: Project payload

namestringRequired

Responses: 200 Created project · 401 Invalid or missing admin token

Rename a project

PATCH/v1/control/projects/{projectId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

projectIdstring (path)Required
Project identifier

Request body: Project payload

namestringRequired

Responses: 200 Updated project · 401 Invalid or missing control-plane credential · 404 Project not found · 409 Project slug already exists in this organization

Create an environment and issue its first credential pair

POST/v1/control/projects/{projectId}/environments

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

projectIdstring (path)Required
Project identifier

Request body: Environment payload

namestringRequired

Responses: 200 Created environment · 401 Invalid or missing admin token

Rename an environment

PATCH/v1/control/environments/{environmentId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Request body: Environment payload

namestringRequired

Responses: 200 Updated environment · 401 Invalid or missing control-plane credential · 404 Environment not found · 409 Environment slug already exists in this project

List environment credentials

GET/v1/control/environments/{environmentId}/credentials

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Responses: 200 Credential list · 401 Invalid or missing admin token

Rotate or create a new environment credential pair

POST/v1/control/environments/{environmentId}/credentials

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Request body: Credential creation payload

labelstring

Responses: 200 Created environment credential · 401 Invalid or missing admin token · 404 Environment not found

Revoke an environment credential pair

DELETE/v1/control/environments/{environmentId}/credentials/{credentialId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier
credentialIdstring (path)Required
Credential identifier

Responses: 200 Credential revoked · 401 Invalid or missing admin token · 404 Credential not found

Get organization overview

GET/v1/control/organizations/{organizationId}/overview

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Responses: 200 Organization overview · 401 Invalid or missing control-plane credential · 404 Organization not found

List organization admin credentials

GET/v1/control/organizations/{organizationId}/admin-credentials

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Responses: 200 Organization admin credential list · 401 Invalid or missing control-plane credential · 403 Credential is outside this organization or lacks read access · 404 Organization not found

Create an organization admin credential

POST/v1/control/organizations/{organizationId}/admin-credentials

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Request body: Organization admin credential payload

labelstring
roleobject

Responses: 200 Created organization admin credential · 401 Invalid or missing control-plane credential · 403 Credential lacks owner access for this organization · 404 Organization not found

List organization members

GET/v1/control/organizations/{organizationId}/members

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Responses: 200 Organization member list · 401 Invalid or missing control-plane credential · 403 Credential is outside this organization or lacks read access · 404 Organization not found

Update an organization member role and sync their active admin credentials

PATCH/v1/control/organizations/{organizationId}/members/{memberId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier
memberIdstring (path)Required
Organization member identifier

Request body: Organization member role payload

rolestringRequired
One of `owner`, `admin`, `developer`, `viewer`.

Responses: 200 Organization member updated · 401 Invalid or missing control-plane credential · 403 Credential lacks owner access for this organization · 404 Organization or member not found · 409 Update would remove the last active owner credential

Revoke an organization member and deactivate their admin credentials

DELETE/v1/control/organizations/{organizationId}/members/{memberId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier
memberIdstring (path)Required
Organization member identifier

Responses: 200 Organization member revoked · 401 Invalid or missing control-plane credential · 403 Credential lacks owner access for this organization · 404 Organization or member not found · 409 Revocation would remove the last active owner credential

List organization invites

GET/v1/control/organizations/{organizationId}/invites

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Responses: 200 Organization invite list · 401 Invalid or missing control-plane credential · 403 Credential is outside this organization or lacks read access · 404 Organization not found

Create an organization invite

POST/v1/control/organizations/{organizationId}/invites

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier

Request body: Organization invite payload

emailstringRequired
Format: email.
roleobject
expiresInHoursinteger

Responses: 200 Created organization invite · 401 Invalid or missing control-plane credential · 403 Credential lacks owner access for this organization · 404 Organization not found

Revoke an organization invite

DELETE/v1/control/organizations/{organizationId}/invites/{inviteId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier
inviteIdstring (path)Required
Organization invite identifier

Responses: 200 Organization invite revoked · 401 Invalid or missing control-plane credential · 403 Credential lacks owner access for this organization · 404 Organization or invite not found

Revoke an organization admin credential

DELETE/v1/control/organizations/{organizationId}/admin-credentials/{credentialId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

organizationIdstring (path)Required
Organization identifier
credentialIdstring (path)Required
Organization admin credential identifier

Responses: 200 Organization admin credential revoked · 401 Invalid or missing control-plane credential · 403 Credential lacks owner access for this organization · 404 Organization or credential not found · 409 Revocation would remove the last active owner credential

Accept an organization invite and mint an org-scoped admin credential

POST/v1/control/organization-invites/{inviteId}/accept

Parameters

inviteIdstring (path)Required
Organization invite identifier

Request body: Organization invite acceptance payload

tokenstringRequired
namestring
labelstring

Responses: 200 Accepted organization invite · 404 Invite not found · 409 Invite expired, already used, or member already exists

Replace environment policy

PUT/v1/control/environments/{environmentId}/policy

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Request body: Environment policy

allowedChainsstring[]Required
One of `evm`, `solana`.
exportPolicyobjectRequired
signingPolicyobjectRequired
executionPolicyobjectRequired
walletToolPolicyobject
walletPolicyobjectRequired
offlineSigningPolicyobject
blockchainDataPolicyobject
rpcProviderPolicyobject
sessionPolicyobjectRequired
recoveryPolicyobjectRequired

Responses: 200 Updated environment policy · 401 Invalid or missing admin token

Get environment dashboard snapshot

GET/v1/control/environments/{environmentId}/dashboard

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Responses: 200 Environment dashboard · 401 Invalid or missing admin token · 404 Environment not found

List environment RPC targets

GET/v1/control/environments/{environmentId}/chains

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Responses: 200 Environment RPC targets · 401 Invalid or missing admin token

Create or update an environment RPC target

PUT/v1/control/environments/{environmentId}/chains/{chain}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier
chainstring (path)Required
One of `evm`, `solana`.

Request body: Chain RPC target configuration

networkstring
rpcUrlstringRequired
Format: uri.
wsUrlstring | null
headersobject[]
commitmentstring | null
skipPreflightboolean
maxRetriesinteger | null
enabledboolean

Responses: 200 Updated environment RPC target · 401 Invalid or missing admin token

Create a webhook endpoint

POST/v1/control/environments/{environmentId}/webhooks

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Request body: Webhook target

urlstringRequired
Format: uri.

Responses: 200 Created webhook · 401 Invalid or missing admin token

List webhooks

GET/v1/control/environments/{environmentId}/webhooks

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Responses: 200 Webhook list · 401 Invalid or missing admin token

Rotate a webhook signing secret

POST/v1/control/environments/{environmentId}/webhooks/{webhookId}/rotate-secret

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier
webhookIdstring (path)Required
Webhook identifier

Responses: 200 Rotated webhook secret · 401 Invalid or missing admin token · 404 Webhook not found

Revoke a webhook endpoint

DELETE/v1/control/environments/{environmentId}/webhooks/{webhookId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier
webhookIdstring (path)Required
Webhook identifier

Responses: 200 Revoked webhook · 401 Invalid or missing admin token · 404 Webhook not found

List environment audit logs

GET/v1/control/environments/{environmentId}/audit

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Responses: 200 Audit logs · 401 Invalid or missing admin token

List OIDC clients for an environment

GET/v1/control/environments/{environmentId}/oidc-clients

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Responses: 200 OIDC client list · 401 Invalid or missing control-plane credential · 404 Environment not found

Create an OIDC client for Sign in with Swop

POST/v1/control/environments/{environmentId}/oidc-clients

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier

Request body: OIDC client payload

namestringRequired
redirectUrisstring[]Required
scopesstring[]
One of `openid`, `profile`, `email`, `wallets.read`, `wallets.execute`.
grantTypesstring[]
One of `authorization_code`, `refresh_token`.
tokenEndpointAuthMethodstring
One of `none`, `client_secret_post`, `client_secret_basic`.
applicationTypestring
One of `web`, `spa`, `native`.
brandColorstring
logoUrlstring
Format: uri.
authMethodsobject

Responses: 200 Created OIDC client · 401 Invalid or missing control-plane credential · 404 Environment not found

Revoke an OIDC client

DELETE/v1/control/environments/{environmentId}/oidc-clients/{clientId}

Auth: x-swivy-admin-key (organization admin credential) or x-admin-token (deployment admin)

Parameters

environmentIdstring (path)Required
Environment identifier
clientIdstring (path)Required
OIDC client identifier

Responses: 200 OIDC client revoked · 401 Invalid or missing control-plane credential · 404 Environment or OIDC client not found

On this page