Skip to main content

Car Rental Custom Domains (Dashboard) (v1)

Base Path

/api/v1/workspace/:workspaceId/carrental

Actual path: /v1/workspace/:workspaceId/carrental/...

All endpoints require workspace JWT and staff permission carrental.manage.

List domains

GET /:workspaceId/carrental/domains

Returns all custom domains for the workspace car rental (one domain per workspace).

Response 200:

{
"items": [
{
"id": "...",
"workspaceId": "...",
"publicSlug": "demo-rentals",
"domain": "rent.example.com",
"status": "active",
"verificationToken": "placio-carrental-verification=...",
"verifiedAt": "2025-02-18T12:00:00.000Z",
"lastVerificationAttemptAt": null,
"lastVerificationError": null,
"createdAt": "...",
"updatedAt": "..."
}
]
}

status: pending | verifying | verified | active | failed | disabled


Create domain

POST /:workspaceId/carrental/domains

Body:

{
"domain": "rent.example.com"
}

Car rental settings (public slug) must exist for the workspace. One custom domain per workspace.

Response 201: Same shape as one item in the list above (status pending).

Errors: 400 (settings missing or invalid domain), 409 (domain already registered or workspace already has a domain).


Get DNS instructions

GET /:workspaceId/carrental/domains/:domainId/dns-instructions

Returns TXT record name and value for domain verification.

Response 200:

{
"type": "TXT",
"name": "_placio-carrental",
"value": "placio-carrental-verification=...",
"messageAr": "أضف سجل TXT...",
"messageEn": "Add a TXT record..."
}

Verify domain

POST /:workspaceId/carrental/domains/:domainId/verify

Checks DNS for the TXT record. If found and value matches, status becomes verified.

Response 200:

{
"verified": true,
"message": "Domain verified successfully."
}

Or when verification fails:

{
"verified": false,
"message": "TXT record not found or value does not match."
}

Activate domain

POST /:workspaceId/carrental/domains/:domainId/activate

Sets domain status to active (domain must be verified first).

Response 200: Full domain object with status: "active".

Errors: 400 if domain is not verified.


Delete domain

DELETE /:workspaceId/carrental/domains/:domainId

Removes the custom domain.

Response 204 No content.

Errors: 404 if domain not found.


Common errors

CodeDescription
400Bad Request – e.g. domain not verified before activate.
401Unauthorized – Missing or invalid token.
403Forbidden – No carrental.manage.
404Not Found – Domain or workspace.
409Conflict – Domain already registered or workspace already has a domain.