Docs
POST /import_content
https://heyeveryone.ai/api/v1/import_content
Operation
{
"post": {
"description": "Import a Buffer, Typefully, Hootsuite or Postiz export, or a CSV, into this workspace: each item becomes content on the board (Idea, Drafting or In review) with its text as the original draft, its tags as campaigns, its date as a planning date, and a draft post for each channel it names that has a connected account. Nothing is ever scheduled or published on import: a person schedules the drafts later. Call preview_import first and show the person what will be created and skipped. The whole file imports or nothing does. Idempotent per file and options: the same file with the same format, `defaultChannelAccountId` and `includePublished` creates nothing and returns the earlier import (`alreadyImported: true`). With other options it imports again, skipping items already imported (from any file), so turning on includePublished brings in only the published items; an item without its own channel imported with another default channel counts as new. Formats and limits: as in preview_import. Free: imports never cost credits.",
"operationId": "import_content",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"workspaceId": {
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
"content": {
"maxLength": 1048576,
"type": "string"
},
"format": {
"default": "auto",
"enum": [
"auto",
"csv",
"buffer",
"buffer_insights",
"typefully",
"hootsuite",
"postiz"
],
"type": "string"
},
"fileName": {
"maxLength": 255,
"minLength": 1,
"type": "string"
},
"defaultChannelAccountId": {
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
"includePublished": {
"default": false,
"type": "boolean"
}
},
"required": [
"workspaceId",
"content"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"import": {
"additionalProperties": false,
"properties": {
"id": {
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
"fileName": {
"type": [
"string",
"null"
]
},
"format": {
"enum": [
"csv",
"buffer",
"buffer_insights",
"typefully",
"hootsuite",
"postiz"
],
"type": "string"
},
"formatLabel": {
"type": "string"
},
"rowCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"createdCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"skippedCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"postCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"createdAt": {
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"type": "string"
},
"createdByAccountId": {
"anyOf": [
{
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
{
"type": "null"
}
]
},
"createdByAgentClientId": {
"anyOf": [
{
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
{
"type": "null"
}
]
},
"defaultChannelAccountId": {
"anyOf": [
{
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
{
"type": "null"
}
]
},
"includePublished": {
"type": "boolean"
}
},
"required": [
"id",
"fileName",
"format",
"formatLabel",
"rowCount",
"createdCount",
"skippedCount",
"postCount",
"createdAt",
"createdByAccountId",
"createdByAgentClientId",
"defaultChannelAccountId",
"includePublished"
],
"type": "object"
},
"alreadyImported": {
"type": "boolean"
},
"rows": {
"items": {
"additionalProperties": false,
"properties": {
"row": {
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"action": {
"enum": [
"create",
"skip"
],
"type": "string"
},
"reason": {
"type": [
"string",
"null"
]
},
"title": {
"type": "string"
},
"excerpt": {
"type": "string"
},
"status": {
"enum": [
"idea",
"drafting",
"in_review"
],
"type": "string"
},
"plannedFor": {
"type": [
"string",
"null"
]
},
"labels": {
"items": {
"type": "string"
},
"type": "array"
},
"channels": {
"items": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"platform": {
"anyOf": [
{
"enum": [
"x",
"linkedin",
"threads",
"bluesky",
"instagram",
"facebook",
"tiktok",
"youtube",
"sandbox"
],
"type": "string"
},
{
"type": "null"
}
]
},
"channelAccountId": {
"anyOf": [
{
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
{
"type": "null"
}
]
},
"handle": {
"type": [
"string",
"null"
]
},
"issue": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"label": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"label",
"message"
],
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"platform",
"channelAccountId",
"handle",
"issue"
],
"type": "object"
},
"type": "array"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array"
},
"pieceId": {
"anyOf": [
{
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"row",
"action",
"reason",
"title",
"excerpt",
"status",
"plannedFor",
"labels",
"channels",
"warnings",
"pieceId"
],
"type": "object"
},
"type": "array"
},
"summary": {
"additionalProperties": false,
"properties": {
"rows": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"create": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"skip": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"posts": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"rows",
"create",
"skip",
"posts"
],
"type": "object"
},
"pieceIds": {
"items": {
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
"type": "string"
},
"type": "array"
}
},
"required": [
"import",
"alreadyImported",
"rows",
"summary",
"pieceIds"
],
"type": "object"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "invalid_input: the body does not match the schema"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "unauthenticated: missing, invalid, expired or revoked token"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "forbidden: the agent may not do this (for example, another workspace)"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "not_found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "conflict"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Service-specific errors: invalid_file, file_too_large, too_many_rows"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "internal_error"
}
},
"summary": "Import content",
"tags": [
"workspace"
],
"x-heyeveryone-kind": "mutation"
}
}Referenced definitions
{
"schemas": {
"Error": {
"properties": {
"error": {
"description": "A stable error code, for example forbidden.",
"type": "string"
},
"message": {
"description": "What went wrong, in plain words.",
"type": "string"
}
},
"required": [
"error",
"message"
],
"type": "object"
}
},
"responses": {
"RateLimited": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "rate_limited: too many requests from this agent, account or address (docs/setup/agents.md, Rate limits); wait the Retry-After seconds, then retry",
"headers": {
"Retry-After": {
"description": "Seconds to wait before retrying.",
"schema": {
"minimum": 1,
"type": "integer"
}
}
}
}
}
}Authentication
{
"bearer": {
"description": "Personal access token (hey_pat_...)",
"scheme": "bearer",
"type": "http"
},
"oauth": {
"flows": {
"authorizationCode": {
"authorizationUrl": "https://heyeveryone.ai/oauth/authorize",
"refreshUrl": "https://heyeveryone.ai/oauth/token",
"scopes": {
"agent": "Act as your agent in the workspaces you choose"
},
"tokenUrl": "https://heyeveryone.ai/oauth/token"
}
},
"type": "oauth2"
}
}Security requirements
[
{
"bearer": []
},
{
"oauth": [
"agent"
]
}
]