Skip to main content
POST
/
digital-wallets
/
{digital_wallet_id}
/
domains
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.DigitalWallets.Domains.CreateAsync(
    digitalWalletId: "1808f5e6-b49c-4db9-94fa-22371ea352f5",
    digitalWalletDomain: new DigitalWalletDomain() {
        DomainName = "example.com",
    }
);

// handle response
{
  "type": "error",
  "code": "bad_request",
  "status": 400,
  "message": "Generic error",
  "details": []
}
This endpoint requires the digital-wallets.write scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string

The ID of the merchant account to use for this request. The ID of the merchant account to use for this request.

Path Parameters

digital_wallet_id
string<uuid>
required

The ID of the digital wallet to remove a domain for. The ID of the digital wallet to remove a domain for.

Body

application/json
domain_name
string
required

The domain to add or remove.

Response

Successful Response