DELETE/v1/partner/end_users/{external_id}

Delete end user

Soft-deletes an end user from your tenant, fulfilling GDPR Article 17 (right to erasure). The user's wallet and on-chain positions are not touched — only the Yieldforce record is marked deleted. No portfolios or transactions can be created for a deleted user. This endpoint is Entra token only (Entra token, no user token).

Deletion is idempotent: calling this endpoint on an already-deleted user returns 204 with no error.

Path parameters

external_idstringrequired

Your stable identifier for the user — the same value passed to POST /v1/partner/end_users when the user was created.

Headers

Authorizationstringrequired

Entra M2M access token. Format: Bearer <token>. See Entra authentication.

Example request

const baseUrl = process.env.YIELDFORCE_API_BASE_URL ?? 'https://yieldforce.io/api';
 
const res = await fetch(`${baseUrl}/v1/partner/end_users/alice-bunq-id`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${entraToken}`,
  },
});
// 204 No Content on success

Response

204 No content — user deleted (or was already deleted)

No response body is returned.

Soft delete — on-chain funds are not touched

Deleting a user removes their Yieldforce record and blocks future API access, but does not trigger any on-chain withdrawal. If the user has active portfolios with deposited funds, you should withdraw all funds before deleting the user. Use GET /v1/partner/end_users/{external_id}/portfolios to check for active positions first.

Errors

401 token_missing — No Authorization: Bearer header on the request.

401 invalid_entra_token — Token is expired, malformed, or has an unexpected audience.

403 cross_tenant_jwt — The user exists but belongs to a different tenant.

404 end_user_not_found — No user with this external_id exists in your tenant.