POST
/
api
/
v0
/
taxes
Create a new tax
curl --request POST \
  --url https://api.devdraft.ai/api/v0/taxes \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "name": "Sales Tax",
  "description": "Standard sales tax for retail transactions",
  "percentage": 8.5,
  "active": true,
  "appIds": [
    "app_123e4567-e89b-12d3-a456-426614174000"
  ]
}'
{
  "id": "tax_123e4567-e89b-12d3-a456-426614174000",
  "name": "Sales Tax",
  "description": "Standard sales tax for retail transactions",
  "percentage": 8.5,
  "active": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-client-secret
string
header
required

Your secret API key. Keep this secure and never expose it in client-side code.

Body

application/json

Tax creation data

name
string
required

Tax name. Used to identify and reference this tax rate.

Required string length: 1 - 100
Example:

"Sales Tax"

percentage
number
required

Tax percentage rate. Must be between 0 and 100.

Required range: 0 <= x <= 100
Example:

8.5

description
string

Optional description explaining what this tax covers.

Maximum length: 255
Example:

"Standard sales tax for retail transactions"

active
boolean
default:true

Whether this tax is currently active and can be applied.

Example:

true

appIds
string<uuid>[]

Array of app IDs where this tax should be available. If not provided, tax will be available for the current app.

Example:
["app_123e4567-e89b-12d3-a456-426614174000"]

Response

Tax created successfully

id
string
Example:

"tax_123e4567-e89b-12d3-a456-426614174000"

name
string
Example:

"Sales Tax"

description
string
Example:

"Standard sales tax for retail transactions"

percentage
number
Example:

8.5

active
boolean
Example:

true

created_at
string<date-time>
updated_at
string<date-time>