---
id: log-specification-create
title: "Create log specification"
description: "Create a new log specification."
sidebar_label: "Create log specification"
hide_title: true
hide_table_of_contents: true
api: eJzlWG1v2zYQ/ivEfdoAJXHeikHf0qzDMgxo0DhbMTcwzuLZZkuRKkklcQ399+FE2ZZsJc3atAM2IDAi6Ug+9/I8PHIJnrLSqbCAdLSECaEjd1aGOaSjm+omgYAzD+kIfrcz4QvK1FRlGJQ1cJPA/Z4ptS40hql1OaRLyGyeo5FjgzlBCgfazg66w6oEJPnMqaJ+TOHcEQYSKAzdCb29zD4kYAty9cOFhBS0nY07JmlWzwAJOPpYkg8vrVwwGH5UjiSkwZWUQGZNIBP4ExaFboYfvPeMYwk+m1OO/F9YFIzeTt5TFiCBwjGEoMjzV+tmaNSnevBYSX7V9Wg4J3Hxs7BTEeYk2ubsTTO5MoFm5CABuse80ATp4dHxSZUAZpktTXjC1I3l47MeHZ+cVgkEyjlR0YXGGp3DBSSgAuX+845nWOBEaRUW4wwDzaxbtAb54JSZcX5bdoWzt0qS67VbQWqqpccCpRzHCtzFhlIqjgrqyw7KrUkqXkgFjsR6wauCMqjaCG7RfckiDwRKmaIM42jT49WmLtcfJ9ZqwoYdUyx1aH1cJbXPlT8wvvekKQvWjSVNlVGxXL6TP6i1vRvfKS0zdL1eVW2Iz5RMbWecxzeR880ajnxhjY+DjwaHuwzaETIR5UMKX2YZeT8ttV4wpZ5JLpTcdWRbA7u07hXBNZ/h+OT0BYf9++rQ4wLzuENrnXoeHXoOVWhxvy9BT1Kn59XD6hsK0hdK0Wd4/5hS/Y80KYH+CunjBFu2aF4zotGfMYa+Obiz4i8gMdBeUDn1q8fV672fXgwOxfXwXLCVD5gXvNTdnMxaVu7Qr/SuKypHg6PDvcHh3uBoOBik9d9fDK4s5D8Fxz0hTnjW2HZ9FViNPogGxFMQ920QcUtoMn7y9u2uUp5rRSYIcs46sd5DhCxJBCuUuUWtpKhLTlgncuW9MjNRoMOcAjn/VfvFhoQj8AFD6c+t5EjWeCCBnLzHGXHL3SVBy7pPortO/jocXoo4QmRWknBUOPJkAvvCQV9tOiJrx+MH2p/tJ+JkMOCfQ/455p+THzsJORkMuJi7WB6gwpnIMZsrQ3uOUHKxNGvVuMIcg2gUVX0iH7GRuyUnpqh06ahbChOUY7fqA1ZhewKIiVM0TcS8zNFskLSsVlSN4Hi6VTTewUuUomk+3gG/uDZYhnkNWb6DbnDa1gxxldHPg1yLkJAUUGkvcGLLsIHVXYfp1YSi5k+OmklKUtTRNQGVIbku6XYFV1VkyGkfQ65i+LcZooys69zMBBqhvC9J2Mjgs8sL4ZWk/xg1fDsQTTGcMjVOB0f8c9xN/Om/xwp21hnU42g0jiH7bvy4aJYXTem8YpvIFH6jMhLXBm9R1ZvFDmF6h39T6pwZURq6Lyjj00B0yWZZ6RzJfXGpCT2J4BYCZ6iM4DbNrVjDUb0PZLyyxtdXKR9oAen2DUkCt6hLeuJNCd+/5BTmlq89CuvrJgj5bgYOmFHO8syG1mOBGxqOVoRQOg0pzEMofHpwgIXab4PZz2y+E7NLZ2WZ1amNMwGDWN0RXTFPI73aN0XrRPBSjKE2Y12ujSBp/vll1S389uew3qmZ/282dzavVqnouWPhM0n3SBKPHa3jxOiBG4pNffQ24pvPWx3/5kPrwFEnZbtLf7DX7XaYVd1ST20dsaZJOY95FHUiuT7I+ZiKw/3B/oALnjOfYy2UDbDmymznnLidzuVGeJ9wzdYkMdB9OCg0qvoIUNfQsim7EbTLDhJusTjfXHo3Ccy5RNMRLJcT9HTtdFXx648lcRpGN1z9TsXWcHRTJTAnrFOwpst5hLs3ZChrsuzuGVWyGnGWZVSER23bLLp8fTXkemxuCPNal8HhHe81eAcp1PeNIdJ4Gd8tQaOZlbXoQJyTU4nd4t8q9tqr1fnWLFoIl8toMbQfyFQVJI0rgZ+huqmq6m9ip4R4
sidebar_class_name: "post api-method"
info_path: docs/api/control-plane
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create log specification"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/controlplane/log/spec"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Create a new log specification.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"description":"The ID of the organization.","type":"integer","example":1234},"account_id":{"description":"The ID of the account.","type":"integer","example":2345},"templates":{"type":"array","items":{"type":"object","properties":{"capability_category":{"type":"string"},"capability_provider":{"type":"string"},"template_name":{"type":"string"},"add_tags":{"type":"object","additionalProperties":{"type":"string"}}},"title":"templateSpec"}},"template_vars":{"type":"object","additionalProperties":{"type":"object","properties":{"input_type":{"type":"string"},"required":{"type":"boolean"},"default":{"type":"integer"}},"title":"templateVar"}},"selector_definition":{"type":"object","additionalProperties":{"type":"object","properties":{"input_type":{"type":"string"},"allow_wildcard":{"type":"boolean"}}}},"selector":{"type":"object","additionalProperties":{"type":"string"}}},"title":"logSpecRequest"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"description":"Log specification created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the log specification.","example":"3456"},"organization_id":{"description":"The ID of the organization.","type":"integer","example":1234},"account_id":{"type":"integer","example":2345,"description":"The ID of the account."},"templates":{"type":"array","items":{"type":"object","properties":{"add_tags":{"type":"object","additionalProperties":{"type":"string"}},"template_id":{"type":"string"},"template_name":{"type":"string"},"capability_category":{"type":"string"},"capability_provider":{"type":"string"}}}},"template_vars":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"required":{"type":"boolean"},"input_type":{"type":"string"},"default":{"type":"integer"}}}},"selector_definition":{"type":"object","additionalProperties":{"type":"object","properties":{"input_type":{"type":"string"},"allow_wildcard":{"type":"boolean"}}}},"selector":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"The name of the log."},"created_at":{"type":"string","format":"date-time","description":"The ISO-8601 UTC timestamp of when the log was created.","example":"2021-01-02T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"The ISO-8601 UTC timestamp of when the log was last updated.","example":"2021-01-02T00:00:00Z"}},"title":"logSpecResponse"}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      