Skip to main content
POST
/
api
/
v2
/
resource
/
create
Create Resource
curl --request POST \
  --url https://app.octavehq.com/api/v2/resource/create \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "mode": "text",
  "text": "This is the content of my landing page...",
  "name": "Product Landing Page",
  "metadata": {
    "customField": "value"
  }
}
'
{
  "_metadata": {
    "requestId": "requestId",
    "timestamp": "2021-01-01T00:00:00.000Z",
    "usage": 0,
    "message": "message"
  },
  "data": {
    "oId": "<string>",
    "sourceType": "url",
    "identifier": "<string>",
    "workspaceOId": "<string>",
    "isParentResource": true,
    "isGlobal": true,
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "name": "<string>",
    "metadata": {
      "fieldwiseTaskIdentifier": "<string>",
      "taskStatus": "pending",
      "externalFilePath": "<string>",
      "title": "<string>",
      "description": "<string>",
      "faviconUrl": "<string>",
      "logoUrl": "<string>",
      "statusCode": 123,
      "isWorkspacePrimarySource": false,
      "isMainResource": false,
      "asyncCrawlComplete": true,
      "originalFileName": "<string>",
      "driveFileType": "file",
      "driveFileUrl": "<string>",
      "driveFileLastModifiedTime": "<string>"
    },
    "settings": {
      "excludeFromReIndexing": true
    },
    "encodedData": "<string>",
    "fieldwiseDocumentId": "<string>",
    "status": "pending",
    "lastIndexedAt": "<string>",
    "hasChildren": true,
    "totalChildren": 123,
    "storageData": {
      "taskStatus": "pending",
      "fieldwiseTaskIdentifier": "<string>",
      "filePath": "<string>",
      "fieldwiseDocumentId": "<string>"
    },
    "uploadedByUserOId": "<string>"
  }
}

Authorizations

api_key
string
header
required

Body

application/json
mode
enum<string>
required

Create a text resource

Available options:
text
text
string
required

The text content of the resource

Minimum string length: 1
Example:

"This is the content of my landing page..."

name
string

Display name for the resource

Example:

"Product Landing Page"

metadata
object

Optional metadata to attach to the resource

Example:
{ "customField": "value" }

Response

Resource created successfully

_metadata
object
required
data
object
required