(OrganizationDomains)
- Create - Create a new organization domain.
- List - Get a list of all domains of an organization.
- Delete - Remove a domain from an organization.
Creates a new organization domain. By default the domain is verified, but can be optionally set to unverified.
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;
var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.OrganizationDomains.CreateAsync(
organizationId: "<id>",
requestBody: new CreateOrganizationDomainRequestBody() {}
);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
OrganizationId |
string | ✔️ | The ID of the organization where the new domain will be created. |
RequestBody |
CreateOrganizationDomainRequestBody | ✔️ | N/A |
CreateOrganizationDomainResponse
Error Type | Status Code | Content Type |
---|---|---|
Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 403, 404, 422 | application/json |
Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | */* |
Get a list of all domains of an organization.
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;
var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListOrganizationDomainsRequest req = new ListOrganizationDomainsRequest() {
OrganizationId = "<id>",
Limit = 20,
Offset = 10,
};
var res = await sdk.OrganizationDomains.ListAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
ListOrganizationDomainsRequest | ✔️ | The request object to use for the request. |
ListOrganizationDomainsResponse
Error Type | Status Code | Content Type |
---|---|---|
Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 422 | application/json |
Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | */* |
Removes the given domain from the organization.
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;
var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.OrganizationDomains.DeleteAsync(
organizationId: "<id>",
domainId: "<id>"
);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
OrganizationId |
string | ✔️ | The ID of the organization the domain belongs to |
DomainId |
string | ✔️ | The ID of the domain |
DeleteOrganizationDomainResponse
Error Type | Status Code | Content Type |
---|---|---|
Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 404 | application/json |
Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | */* |