SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Guide

Users

Once a user is signed in (see Authentication), these endpoints manage their profile, contact details, linked sign-in methods, and account lifecycle. A separate set of staff-only endpoints lets Admin and Support accounts look up, moderate, and manage other users. Every endpoint mentioned on this page lives under https://api.swiftgoma.com/api/v1/users.

Self-service vs. staff-only

Every endpoint on this page falls into one of two buckets:

BucketActs onRequires
Self-serviceThe signed-in user's own accountAny valid session
AdminA target user, by userId, given in the pathADMIN or SUPPORT role — some actions ADMIN only

Roles

Every account has exactly one role, which governs both what that account can do across the whole API and, here, who can act on other users.

RoleWho
BUYERDefault role — shops and orders on the platform.
SELLERRuns a shop, once seller onboarding and KYC are complete.
RIDERDelivers orders.
SUPPORTStaff — can moderate users but not delete accounts or change roles.
ADMINStaff — full access, including account deletion and role changes.

Profile

A user's display name, preferred currency, and profile picture are the only self-describing fields they control directly.

FieldEndpoint
Name / preferred currencyPATCH /profile
Profile picturePOST /profile/avatar

Contact methods

Phone number and a secondary email both follow the same shape: request a code, then verify it. That two-step pattern shows up everywhere in this API — get comfortable with it once and it applies broadly.

Phone number

  1. 1

    Adding a first number

    POST /phone/request sends an SMS code, then POST /phone/verify confirms it.
  2. 2

    Changing an existing number

    Same pattern, different endpoints: POST /phone/update/request sends the code to the new number, POST /phone/update/verify confirms and switches over.

Secondary email

  1. 1

    Add and verify

    POST /email/secondary/request emails a code to the new address, POST /email/secondary/verify confirms it.
  2. 2

    Remove it

    DELETE /email/secondary — no code required, since it's just removing a contact point, not adding one.

Linked sign-in methods

A Google account can be linked to or unlinked from an existing SwiftGoma account at any time via POST /google/link and POST /google/unlink.

Don't lock the user out

Unlinking Google fails if it's the account's only sign-in method — the user needs a password set first (see POST /password/create in the Authentication guide) so they always have at least one way to sign back in.

Account deletion and recovery

  1. 1

    Delete

    POST /delete doesn't erase the account immediately. It's marked deleted, every session is revoked, and a grace period starts.
  2. 2

    Recover, within the grace period

    POST /recovery/request sends a code by email, and POST /recovery/verify restores the account and signs the user back in — both endpoints are unauthenticated, since by definition the user has no valid session at this point.

Admin operations

Staff-only endpoints for looking up and moderating any user on the platform. Every one of these takes the target userId in the path.

ActionEndpointRole
List / search usersGET /ADMIN, SUPPORT
Get one user's detailGET /:idADMIN, SUPPORT
Block / unblockPOST /:id/block · unblockADMIN, SUPPORT
Force logoutPOST /:id/force-logoutADMIN, SUPPORT
Manually verify email / phonePOST /:id/verify-email · verify-phoneADMIN, SUPPORT
Delete / restorePOST /:id/delete · restoreADMIN only
Change rolePOST /:id/roleADMIN only

Why the ADMIN / SUPPORT split?

Support can handle day-to-day moderation — blocking a bad actor, forcing a logout, manually verifying a contact method during a support call. Deleting an account or changing what role it holds is scoped to ADMIN only, since both are harder to reverse and carry more risk if misused.
Browse the Users endpoints in the API Reference