# Revoke a pending credential offer.


Withdraws an offer the holder has not claimed yet: its deep link and QR code stop working at once and its status becomes `revoked`. Only a `pending` offer can be revoked; any other status returns 400 failed_precondition. An offer already claimed lives on as its credential — use the issued-credentials endpoints to act on that.

Endpoint: POST /b2b/v1/credential-offers/{offerId}/revoke
Version: 1.0.0
Security: BearerAuth

## Security:

  - `BearerAuth` (unknown)
    http bearer JWT

## Path parameters:

  - `offerId` (string, required)

## Header parameters:

  - `X-Org-Id` (string, required)
    Organization the call is acting on. The authenticated service user must be a member of this organization in DeepAdmin; otherwise the request returns 404.

  - `X-Environment` (string, required)
    Environment the call is scoped to. Resources are isolated per environment.

## Response 200:

  - `200` (unknown)
    Success response

## Response 200 fields (application/json):

  - `archived_at` (string)
    When an operator put this offer away in the portal's archive, if they did. A filing decision in the portal's lists; nothing about the offer changes with it.

  - `claims` (object, required)
    Claim values for the credential.

  - `completed_at` (string)
    Set when the offer leaves pending (issued, failed, expired, or revoked).

  - `created_at` (string, required)
    When the offer was created (RFC3339).

  - `credential_definition` (object, required)
    Credential definition reference.

  - `credential_definition.has_logo` (boolean, required)
    Whether the credential definition currently has an uploaded logo.

  - `credential_definition.id` (string, required)
    Credential definition UUID. UUID v4 identifier.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `credential_definition.name` (string, required)
    Human-readable credential definition name.

  - `credential_definition.vct` (string, required)
    Verifiable credential type (e.g. "urn:ietf:params:oauth:vct:PersonId").

  - `credential_valid_until` (string)
    Absolute expiry when the lifetime was given as a day (RFC3339; the end of that day in the issuer's time zone, Europe/Zurich). Absent for a duration or no lifetime.

  - `credential_validity_seconds` (integer)
    Credential lifetime to apply at issuance (SD-JWT exp = iat + N). Absent means the credential will be issued without an exp claim.

  - `deeplink` (string)
    Only when status is pending: OID4VCI wallet deep link.

  - `environment` (string, required)
    Swiyu environment: "beta" or "production".

  - `error_code` (string)
    Machine-readable failure reason when status is failed or expired.

  - `error_description` (string)
    Human-readable error detail when status is failed or expired.

  - `expires_at` (string, required)
    When a pending offer expires if not completed (RFC3339).

  - `id` (string, required)
    Offer id (matches the value returned at creation time). UUID v4 identifier.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `invitation_id` (string)
    InvitationID / SelfServiceRequestID expose the upstream lineage anchors when this offer was created from one. nil for plain portal or B2B offers.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `issued_credential_id` (string)
    Only when status is issued: ID of the issued credential. UUID v4 identifier.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `qr_content_base64` (string)
    Only when status is pending: Base64-encoded PNG QR code (240×240 px).

  - `reference_id` (string)
    Your reference_id from the create request, if any.

  - `self_service_request_id` (string)
    UUID v4 identifier.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `source` (string, required)
    Source records where this offer originated: "portal" (admin UI), "b2b" (API caller), "invitation" (redeemed email invitation), or "self_service" (admin approval of a public request). Stable at row level — captured at create and never mutated.

  - `status` (string, required)
    Current lifecycle state of the offer.
    Enum: "pending", "issued", "expired", "failed", "revoked"

## Response 400:

  - `400` (unknown)
    Invalid request. Common causes: missing or malformed X-Org-Id / X-Environment headers, or a missing required field in the request body.

## Response 400 fields (application/json):

  - `code` (string, required)
    Machine-readable error code.

  - `message` (string, required)
    Human-readable error description.

  - `details` (object)
    Optional structured data with additional context.

## Response 401:

  - `401` (unknown)
    Unauthenticated. The Bearer token failed validation (signature, issuer, audience, or expiry).

## Response 401 fields (application/json):

  - `code` (string, required)
    Machine-readable error code.

  - `message` (string, required)
    Human-readable error description.

  - `details` (object)
    Optional structured data with additional context.

## Response 403:

  - `403` (unknown)
    Permission denied. The token does not carry the scope required by this endpoint. Check the `scope` claim on the token you received from the DeepCloud SSO token endpoint.

## Response 403 fields (application/json):

  - `code` (string, required)
    Machine-readable error code.

  - `message` (string, required)
    Human-readable error description.

  - `details` (object)
    Optional structured data with additional context.

## Response 404:

  - `404` (unknown)
    Resource not found. Either the resource ID is unknown, or the X-Org-Id you supplied is not an organization the authenticated service user is a member of.

## Response 404 fields (application/json):

  - `code` (string, required)
    Machine-readable error code.

  - `message` (string, required)
    Human-readable error description.

  - `details` (object)
    Optional structured data with additional context.

## Response 429:

  - `429` (unknown)
    Rate limit exceeded.

## Response 429 fields (application/json):

  - `code` (string, required)
    Machine-readable error code.

  - `message` (string, required)
    Human-readable error description.

  - `details` (object)
    Optional structured data with additional context.

## Response 500:

  - `500` (unknown)
    Internal server error.

## Response 500 fields (application/json):

  - `code` (string, required)
    Machine-readable error code.

  - `message` (string, required)
    Human-readable error description.

  - `details` (object)
    Optional structured data with additional context.

