> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salu.com.vc/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Sector

<Info>
  Este endpoint cria um <strong>setor</strong> (Sector) associado a uma
  organização. Ele utiliza o schema
  <code>SectorRequestCreateSchema</code> como corpo da requisição
  e retorna <code>PublicApiSectorBaseResponse</code> em caso de sucesso.
</Info>

## Visão Geral

* **Método:** `POST`
* **Path:** `/v0/sector/`
* **OperationId:** `public_create_sector_v0_sector__post`
* **Autenticação:** header `x-api-key` (`APIKeyHeader` no OpenAPI)

<OpenAPIPlayground openapi="/public-api/openapi.json" operationId="public_create_sector_v0_sector__post" />

### Exemplo de Requisição

```bash theme={null}
curl -X POST "https://public-api.salu.com.vc/dev/routes/v0/sector/" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  -d @sector_payload.json
```


## OpenAPI

````yaml POST /v0/sector/
openapi: 3.1.0
info:
  title: Public API v0
  description: API publica da Salu para integracoes de SST.
  version: 0.1.0
servers:
  - url: https://public-api.salu.com.vc/dev/routes
    description: Development
  - url: https://public-api.salu.com.vc/prd/routes
    description: Production
security: []
paths:
  /v0/sector/:
    post:
      tags:
        - Sector
        - Sector
      summary: Public Create Sector
      operationId: public_create_sector_v0_sector__post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SectorCreateRequestSchema'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiSectorBaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SectorCreateRequestSchema:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        hr_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Hr Code
        client_integration_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Integration Code
        organization_id:
          type: string
          format: uuid
          title: Organization Id
      additionalProperties: false
      type: object
      required:
        - name
        - description
        - organization_id
      title: SectorCreateRequestSchema
    PublicApiSectorBaseResponse:
      properties:
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        address_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Number
        address_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Detail
        zip_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code
        neighborhood:
          anyOf:
            - type: string
            - type: 'null'
          title: Neighborhood
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        name:
          type: string
          title: Name
        is_active:
          type: boolean
          title: Is Active
        description:
          type: string
          title: Description
        hr_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Hr Code
        client_integration_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Integration Code
      type: object
      required:
        - id
        - organization_id
        - name
        - is_active
        - description
      title: PublicApiSectorBaseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````