Admin - API Endpoints

Only admins and super admins can use these endpoints.

post
Authorizations
Body
namestringRequiredExample: privacyPolicy
titlestringRequiredExample: Privacy Policy
contentstringRequired

Base 64 of PDF or url

Example: https://www.helloiconic.com/privacy-policy
documentCategoryIdstringRequiredExample: 0466770d-4024-457c-92d5-fbe9022ee5b7
iconNamestringRequired

This icon should match with an existing icon in the frontend

Example: book-open
formatstring · enumRequiredExample: urlPossible values:
expirationTimenumberRequired

This value is in ms. This value is the expiration time of the presigned url. Default is 23 hours for PDFs, and is null for URLs and public documents

Example: 36000
isPublicbooleanRequired

Public documents can be seen by anyone. Private documents can only be seen by logged in users. Default is false.

Example: true
Responses
201
Successful Operation
application/json
ResponseanyExample: {"statusCode":201}
post
POST /admin/contents/documents HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 241

{
  "name": "privacyPolicy",
  "title": "Privacy Policy",
  "content": "https://www.helloiconic.com/privacy-policy",
  "documentCategoryId": "0466770d-4024-457c-92d5-fbe9022ee5b7",
  "iconName": "book-open",
  "format": "url",
  "expirationTime": 36000,
  "isPublic": true
}
{
  "statusCode": 201
}
put
Authorizations
Path parameters
idstringRequiredExample: 0466770d-4024-457c-92d5-fbe9022ee5b7
Body
namestringOptionalExample: termsAndConditions
titlestringOptionalExample: Terms & Conditions
contentstringOptional

Base 64 of PDF or url

Example: https://www.helloiconic.com/privacy-policy
documentCategoryIdstringOptionalExample: 0466770d-4024-457c-92d5-fbe9022ee5b7
iconNamestringOptional

This icon should match with an existing icon in the frontend

Example: book-open
indexnumberOptional

This is the order that will be returned to the frontend

Example: 5
formatstring · enumOptionalExample: urlPossible values:
expirationTimenumberOptional

This value is in ms. This value is the expiration time of the presigned url. Default is 23 hours for PDFs, and is null for URLs and public documents

Example: 36000
isPublicbooleanOptional

Public documents can be seen by anyone. Private documents can only be seen by logged in users. Default is false.

Example: true
Responses
200
Successful Operation
application/json
ResponseanyExample: {"statusCode":200}
put
PUT /admin/contents/documents/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 260

{
  "name": "termsAndConditions",
  "title": "Terms & Conditions",
  "content": "https://www.helloiconic.com/privacy-policy",
  "documentCategoryId": "0466770d-4024-457c-92d5-fbe9022ee5b7",
  "iconName": "book-open",
  "index": 5,
  "format": "url",
  "expirationTime": 36000,
  "isPublic": true
}
{
  "statusCode": 200
}
delete
Authorizations
Path parameters
idstringRequiredExample: 0466770d-4024-457c-92d5-fbe9022ee5b7
Responses
200
Successful Operation
application/json
ResponseanyExample: {"statusCode":200}
delete
DELETE /admin/contents/documents/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "statusCode": 200
}
post
Authorizations
Body
namestringRequiredExample: settings
Responses
201
Successful Operation
application/json
ResponseanyExample: {"statusCode":201}
post
POST /admin/contents/document-categories HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "name": "settings"
}
{
  "statusCode": 201
}
put
Authorizations
Path parameters
idstringRequiredExample: 0466770d-4024-457c-92d5-fbe9022ee5b7
Body
namestringRequiredExample: settings
Responses
200
Successful Operation
application/json
ResponseanyExample: {"statusCode":200}
put
PUT /admin/contents/document-categories/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "name": "settings"
}
{
  "statusCode": 200
}
delete
Authorizations
Path parameters
idstringRequiredExample: 0466770d-4024-457c-92d5-fbe9022ee5b7
Responses
200
Successful Operation
application/json
ResponseanyExample: {"statusCode":200}
delete
DELETE /admin/contents/document-categories/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "statusCode": 200
}

Last updated

Was this helpful?