---
updatedAt: 2025-06-05T22:00:16.000Z
agentTools:
  projectIndex: https://sportnginsite.readme.io/llms.txt
---

# News Articles Create

The Create method accepts a single News Article and creates a new record in Sport Ngin.  A News Article can be created using a template by passing an optional `template_id` parameter.  An image can be included by passing an optional `uploaded_data` parameter with the value pointing to the location where the image is stored.

###Parameters

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.sportngin.com"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/news_articles": {
      "post": {
        "summary": "News Articles Create",
        "description": "The Create method accepts a single News Article and creates a new record in Sport Ngin.  A News Article can be created using a template by passing an optional `template_id` parameter.  An image can be included by passing an optional `uploaded_data` parameter with the value pointing to the location where the image is stored.\n\n###Parameters",
        "operationId": "news-articles-create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "author",
                  "page_node_ids",
                  "news_date",
                  "status"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the news article. Max length is 300."
                  },
                  "author": {
                    "type": "string",
                    "description": "Author of the news article. Max Length 100."
                  },
                  "page_node_ids": {
                    "type": "string",
                    "description": "Comma separated list of page node ids (i.e. tag ids)."
                  },
                  "news_date": {
                    "type": "string",
                    "description": "The date and time the article was published.",
                    "format": "date"
                  },
                  "status": {
                    "type": "string",
                    "description": "Possible values: \"draft\", \"published\". Defaults to \"draft\""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": 634672,\n    \"title\": \"Bears to Play Cyclists!!\",\n    \"teaser\": \"This is going to be one for the ages!!!\",\n    \"author\": \"Clark Kent\",\n    \"news_date\": \"2016-04-06T13:00:00-07:00\",\n    \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n    \"created_on\": \"2016-04-08T09:04:54-07:00\",\n    \"image_id\": null,\n    \"content_node_id\": 20528244,\n    \"status\": \"published\",\n    \"preview_text\": null,\n    \"show_image_with_article\": true,\n    \"show_image_in_aggregator\": true,\n    \"show_preview_text_with_article\": true,\n    \"show_preview_text_in_aggregator\": true,\n    \"article_type\": \"ngin\",\n    \"news_expiration_date\": null,\n    \"content_node\": {\n        \"id\": 20528244,\n        \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n        \"created_on\": \"2016-04-08T09:04:54-07:00\",\n        \"resource_type\": \"NewsArticle\",\n        \"layout_containers\": [\n            {\n                \"id\": 23018184,\n                \"content_node_id\": 20528244,\n                \"layout_type\": \"oneColumn\",\n                \"locked\": false,\n                \"position\": 1,\n                \"created_at\": \"2016-04-08T09:04:54-07:00\",\n                \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n                \"custom_css_class\": null,\n                \"mirror_target_id\": null,\n                \"name\": null,\n                \"layout_columns\": [\n                    {\n                        \"id\": 27998042,\n                        \"layout_container_id\": 23018184,\n                        \"position\": 1,\n                        \"page_elements\": []\n                    }\n                ]\n            }\n        ]\n    },\n    \"comment_element\": {\n        \"id\": 289847569,\n        \"login_required\": false,\n        \"approval_required\": false,\n        \"created_at\": \"2016-04-08T09:04:54-07:00\",\n        \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n        \"title\": \"Comments\",\n        \"ascending_sort_order\": false,\n        \"site_id\": 11953,\n        \"enabled\": true,\n        \"source_id\": 634672,\n        \"source_type\": \"NewsArticle\",\n        \"comments\": []\n    },\n    \"url_string\": \"http://apidemo.sportngin.com/news_article/show/634672\",\n    \"thumbnails\": {},\n    \"sanitized_content\": \"\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 634672,
                      "default": 0
                    },
                    "title": {
                      "type": "string",
                      "example": "Bears to Play Cyclists!!"
                    },
                    "teaser": {
                      "type": "string",
                      "example": "This is going to be one for the ages!!!"
                    },
                    "author": {
                      "type": "string",
                      "example": "Clark Kent"
                    },
                    "news_date": {
                      "type": "string",
                      "example": "2016-04-06T13:00:00-07:00"
                    },
                    "updated_on": {
                      "type": "string",
                      "example": "2016-04-08T09:04:54-07:00"
                    },
                    "created_on": {
                      "type": "string",
                      "example": "2016-04-08T09:04:54-07:00"
                    },
                    "image_id": {},
                    "content_node_id": {
                      "type": "integer",
                      "example": 20528244,
                      "default": 0
                    },
                    "status": {
                      "type": "string",
                      "example": "published"
                    },
                    "preview_text": {},
                    "show_image_with_article": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "show_image_in_aggregator": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "show_preview_text_with_article": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "show_preview_text_in_aggregator": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "article_type": {
                      "type": "string",
                      "example": "ngin"
                    },
                    "news_expiration_date": {},
                    "content_node": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 20528244,
                          "default": 0
                        },
                        "updated_on": {
                          "type": "string",
                          "example": "2016-04-08T09:04:54-07:00"
                        },
                        "created_on": {
                          "type": "string",
                          "example": "2016-04-08T09:04:54-07:00"
                        },
                        "resource_type": {
                          "type": "string",
                          "example": "NewsArticle"
                        },
                        "layout_containers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 23018184,
                                "default": 0
                              },
                              "content_node_id": {
                                "type": "integer",
                                "example": 20528244,
                                "default": 0
                              },
                              "layout_type": {
                                "type": "string",
                                "example": "oneColumn"
                              },
                              "locked": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "position": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2016-04-08T09:04:54-07:00"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2016-04-08T09:04:54-07:00"
                              },
                              "custom_css_class": {},
                              "mirror_target_id": {},
                              "name": {},
                              "layout_columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 27998042,
                                      "default": 0
                                    },
                                    "layout_container_id": {
                                      "type": "integer",
                                      "example": 23018184,
                                      "default": 0
                                    },
                                    "position": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    },
                                    "page_elements": {
                                      "type": "array"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comment_element": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 289847569,
                          "default": 0
                        },
                        "login_required": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "approval_required": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2016-04-08T09:04:54-07:00"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2016-04-08T09:04:54-07:00"
                        },
                        "title": {
                          "type": "string",
                          "example": "Comments"
                        },
                        "ascending_sort_order": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "site_id": {
                          "type": "integer",
                          "example": 11953,
                          "default": 0
                        },
                        "enabled": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "source_id": {
                          "type": "integer",
                          "example": 634672,
                          "default": 0
                        },
                        "source_type": {
                          "type": "string",
                          "example": "NewsArticle"
                        },
                        "comments": {
                          "type": "array"
                        }
                      }
                    },
                    "url_string": {
                      "type": "string",
                      "example": "http://apidemo.sportngin.com/news_article/show/634672"
                    },
                    "thumbnails": {
                      "type": "object",
                      "properties": {}
                    },
                    "sanitized_content": {
                      "type": "string",
                      "example": ""
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"news_article\": {\n        \"title\": \"Bears to Play Cyclists!!\",\n        \"teaser\": \"This is going to be one for the ages!!!\",\n        \"author\": \"Clark Kent\",\n        \"news_date\": \"2016-04-06T13:00:00\",\n        \"page_node_ids\": \"2458139,2458145\",\n        \"status\": \"published\"\n    }\n}\n        ' \"https://api.sportngin.com/news_articles\""
            },
            {
              "language": "ruby",
              "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/news_articles\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"news_article\\\": {\\n        \\\"title\\\": \\\"Bears to Play Cyclists!!\\\",\\n        \\\"teaser\\\": \\\"This is going to be one for the ages!!!\\\",\\n        \\\"author\\\": \\\"Clark Kent\\\",\\n        \\\"news_date\\\": \\\"2016-04-06T13:00:00\\\",\\n        \\\"page_node_ids\\\": \\\"2458139,2458145\\\",\\n        \\\"status\\\": \\\"published\\\"\\n    }\\n}\\n        \"\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "java",
              "code": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"news_article\\\": {\\n        \\\"title\\\": \\\"Bears to Play Cyclists!!\\\",\\n        \\\"teaser\\\": \\\"This is going to be one for the ages!!!\\\",\\n        \\\"author\\\": \\\"Clark Kent\\\",\\n        \\\"news_date\\\": \\\"2016-04-06T13:00:00\\\",\\n        \\\"page_node_ids\\\": \\\"2458139,2458145\\\",\\n        \\\"status\\\": \\\"published\\\"\\n    }\\n}\\n        \");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/news_articles\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
            }
          ],
          "samples-languages": [
            "curl",
            "ruby",
            "java"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```