---
id: service-create
title: "Create a service"
description: "Create a service"
sidebar_label: "Create a service"
hide_title: true
hide_table_of_contents: true
api: eJztWm1z2zYS/isYTD+kV0p+OTttOXNz44vTOfeujidy2s4orroiVyJqEGAAUA6r0X/vLEBSpCTHcSadpFN9MgUCi8Xi2d1n11xyXaABJ7S6SHnMLZqFSDBODIJDHnEHc8vjMR+FF/wm4inaxIiC1vCYP/MzGbB6KY+4wTclWvcfnVY8XvqfwmDKY2dKjHiilUPl6BUUhRSJ3/7gN0vyltwmGeZAT64qkMdcT3/DxPGIF4aUdQItvVWQY2eWdUaoOY94LtT/Uc1dxuOjiOfwtvl1fHoacaX9xqjKnMdjVUp5s9o80iXkyPSMuQwZKidcNWQ/lNaxKZ1TaTXAvHAVC1syUClT2jF8U4JkTjOSylcRtwUmYlafbyJSr61wktS9SMm4G6rPtMnB8ZiXpaD3fbVeKfGmRCZS0mkm0LCZNh0lmcHCoEXlMGVgGbBXry7OeTgeXcBkl0KgqhczHo8/jWrt9QWbbaHrPGjOyns3AGt1IoAE945H587RWpgHuDSn+yGMrY8IxkDFIy4c5vZh2ElcoNyFuxpSPMVpSb+Fmun6D5mOVIr4HZjmT73KGG3IvuBABu+aQSnJ0rWAvkFq9ZnFBRqyrNdnyM7DMkv4e+2XvuYdE+xSuC/4mmyZOIJwvYY1jrqKuBM5Wgd50RGkynyKZltQM7VxoUacUCwXUgqLiVap5atV1IkN41bVm4hDmgoSB/KqY/wZSIub273w17QGGHlkc+/sTrhsw1RhXynULUwlTpzuguNHYcVUSOGqbXz0tz2j0f6ui3Yxs+hoyG64wZCNAkRJtQzcwV2mWQKKWUTmMmHreT001qpdvrzc4ZYFOIeGFPpFmzko8btH2r/Gh4Nv/3Hz1ZMYkkSXyjUDX/77SUyB0xaQYHewE4m7wzbRRWfeF1t2uCylLCQ4Ajl7iVaXJkHmI+iTy5eXX/ZNBCwTaMAkmUhAbrqz6soytaxwX6nIUVmhVc8m583o2jKt1+6G0CPSxdHh4fuli/9hNViALJE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VtlgLIDzdg3APwk8LQn8wl2kK6YW2LrDHjMf8YJ0y6AmJZo2XvDSSxzxzrrDxwQEUYtglaMNE574h1XSKR4S6AKRuv7i1IQnyGZimES3wk3hUP3zXFP3f/3TtjURofrn+COv5Pte9+/8Dvh0WLzndXwDW0fBweMjXxKHH1c+uLgjrhIQcVMesO76F6+F1uQ4/u+bWt01YPygkCO+oHkrLGm/j5gM9skFGSIzHfLmcgsVXRq5WNPymROK545uIL8CI0P0ZE2HMEDw5Hy/5LZKJngVtBsThOE0nO8XbgZHoZ1hxliRYuHfOvek4y9WL0TXBtP4SMPcBjRu4IxeEOx5zuufCNWW5H1tyCWpe+jDCg0xPu/s+seEDXd5NRH2t4XIZZlzrW1SrFY/qozj6TUx6tfoDrjxYBA==
sidebar_class_name: "post api-method"
info_path: docs/api/nullplatform-api
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 a service"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/service"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Create a service

