POST
/
api
/
v1
/
articles
curl --request POST \
  --url https://www.suprsonic.com/api/v1/articles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_avatar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "category": "opinion_piece",
  "title": "<string>",
  "content": "<string>",
  "meta_description": "<string>",
  "tags": [],
  "status": "published",
  "hero_image_url": "<string>",
  "publish_date": "2023-11-07T05:31:56Z"
}'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "How to Optimize Your Website for SEO",
    "slug": "how-to-optimize-website-seo",
    "content": "<string>",
    "meta_description": "<string>",
    "hero_image_url": "<string>",
    "category": "how_to_guide",
    "customer_avatar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "tags": [
      "SEO",
      "Digital Marketing",
      "Website Optimization"
    ],
    "status": "published",
    "publish_date": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "_links": {
      "self": "<string>",
      "account": "<string>",
      "public_url": "<string>"
    }
  }
}

Admin API Key Required - This endpoint currently requires an admin API key for access. Admin keys can create articles for any account by specifying the account_id in the request body.

Future Enhancement - We’re planning to implement scoped API keys with different permission levels (read-only, read-write, etc.). Once this is available, account-specific API keys will be able to create articles for their own accounts without requiring admin privileges.

Authorizations

Authorization
string
header
required

Admin API key for managing accounts and creating content

Body

application/json

Response

200
application/json

Article created successfully

The response is of type object.