Gangmates
  • Getting Started
  • GENERAL USER GUIDES
    • Directory Services
      • Users
        • Quick Guide for Completing the CSV Template
          • Quick Guide: Formatting the Account Number Column as Text
        • New User Account Activation
      • User Types
      • Third Party Providers
    • Company Services
    • Security
      • Roles
      • Security Settings
    • Configurations
      • Branding
        • Logo
        • Domains
        • Add Email Address Format
          • Custom Expressions for Email Address Format
      • Company Settings
      • Bank Names and Codes Reference
      • Categories and Subcategories
    • Finance
      • Invoice
      • Payroll
        • Create Payslip
          • Understanding Payslip Calculations
        • Payroll Settings
        • Custom Contributions
      • Payment Processing
    • Performance
    • Organization Structure
  • API Documentation
    • API Overview
      • 🔌Authentication
      • ⏱️Rate Limits
    • API Reference
      • Company Management
      • Users Management
      • Payroll Management
        • Payroll Settings
      • Payment Processing
      • Domain Management
      • Wallet Top-Up
      • Invoices Management
  • Legal
    • Compliance and Regulatory Documents
      • Service Agreement
      • Service Level Agreement (SLA)
      • Privacy Policy
      • Data Processing Agreement (DPA)
      • Non-Disclosure Agreement (NDA)
      • Payroll Processing Agreement
      • Master Services Agreement (MSA)
      • Onboarding Checklist
      • Refund Policy
      • Terms and Conditions
Powered by GitBook
On this page
  • List Domains:
  • Headers:
  • Query Parameters:
  • Response:
  • Create a New Domain
  • Headers:
  • Body Parameters:
  • Response:
  • Update an Existing Domain
  • Headers:
  • Body Parameters:
  • Response:
  • Delete a Domain
  • Headers:
  • Path Parameters:
  • Response:
  1. API Documentation
  2. API Reference

Domain Management

List Domains:

GET api/domains

Retrieve a list of domains associated with a company.

Headers:

Name
Type
Description
Required

Authorization

String

Bearer token (Bearer {api_token})

Yes

Query Parameters:

Name
Type
Description
Required

company_id

Int

ID of the company to retrieve domains for (optional).

No

Response:

{
  "status": "success",
  "data": [
    {
      "id": 1,
      "name": "example.com",
      "display_name": "Example Domain",
      "company_id": 123,
      "created_at": "2023-10-01T12:34:56Z",
      "updated_at": "2023-10-01T12:34:56Z"
    },
    ...
  ]
}
{
  "error": "Unauthorized"
}
{
  "error": "Unauthorized"
}
{
  "error": "Company not found."
}
{
  "error": "An unexpected error occurred."
}

Create a New Domain

POST /api/domains

Add a new domain to a company.

Headers:

Name
Type
Description
Required

Authorization

String

Bearer token (Bearer {api_token})

Yes

Content-Type

String

application/json

Yes

Body Parameters:

Name
Type
Description
Required

name

String

The domain name to add.

Yes

display_name

String

A display name for the domain.

Yes

company_id

Int

ID of the company to add the domain to (optional).

No

Response:

{
  "status": "success",
  "message": "Domain created successfully.",
  "data": {
    "id": 2,
    "name": "newdomain.com",
    "display_name": "New Domain",
    "company_id": 123,
    "created_at": "2023-10-01T12:35:00Z",
    "updated_at": "2023-10-01T12:35:00Z"
  }
}
{
  "status": "error",
  "message": "Validation Error",
  "errors": {
    "name": ["The name field is required."],
    "display_name": ["The display name field is required."]
  }
}
{
  "error": "Unauthorized"
}
{
  "error": "Unauthorized"
}
{
  "error": "Company not found."
}
{
  "error": "An unexpected error occurred."
}

Update an Existing Domain

PUT /api/domains/{id}

Modify details of an existing domain.

Headers:

Name
Type
Description
Required

Authorization

String

Bearer token (Bearer {api_token})

Yes

Content-Type

String

application/json

Yes

Path Parameters:

Name
Type
Description
Required

id

Int

The ID of the domain to update

Yes

Body Parameters:

Name
Type
Description
Required

name

String

The updated domain name.

Yes

display_name

String

The updated display name for the domain

Yes

Response:

{
  "status": "success",
  "message": "Domain updated successfully.",
  "data": {
    "id": 2,
    "name": "updateddomain.com",
    "display_name": "Updated Domain",
    "company_id": 123,
    "created_at": "2023-10-01T12:35:00Z",
    "updated_at": "2023-10-01T12:40:00Z"
  }
}
{
  "status": "error",
  "message": "Validation Error",
  "errors": {
    "name": ["The name field is required."],
    "display_name": ["The display name field is required."]
  }
}
{
  "error": "Unauthorized"
}
{
  "error": "Unauthorized"
}
{
  "error": "Domain not found."
}
{
  "error": "An unexpected error occurred."
}

Delete a Domain

DELETE /api/domains/{id}

Remove a domain from a company.

Headers:

Name
Type
Description
Required

Authorization

String

Bearer token (Bearer {api_token})

Yes

Path Parameters:

Name
Type
Description
Required

id

Int

The ID of the domain to delete

Yes

Response:

{
  "status": "success",
  "message": "Domain deleted successfully."
}
{
  "error": "Unauthorized"
}
{
  "error": "Unauthorized"
}
{
  "error": "Domain not found."
}
{
  "error": "An unexpected error occurred."
}

PreviousPayment ProcessingNextWallet Top-Up

Last updated 8 months ago