API ReferenceapicontentPOST /v1/learn-articles

POST /v1/learn-articles

Service: content · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "brandId": {
      "type": "string"
    },
    "category": {
      "type": "string",
      "enum": [
        "peptides",
        "protocols",
        "labs",
        "live-sessions",
        "community",
        "commerce"
      ]
    },
    "excerpt": {
      "type": "string"
    },
    "body": {
      "type": "object",
      "additionalProperties": {}
    },
    "heroImage": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "object",
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "author": {
      "type": "string"
    },
    "publishedAt": {
      "type": "string"
    },
    "readingTimeMinutes": {
      "type": "number"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "published",
        "archived"
      ]
    }
  },
  "required": [
    "title",
    "slug",
    "category",
    "excerpt",
    "body",
    "author"
  ]
}

Responses

201 Created learn article

{
  "type": "object",
  "properties": {
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "brandId": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "excerpt": {
      "type": [
        "string",
        "null"
      ]
    },
    "body": {
      "type": "object",
      "additionalProperties": {}
    },
    "heroImage": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "object",
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "author": {
      "type": [
        "string",
        "null"
      ]
    },
    "publishedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "readingTimeMinutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "tags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "status": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "title",
    "slug",
    "brandId",
    "category",
    "status",
    "createdAt",
    "updatedAt"
  ]
}

Example

curl -X POST https://content.platform.loop.health/v1/learn-articles \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'