HydraCore
API by router

Portal

Portal Chat

POST
/v1/portal/chat
AuthorizationBearer <token>

In: header

conversation_id?Conversation Id
messageMessage
Length1 <= length <= 8000

Response Body

curl -X POST "https://loading/v1/portal/chat" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get My Profile

GET
/v1/portal/me
AuthorizationBearer <token>

In: header

Response Body

curl -X GET "https://loading/v1/portal/me"
{
  "company_name": "string",
  "email": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "industry": "string",
  "locale": "string",
  "portal_modules": {},
  "timezone": "string"
}

Portal Media Upload Url

Get a presigned upload URL for portal media.

POST
/v1/portal/media/upload-url
AuthorizationBearer <token>

In: header

content_typeContent Type
Length1 <= length <= 100
filenameFilename
Length1 <= length <= 255

Response Body

curl -X POST "https://loading/v1/portal/media/upload-url" \  -H "Content-Type: application/json" \  -d '{    "content_type": "string",    "filename": "string"  }'
{}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Portal Media Confirm Upload

Confirm a media upload completed successfully.

Called by the frontend after the R2 PUT succeeds. Moves the WebsiteMedia row from 'pending' to 'confirmed' so it appears in media listings.

POST
/v1/portal/media/{media_id}/confirm
AuthorizationBearer <token>

In: header

Path Parameters

media_idMedia Id
Formatuuid

Response Body

curl -X POST "https://loading/v1/portal/media/497f6eca-6276-4993-bfeb-53cbbbba6f08/confirm"
{}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List My Sites

List all websites owned by the authenticated customer.

GET
/v1/portal/sites
AuthorizationBearer <token>

In: header

Response Body

curl -X GET "https://loading/v1/portal/sites"
[
  {
    "content_mode": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "hosting_mode": "string",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "primary_domain": "string",
    "status": "string"
  }
]

Get Site Analytics

Analytics summary for a customer's site.

GET
/v1/portal/sites/{config_id}/analytics
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid

Query Parameters

period?Period
Default7

Response Body

curl -X GET "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics?period=7"
{
  "daily_views": [
    {}
  ],
  "device_breakdown": {},
  "period_days": 0,
  "top_pages": [
    {}
  ],
  "total_views": 0,
  "unique_sessions": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Site Forms

Form submissions for a customer's site.

GET
/v1/portal/sites/{config_id}/forms
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid

Query Parameters

unread_only?Unread Only
Defaultfalse

Response Body

curl -X GET "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms?unread_only=false"
[
  {
    "fields": {},
    "form_name": "",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "status": "string",
    "submitted_at": "2019-08-24T14:15:22Z",
    "submitter_email": "string",
    "submitter_name": "string"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Site Pages

GET
/v1/portal/sites/{config_id}/pages
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid

Response Body

curl -X GET "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages"
[
  {
    "content_html": "",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "published": false,
    "slug": "string",
    "sort_order": 0,
    "status": "string",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Page

POST
/v1/portal/sites/{config_id}/pages
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid
content_html?Content Html
Default""
slugSlug
Lengthlength <= 100
status?Status
Default"draft"
titleTitle
Lengthlength <= 200

Response Body

curl -X POST "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages" \  -H "Content-Type: application/json" \  -d '{    "slug": "string",    "title": "string"  }'
{
  "content_html": "",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "published": false,
  "slug": "string",
  "sort_order": 0,
  "status": "string",
  "title": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Page

DELETE
/v1/portal/sites/{config_id}/pages/{slug}
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid
slugSlug

Response Body

curl -X DELETE "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Page

PUT
/v1/portal/sites/{config_id}/pages/{slug}
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid
slugSlug
content_html?Content Html
published?Published
status?Status
title?Title

Response Body

curl -X PUT "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "content_html": "",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "published": false,
  "slug": "string",
  "sort_order": 0,
  "status": "string",
  "title": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Submissions

GET
/v1/portal/sites/{config_id}/submissions
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid

Query Parameters

offset?Offset
Default0
limit?Limit
Default50
unread_only?Unread Only
Defaultfalse

Response Body

curl -X GET "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/submissions?offset=0&limit=50&unread_only=false"
[
  {
    "fields": {},
    "form_name": "",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "status": "string",
    "submitted_at": "2019-08-24T14:15:22Z",
    "submitter_email": "string",
    "submitter_name": "string"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Submission

PATCH
/v1/portal/sites/{config_id}/submissions/{submission_id}
AuthorizationBearer <token>

In: header

Path Parameters

config_idConfig Id
Formatuuid
submission_idSubmission Id
Formatuuid
statusStatus
Value in"read" | "unread"

Response Body

curl -X PATCH "https://loading/v1/portal/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/submissions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "status": "read"  }'
{}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}