<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":{"name":{"type":"string","minLength":1,"maxLength":255,"not":{"enum":[null]},"description":"Name of the entity. Must be a non-empty string and not equal to null"},"specification_id":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},"desired_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"Desired unique identifier for the associated specification"},"messages":{"title":"Message","type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["debug","info","information","warn","warning","error","fatal"],"default":"info","description":"Message severity level. Defaults to \"info\""},"message":{"type":"string","description":"The actual message content"},"timestamp":{"type":"number","description":"Timestamp of the message in milliseconds"}},"required":["message"],"additionalProperties":false,"description":"Object representing messages with severity levels"}},"linkable_to":{"title":"Visibility","type":"array","description":"Array representing visibility settings for the entity. Specifies what/who can see this entity","items":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"}},"dimensions":{"title":"Dimension","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100,"not":{"enum":[null]},"description":"Key-value pairs representing dimensions. Each key must be a non-null string with a minimum length of 1"},"description":"Object representing dimensions with key-value pairs"},"attributes":{"default":{},"type":"object","description":"Attributes associated with the service, should be valid against the service specification attribute schema"},"selectors":{"title":"Selector","type":"object","properties":{"imported":{"type":"boolean","default":false},"provider":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"category":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"sub_category":{"type":"string","minLength":1,"maxLength":100,"default":"any"}},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Key-value object representing instance selectors"},"type":{"default":"dependency","type":"string","enum":["dependency","scope"],"description":"Type of the service. Should be one of the specified values in the enumeration"},"status":{"type":"string","enum":["pending_create","pending","creating","updating","archiving","active","archived","failed","cancelled"],"description":"Status of the service. Should be one of the specified values in the enumeration"},"entity_nrn":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"}},"description":"Object representing service instances","additionalProperties":false,"title":"Service","example":{"name":"my-service","entity_nrn":"organization=1:account=1:namespace=1","specification_id":"67fac146-54cc-466d-8c52-a8234445a95f","linkable_to":["organization=1:account=1","organization=1:account=2"],"attributes":{"my_string_property":"my_string_value","my_number_property":0}},"required":["name","specification_id","entity_nrn"]}}},"description":"Object representing service instances"}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"2XX":{"description":"Object representing service instances","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},"name":{"type":"string","minLength":1,"maxLength":255,"not":{"enum":[null]},"description":"Name of the entity. Must be a non-empty string and not equal to null"},"slug":{"type":"string","minLength":1,"maxLength":255,"not":{"enum":[null]},"description":"Slug of the entity. Automatically generated from \"name\""},"specification_id":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},"desired_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"Desired unique identifier for the associated specification"},"messages":{"title":"Message","type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["debug","info","information","warn","warning","error","fatal"],"default":"info","description":"Message severity level. Defaults to \"info\""},"message":{"type":"string","description":"The actual message content"},"timestamp":{"type":"number","description":"Timestamp of the message in milliseconds"}},"required":["message"],"additionalProperties":false,"description":"Object representing messages with severity levels"}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"archived_at":{"type":"string","format":"date","nullable":true,"description":"When the instance was last archived. `null` while the instance is not archived"},"status":{"type":"string","enum":["pending_create","pending","creating","updating","archiving","active","archived","failed","cancelled"],"description":"Status of the service. Should be one of the specified values in the enumeration"},"linkable_to":{"title":"Visibility","type":"array","description":"Array representing visibility settings for the entity. Specifies what/who can see this entity","items":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"}},"dimensions":{"title":"Dimension","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100,"not":{"enum":[null]},"description":"Key-value pairs representing dimensions. Each key must be a non-null string with a minimum length of 1"},"description":"Object representing dimensions with key-value pairs"},"attributes":{"type":"object","description":"Attributes associated with the service, should be valid against the service specification attribute schema"},"entity_nrn":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"},"selectors":{"title":"Selector","type":"object","properties":{"imported":{"type":"boolean","default":false},"provider":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"category":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"sub_category":{"type":"string","minLength":1,"maxLength":100,"default":"any"}},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Key-value object representing instance selectors"},"type":{"type":"string","enum":["dependency","scope"],"description":"Type of the service. Should be one of the specified values in the enumeration"}},"description":"Object representing service instances","additionalProperties":false,"title":"Service","example":{"name":"my-service","entity_nrn":"organization=1:account=1:namespace=1","specification_id":"67fac146-54cc-466d-8c52-a8234445a95f","linkable_to":["organization=1:account=1","organization=1:account=2"],"attributes":{"my_string_property":"my_string_value","my_number_property":0}}}}}},"4XX":{"description":"Format for representing errors during API interactions","content":{"application/json":{"schema":{"title":"Error","type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code indicating the error"},"code":{"type":"string","description":"Unique error code for reference and categorization"},"error":{"type":"string","description":"Short, human-readable error type or category"},"message":{"type":"string","description":"Detailed error message providing additional context"}},"description":"Format for representing errors during API interactions","required":["statusCode","error","message"]}}}},"5XX":{"description":"Format for representing errors during API interactions","content":{"application/json":{"schema":{"title":"Error","type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code indicating the error"},"code":{"type":"string","description":"Unique error code for reference and categorization"},"error":{"type":"string","description":"Short, human-readable error type or category"},"message":{"type":"string","description":"Detailed error message providing additional context"}},"description":"Format for representing errors during API interactions","required":["statusCode","error","message"]}}}}}}
>
  
</StatusCodes>


      