POST
/
posts
/
{post_id}
/
categories
Attach a category to a post
curl --request POST \
  --url http://localhost:3001/portal-api/posts/{post_id}/categories \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ID": 123
}'
{
  "ID": "<string>",
  "Name": "<string>",
  "CreatedAt": "2023-06-25 13:37",
  "UpdatedAt": "2023-06-25 13:37"
}

Authorizations

Authorization
string
header
required

Path Parameters

post_id
integer
required

UID of a post

Example:

1

Body

application/json
ID
integer

Unique identifier for the category

Response

Created

ID
string

Unique identifier for the category

Name
string

Name of the category

CreatedAt
string

Timestamp of when this category was created

Example:

"2023-06-25 13:37"

UpdatedAt
string

Timestamp of when this category was last updated

Example:

"2023-06-25 13:37"