Publication
The publication API allows you to retrieve and update your core publication settings.
The publication model
The publication model contains all the essential settings for your site, including the name, subdomain, logo, and other metadata.
Properties
- Name
id- Type
- integer
- Description
Unique identifier for the publication.
- Name
name- Type
- string
- Description
The name of the publication.
- Name
subdomain- Type
- string
- Description
The BlogHunch subdomain of the publication.
- Name
domain- Type
- string
- Description
The custom domain associated with the publication, if any.
- Name
logo- Type
- string
- Description
The URL to the publication logo.
- Name
description- Type
- string
- Description
A brief description of the publication.
- Name
created_at- Type
- timestamp
- Description
The timestamp of when the publication was created.
- Name
updated_at- Type
- timestamp
- Description
The timestamp of the last update.
GET/publication
Get publication
This endpoint retrieves the details of your publication.
Request
curl -G https://api.bloghunch.com/app/{subdomain}/publication \
-H "Authorization: Bearer {token}"
Response
{
"id": 3696,
"name": "MotoHub",
"subdomain": "scode",
"domain": null,
"logo": "https://cdn.bloghunch.com/...",
"description": "A publication about motorcycles.",
"created_at": "2023-01-10T12:00:00.000+05:30",
"updated_at": "2023-01-15T10:00:00.000+05:30"
}
PUT/publication
Update publication
This endpoint allows you to update your publication settings.
Optional attributes
- Name
name- Type
- string
- Description
The updated name of the publication.
- Name
description- Type
- string
- Description
The updated description of the publication.
Request
curl -X PUT https://api.bloghunch.com/app/{subdomain}/publication \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "MotoHub Pro",
"description": "The best motorcycle blog."
}'
Response
{
"status": "success",
"message": "Publication updated successfully",
"publication": {
"id": 3696,
"name": "MotoHub Pro",
"subdomain": "scode",
"domain": null,
"description": "The best motorcycle blog."
}
}

