---
updatedAt: 2025-06-11T20:21:50.000Z
agentTools:
  projectIndex: https://docs.finbits.com.br/llms.txt
---

# Criar Categoria

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "finbits-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.finbits.com.br/public"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/categories": {
      "post": {
        "summary": "Criar Categoria",
        "description": "",
        "operationId": "criar-categoria",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Nome da categoria."
                  },
                  "type": {
                    "type": "string",
                    "description": "Tipo da categoria.",
                    "enum": [
                      "debit",
                      "credit"
                    ]
                  },
                  "external_id": {
                    "type": "string",
                    "description": "ID para correlação com serviços externos (ERP, BI, etc)."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "name": "Tecnologia",
                    "type": "debit",
                    "external_id": "03aa27fa-7dcb-4acb-a1a1-53bdbf502896"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n      \"active\": true,\n      \"id\": \"category_3jlfsmdo3behdclmuacm3jgji0\",\n      \"name\": \"Tecnologia\",\n      \"type\": \"debit\",\n      \"object\": \"category\",\n\t\t\t\"external_id\": \"03aa27fa-7dcb-4acb-a1a1-53bdbf502896\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "id": {
                      "type": "string",
                      "example": "category_3jlfsmdo3behdclmuacm3jgji0"
                    },
                    "name": {
                      "type": "string",
                      "example": "Tecnologia"
                    },
                    "type": {
                      "type": "string",
                      "example": "debit"
                    },
                    "object": {
                      "type": "string",
                      "example": "category"
                    },
                    "external_id": {
                      "type": "string",
                      "example": "03aa27fa-7dcb-4acb-a1a1-53bdbf502896"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": {\n    \"name\": \"is required\",\n\t\t\"type\": \"is required\"\n  },\n  \"message\": \"Bad request\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "is required"
                        },
                        "type": {
                          "type": "string",
                          "example": "is required"
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```